Graphing Piecewise Functions
Learning Outcomes
- Write a piecewise function given an application
- Graph a piecewise function using domain

How To: Given a piecewise function, sketch a graph
- Indicate on the x-axis the boundaries defined by the intervals on each piece of the domain.
- For each piece of the domain, graph the corresponding equation on that interval. Do not graph two functions over one interval because it would violate the criteria of a function.
Example
Sketch a graph of the function and state its domain and range. Given the piecewise definitionAnswer:
First, graph the line erasing the part where x is greater than . Place an open circle at .
Now place the line on the graph starting at the point where . Note that for this portion of the graph the point is included so you can remove the open circle.
Notice the two pieces of the graph meet at the point . This will not be the case for all piecewise functions.
The domain of this function is all real numbers because is not included as the endpoint of , but it is included as the endpoint for .
The range of this function starts at and includes , and goes to infinity, so we would write this as .
Example
An on-line comic book retailer charges shipping costs of $2.50 plus an additional $1.50 for every comic book purchased for up to 14 books, but if 15 or more comic books are purchased then shipping is free. The following formula represents the cost of shipping, where n is the number of comic books: Draw a graph of the cost function.Answer:
First, draw the line . We can use transformations: this is a vertical stretch by a factor of and a vertical shift by .
Now we can eliminate the portions of the graph that are not in the domain. This leaves us with the portion of the graph at .
Last, add the constant function for inputs greater than or equal to . Place closed dots on the ends of the graph to indicate the inclusion of the endpoints.