I had to graph this piecewise-defined function using a graphing utility (read graphing calculator) this evening:
{ -X-5 for -4 <= X < 0
f(X) = {
{ 0.2X^2 for 0 <= X <= 5
Of course I knew the HP48G should be able to do this, but I had never done this in the past. According to the user's manual this can be accomplished by entering a program using if-then-else statements. It worked, except I wasn't sure what do do for those parts of the graph that are not in the domain of this function as the calculator still tries to plot them. In the end I used a catchall branch to return 0 if the independent variable was not within the intervals defined in the function. This was not ideal, but I was able to work with it.
Plotting a function this way proved to be quite time consuming to say the least. I think I spend 15 - 20 minutes on getting it right. Once I completed my homework I went on the Internet and found this FAQ and more specifically this entry regarding this very issue. Restrict the domain of an expression by dividing the expression by the domain.
-X-5 for -4 <= X < 0 becomes (-X-5)/(-4\<=X AND X<0)
To do more than one equation at the same time, put them in a list (curly braces). Don't forget to surround each expression in single quotes:
{ '(-X-5)/(-4\<=X AND X<0)' '(0.2*X^2)/(0<X AND X\<=5)' }
Note: The "<=" "\<=" should be replaced with the "less than or equal to" symbols from the character map or alpha-left shift-3 ("less than" signs are alpha-left shift-2).

