To graph a piecewise-defined function, each piece of the function along with the x-interval for which the piece is defined must be entered into the equation editor, which is accessed by pressing .

For example, observe the procedure for entering the 3-piece function below.

The following nested **when** statement is needed to plot the piecewise-defined
function. **when** may be typed in or accessed by pressing
.

The inner **when** statement graphs
when and
otherwise. The
outer **when** statement graphs the first graph for
and otherwise.

Once the **when** statement is entered, Press .

Notice that the function is displayed in "pretty print". This feature puts the function in a form that makes it easier to check that the function has been entered correctly.

To prevent the different pieces from being connected as the function is being graphed, check that the function is highlighted, then press and select DOT.

Adjust the viewing window (if necessary) and press to see the graph.