We had a pretty interesting Tech Support question that came in recently: "I'd like to create a graph of the relation |y|=x^3-x. How do I do it?"

The problem is that Sketchpad knows how to graph functions but not relations. Fortunately, in this case we can consider two related functions, based on the definition of absolute value: |y| = y when y ≥ 0, and |y| = -y when y < 0. So we can graph y = x^3 - x when y ≥ 0, and also graph -y = x^3 - x when y < 0. Simplifying and rewriting to put our conditions in term of x, to show the relation we need to graph these two functions:

y = x^3 - x when x^3 - x ≥ 0

y = -x^3 + x when -x^3 + x < 0.

[11/28/10: I corrected the condition above to show "<". The sketch was, and remains, correct. -stek]

Once we've figured this out, the remaining challenge is to properly restrict the domain of these functions. I show how to do this in the enclosed sketch, by using a boolean function that returns 1 or 0 depending on whether the condition (x^3 - x) is true or false.

Graph_absolute_value_relation.gsp