Piecewise-Defined Functions

A frequently asked question is, how do I enter and graph a piecewise defined function? For example, suppose the function f is defined as follows:

To enter f, first press to access the MAIN MENU icons. Then press to access the GRPH-TBL screen. The Graph Func screen is displayed. Enter the function as follows:

Y1=X2, [-10,0]
Y2=X, [0,1]
Y3=2, [1,10]

Instead of the beginning and ending numbers of -10 and 10, you may use any number to the left (right) of the specified Xmin (Xmax) in the viewing window.

In general, enter each branch of the function on a different Y= line followed by a comma. After the comma, enter the interval on which the branch is defined. Here are the Casio keystrokes for entering the above function.




Press to obtain the graph. If needed, adjust the window. The graph at right uses the settings Xmin:-3, max:3, scale:1 and Ymin:-2, max:5. scale:1. For convenience, press CTRL to toggle on and off the graph menu at the bottom of the screen.