TC3 → Stan Brown → TI-83/84/89 → Piecewise Functions
revised 4 Oct 2008

# Graphing Piecewise Functions on TI-83/84

Summary: You can graph piecewise functions on your TI-83/84 by using the TEST menu. To show the method, we’ll graph the function

which is read “f of x equals x²+11 for x<0, 11−4x for x between 0 and 2 inclusive, and x²−3x+5 for x>2.” This particular function, as you’ll see, doesn't have any gaps in it, but exactly the same technique works for piecewise functions that do have gaps.

See also: Graphing Functions on TI-83/84

## Set-up: Dot Mode

 The TI-83/84 likes to connect dots with continuous lines or curves where it can. But a piecewise function could have gaps legitimately, and therefore you want to select dot mode.   The TI-83 and TI-84 MODE screens are slightly different, but the settings are the same. [`MODE`] [`▼` 4 times] [`►`] [`ENTER`]

(You may need to switch between dot mode and connected mode, depending on the functions you’re graphing, because a function with a steeply sloping graph will be hard to see in dot mode.)

## Enter the Function

The general form you’re going for is

(first piece)(first condition)+(second piece)(second condition)+...

This works because in the TI programming language a true condition is equivalent to a 1 and a false condition to a zero. Therefore each branch of the function is turned on (multiplied by 1) in the proper region and turned off (multiplied by 0) everywhere else.

You can have as many (piece)(condition) pairs as it takes to define the function, and you always need the parentheses around each piece and around each condition. If you have a compound condition like 0 ≤ x ≤ 2, you can use [`2nd` `MATH` makes `TEST`] [`►`] [`1`] to create an and condition, or code the two conditions inparentheses and multiply them.

For our sample function, you want to get this onto the `Y=` screen:

`Y1=(x²+11)(x<0)+(11−4x)(0≤x and x≤2)+(x²−3x+5)(x>2)`

or

`Y1=(x²+11)(x<0)+(11−4x)(0≤x)(x≤2)+(x²−3x+5)(x>2)`

You already know how to do all of that except the inequality signs in the tests, and as you’ll see, that’s pretty easy.

 Clear any previous plots. (Review this on the general graphing page if you need to.) [`Y=`] and deactivate anything that’s highlighted. Enter the first branch of the function definition, (x²+11). On the `Y=` screen, cursor to one of the `Y=` lines. Press [`CLEAR`] if necessary, and enter the first piece in parentheses: [`(`] [`x,T,θ,n`] [`x²`] [`+`] 11 [`)`] Enter the test, (x<0). Press [`(`] [`x,T,θ,n`] [`2nd` `MATH` makes `TEST`] [`5`] 0 [`)`] Enter the second branch of the function definition, (11−4x). [`+`] [`(`] 11 [`−`] 4 [`x,T,θ,n`] [`)`] Enter the second test, (0 ≤ x ≤ 2). You can code this either as the product of two tests, (0≤x)(x≤2), or with an and condition, (0≤x and x≤2). The first way saves a couple of keystrokes, so that’s what I’ll do. [`(`] 0 [`2nd` `MATH` makes `TEST`] [`6`] [`x,T,θ,n`] [`)`] [`(`] [`x,T,θ,n`] [`2nd` `MATH` makes `TEST`] [`6`] 2 [`)`] Enter a plus sign and the last branch of the function, (x²−3x+5). [`+`] [`(`] [`x,T,θ,n`] [`x²`] [`−`] 3 [`x,T,θ,n`] [`+`] 5 [`)`] Enter the last test, (x>2). [`(`] [`x,T,θ,n`] [`2nd` `MATH` makes `TEST`] [`3`] 2 [`)`]

## Display the Graph

It’s often helpful to start with [`ZOOM`] [`6`], standard zoom, and then adjust the window. This particular function, I think, is a little easier to visualize with the window parameters shown.

You can zoom, trace, and find values and intercepts just as you would do for any other function.

See the general graphing page for common problems.

One particular problem with piecewise functions is that the TI-83/84 may try to connect the pieces. Make sure you are in dot mode, not connected mode: look on the Y= screen for three dots to the left of your equation.

## What’s New

• 4 Oct 2008: change the function from two to three parts, to illustrate all three types of conditions; explain how it works; explain compound conditions; add TI-84 mode screen
• 26 Oct 2007: clarify TI-83/84 keystrokes involving the [`2nd`] key
• (various formatting improvements, suppressed)
• 31 Mar 2003: new document

This page is used in instruction at Tompkins Cortland Community College in Dryden, New York; it’s not an official statement of the College. Please visit www.tc3.edu/instruct/sbrown/ to report errors or ask to copy it.

For updates and new info, go to http://www.tc3.edu/instruct/sbrown/ti83/