engineering drawing

How to Graph Piecewise Functions on the TI-84

A piecewise function is a function with a split personality. It is one rule for x less than zero, a different rule for x between zero and two, and a third rule for x bigger than two. On paper, you draw it in pieces, and each piece only exists on its own interval. On the TI-84, you can do exactly the same thing, but the calculator needs you to tell it where each piece starts and stops, and it does that with a clever trick involving division by a true-or-false test. It sounds complicated, and the first time you see it, it looks like a typo, but once you understand the trick, piecewise functions take about two minutes. This guide shows you the trick, with a worked example you can copy.

What a Piecewise Function Is

A piecewise function is defined by different formulas on different parts of its domain. A common example is the function that is -x when x is less than 0, and x when x is 0 or more, which is just the absolute value function written out in pieces. Another common example is a function that charges a different price depending on how much you buy: the first 10 items cost 2 each, and every item after that costs 1.50 each, which is a piecewise function in real life. The key idea is the domain of each piece: each formula only applies on its own interval, and outside that interval it does not exist. On a graph, that means you draw each piece only on its interval, and the pieces may join up smoothly, or they may jump, leaving a gap. The TI-84 can graph all of that, but it needs the intervals written into the function itself, because the Y= editor has no separate box for the domain. The trick is to use a test that is 1 when the condition is true and 0 when it is false, and to divide by that test, so the piece disappears outside its interval.

Step-by-Step: Graph a Two-Piece Function

Let us graph a simple piecewise function: f(x) = x + 2 when x is less than 0, and f(x) = -x + 2 when x is 0 or more. That is a V shape, with its point at (0, 2). Here is how to enter it.

  1. Press Y= and clear any old functions.
  2. Move to Y1. Type the first piece, (X + 2), then a division sign, then an open bracket, then the condition, X < 0, then a close bracket.
  3. The full entry for Y1 should read (X + 2)/(X < 0). The condition X < 0 comes from the TEST menu, which you open with 2nd, MATH, and the < symbol is the first option there.
  4. Move to Y2. Type the second piece, (-X + 2), then a division sign, then an open bracket, then the condition, X >= 0, then a close bracket.
  5. The full entry for Y2 should read (-X + 2)/(X >= 0). The >= symbol is also in the TEST menu.
  6. Press ZOOM, then 6 for ZStandard.
  7. Press GRAPH. You should see a V shape, with the left arm coming from the first piece and the right arm from the second.

Why does this work? When x is less than 0, the test (X < 0) is true, and the calculator treats true as 1, so Y1 is (X + 2) divided by 1, which is just X + 2, and it draws. When x is 0 or more, the test is false, and the calculator treats false as 0, so Y1 is (X + 2) divided by 0, which is undefined, and the calculator does not draw it. The same thing happens in reverse for Y2. The division by a test is a switch that turns each piece on inside its interval and off outside it. It is a strange idea, but it is the standard way to graph piecewise functions on the TI-84, and it works for any number of pieces.

Step-by-Step: Graph a Three-Piece Function

Most textbook problems have three pieces, so let us do one. Suppose f(x) is 1 when x is less than -1, x squared when x is between -1 and 1, and 1 when x is bigger than 1. That is a flat line, a parabola in the middle, and a flat line again.

  1. Press Y= and clear the editor.
  2. Enter Y1 as (1)/(X < -1).
  3. Enter Y2 as (X^2)/((-1 <= X) and (X <= 1)). The word and comes from the TEST menu, under LOGIC, which is the right arrow from the TEST menu. It is option 1.
  4. Enter Y3 as (1)/(X > 1).
  5. Press ZOOM, 6 for ZStandard, then GRAPH.

The middle piece is the interesting one, because it needs two conditions at once: x is bigger than or equal to -1, and x is smaller than or equal to 1. The and in the test makes both conditions have to be true for the piece to draw. If you forget the and, and you just type (X^2)/(X <= 1), the middle piece will draw for all x less than 1, including the left-hand flat part, and the graph will be wrong. The and is the key to a middle piece, and it is worth learning where it lives in the menu, because you will use it in every three-piece problem. A useful check is to trace the graph and read the y-values: at x = -2, y should be 1, at x = 0, y should be 0, and at x = 2, y should be 1. If those three are right, your pieces are in the right places.

Evaluating a Piecewise Function at a Point

Graphing is only half the job. You also need to find the value of a piecewise function at a particular x, and the calculator can do that too, but you have to be careful, because the division trick makes the function undefined outside each piece’s interval, and the calculator will give you an error if you ask for a value in the wrong piece. The safe way is to use the value function from the CALC menu, or to type the piece directly on the home screen. To find f(2) for our three-piece example, the answer is 1, because 2 is bigger than 1, so it is in the third piece. On the home screen, type 1/(2 > 1) and press ENTER, and you get 1. To find f(0), which is in the middle piece, type 0^2/((-1 <= 0) and (0 <= 1)) and you get 0. That is a lot of typing, and in practice it is easier to work out which piece the x-value belongs to on paper, and then type just that piece’s formula with the x-value in it. The calculator’s job is the graph, and your job is to pick the right piece, and together they give you the answer. If a question asks for f(-1), which is on a boundary, check the definition: if the middle piece includes -1, because it says -1 <= x, then f(-1) is (-1) squared, which is 1. Boundaries matter in piecewise functions, so read the <= and < signs carefully.

Common Mistakes and How to Fix Them

The most common mistake is forgetting the brackets around the test, so the calculator divides by the wrong thing. Always put the whole test in brackets: (X + 2)/(X < 0), not (X + 2)/X < 0. The second mistake is using the wrong inequality sign, so a piece draws on the wrong interval. Check the signs against the definition. The third mistake is forgetting the and in a middle piece, so it draws on too much of the graph. The fourth mistake is typing the < symbol from the wrong place. The < symbol for a test comes from the TEST menu, 2nd, MATH, not from the keypad, and if you type it from the wrong place you will get a syntax error. And the fifth mistake is leaving the pieces in Y1, Y2, and Y3 when you move on to the next problem, so they draw over your new graph. Clear the Y= editor before you start a new problem, every time. Piecewise functions are fiddly, but they are fiddly in a predictable way, and once you have made each of these mistakes once, you will stop making them.

Frequently Asked Questions

How do I graph a piecewise function on the TI-84? Enter each piece in Y1, Y2, and so on, divided by its condition in brackets, for example Y1 = (X + 2)/(X < 0). The division by the test turns each piece on inside its interval and off outside it.

Where is the less than symbol on the TI-84? Press 2nd, then MATH to open the TEST menu. The < symbol is option 5, and >= is option 4. The word and is in the LOGIC submenu, reached with the right arrow.

Why is my piecewise graph drawing in the wrong place? Check the inequality signs and the brackets around each test. A missing bracket or a flipped sign will move a piece to the wrong interval.

How do I find f(2) for a piecewise function? Work out which piece 2 belongs to, then type that piece’s formula with 2 in place of x. Or use TRACE on the graph to read the y-value at x = 2.

Can I graph a piecewise function with more than three pieces? Yes. Use Y1, Y2, Y3, and so on, one for each piece, each divided by its condition. The TI-84 has ten Y variables, so you can have up to ten pieces.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *