Step-by-step math courses covering Pre-Algebra through Calculus 3.
How to graph a piecewise function and write its equation from a graph
A piecewise function can change rules when we cross a certain x-value. Let’s look at what happens on either side of that value and use the open and filled dots to decide what happens right at it.
Match each rule to the x-values where it applies
Read each row as an instruction. Use the expression on the left when satisfies the condition on the right. A strict inequality leaves the endpoint out. A condition that includes equality assigns the value at the endpoint.
Draw the parabola only to the left of . It approaches . Draw the line only to the right of . It approaches . Mark those endpoints with open circles, then fill in the dot at because .
At x = 3 only the filled dot, (3, 8), is part of the graph.
Read a rule from each piece of a continuous graph
The middle line joins the horizontal pieces at (−2, −3) and (2, 2).
The left piece stays at and the right piece stays at . Between them, the line rises from to . Its slope is the change in over the change in .
Substitute into to get , so . Let the middle rule include both endpoints. It gives the same heights where it meets the two horizontal pieces.
Read the separate value at a jump
The open circles mark the endpoints each branch approaches. The filled dot gives f(2) = 8.
The left piece follows the basic parabola . It passes through and approaches . The right piece approaches and passes through . Use those two points to find the slope of the right-hand line, even though its endpoint is open.
Using gives , so the line is . At use the filled point for the function value.