Piecewise - 89

Home Up

There are two ways that piecewise functions can been graphed in your calculator. 

bulletIn method 1 you will enter all the equations in the same y-slot on your calculator.
bulletIn method 2 you will enter the equations in several y-slots on your calculator.

Method 1

bullet

A Two Part Piecewise Function

Let's suppose we want to graph 

You will type in the following

y1=sin(x)|x<0 and y2=-x|x≥0

Notice this statement is saying that when x<0 we want it to graph y =sin x but when the (or x>0 is false) we want it to graph y = -x.

Then when we view the graph we get

bullet

A Three Part Piecewise Function

To enter the triple piecewise function in the TI-89 you will use three equations slots.    

Suppose you want to enter

You will need to enter the following in one of your function slots:

y1=3sin(x)|x≤-π

y2 = -3(x+π)|x≥-π and x≤0

y3=3x2-3x|x>0

Notice this statement takes three equations slots.

When you enter these equations and then graph it in a standard window you will see:

Sometimes you will want to put you graph in dot mode so you don't view the vertical segments connecting the various parts of the equation together.  This was not necessary in this example since the pieces were all connected.

NOTE:  If the piecewise function also involves addition restricted domain values you may wish to let you window cut off the additional x values such as

.

You could write the same nested when statement, but just set up the window to begin at and end at .  This would basically graph the required function.

 

Method 2

To enter a piecewise function in the TI-89 we use the when statement.  

The general form for a piecewise function is 

 y = when (condition, TrueExpression, FalseExpression)

bullet

A Two Part Piecewise Function

Let's suppose we want to graph 

We would write:

Notice this statement is saying that when x<0 we want it to graph y =sin x but when the (or x>0 is false) we want it to graph y = -x.

Then when we view the graph we get

bullet

A Three Part Piecewise Function

To enter the triple piecewise function in the TI-89 you will also use the When statement.  But it will have to be nested.  

Suppose you want to enter

You will need to enter the following in one of your function slots:

Notice this statement is nested.  

The first condition is when .  (This is really part of the the condition on the second line )  

The next part of the when statement is another when statement describing another 

condition, 
True Expression, and 
False Expression.  

So when and when ( or really only when ) the calculator is to graph y=3 sin x. 

When but not when (this mean that ), the calculator will graph .  

This completes the inside part of the nested equation.  

The calculator now will graph when x>0

The calculator will print: 

When you enter this equation and then graph it in a standard window you will see:

Sometimes you will want to put you graph in dot mode so you don't view the vertical segments connecting the various parts of the equation together.  This was not necessary in this example since the pieces were all connected.

NOTE:  If the piecewise function also involves addition restricted domain values you may wish to let you window cut off the additional x values such as

.

You could write the same nested when statement, but just set up the window to begin at and end at .  This would basically graph the required function.

 

rev.06/23/2009

© Rahn 2000