"

6 Algebra Tips and Tricks Part II (Piecewise Defined Functions)

Piecewise Defined Functions

Graph the following function

g(x)={x1x212x1x>2

How do you do it? Well, you have to graph two different lines: y1=x1 and y2=12x1:
Shows two lines for the purpose of graphing a piecewise-defined function

But then you need to “cut off” the graph of y1 after x=2, and “cut off” the graph of y2 before x=2:

Take the previous image and cuts off each line in the appropriate spot to graph the piecewise defined function

That’s the graph of g(x)! It is called a piecewise defined function. Since each piece is linear, sometimes it is called a piecewise linear function.

There is one more detail to clear up. What is the value of the function at x=2?

Well, going back to the original function, we see that g(x) was defined as x1 for x2, and this includes x=2. So we should use the blue line to determine the y-coordinate for x=2. To indicate this on the graph, a filled in dot can be added to the blue graph (indicating the endpoint is included), and an open or not-filled-in dot is added to the green graph (to indicate the endpoint is not included).

Shows filled-in dots represents the endpoint is included, and an open dot represents the opposite.

License

Icon for the Creative Commons Attribution 4.0 International License

Informal Calculus Copyright © by Tyler Seacrest is licensed under a Creative Commons Attribution 4.0 International License, except where otherwise noted.