Use Sophia to knock out your gen-ed requirements quickly and affordably. Learn more
×

Graph Piecewise Functions

Author: Sophia

what's covered
In this lesson, you will graph piecewise functions. Specifically, this lesson will cover:

Table of Contents

1. Graphing a Function on a Restricted Domain

When we graph a function, we are considering the entire function. What if we only wanted part of the graph?

EXAMPLE

For example, consider the function f open parentheses x close parentheses equals x squared comma and several “pieces” of the graph, as shown below:

Graph 1: bold italic f open parentheses bold x close parentheses bold equals bold italic x to the power of bold 2 (entire graph) Graph 2: bold italic f open parentheses bold x close parentheses bold equals bold italic x to the power of bold 2 bold comma bold space bold italic x bold greater or equal than bold 1
Graph 3: bold italic f open parentheses bold x close parentheses bold equals bold italic x to the power of bold 2 bold comma bold space bold short dash bold 1 bold less or equal than bold italic x bold less than bold 2 Graph 4: bold italic f open parentheses bold x close parentheses bold equals bold italic x to the power of bold 2 bold comma bold space bold italic x bold less or equal than bold 0

To sketch a portion of the graph, a restricted domain is used. Recall that the domain of a function is the set of all possible inputs for a function.

For example, in Graph 3 above, the “ short dash 1 less or equal than x less than 2 ” is the domain restriction since it is not the entire domain of f open parentheses x close parentheses equals x squared (which is all real numbers).

hint
When an endpoint is included, we represent it by using a closed circle. See Graphs 2, 3, and 4.

When an endpoint is not included, we represent it by using an open circle. See Graph 3.

try it
Consider the following function: f open parentheses x close parentheses equals 2 x plus 1 comma space x less or equal than 4.
Graph this function.
Remembering that y equals 2 x plus 1 is a line with slope 2 and y-intercept 1, we graph the line but only for values of x up to and including 4.

term to know
Restricted Domain
Part of, but not the entire, domain of a function.


2. Graphing Piecewise Functions

A piecewise function is made up of other functions that are on restricted domains. For example, consider the function:

f open parentheses x close parentheses equals open curly brackets table attributes columnalign left center end attributes row cell x plus 1 end cell cell i f space x less than 2 end cell row cell 2 x minus 3 end cell cell i f space x greater or equal than 2 end cell end table close

The function tells us to use “x plus 1”, but only if the input is less than 2; and to use “2 x minus 3” if the input is at least 2.

This means that the graph of the function will be “part of” the graph of y equals x plus 1 along with “part of” the graph of 2 x minus 3. Here is how we put this together:

bold italic y bold equals bold italic x bold plus bold 1 bold comma bold space bold italic x bold less than bold 2 bold italic y bold equals bold 2 bold italic x bold minus bold 3 bold comma bold space bold italic x bold greater or equal than bold 2

The graph of f open parentheses x close parentheses is these pieces put together on one graph as follows:

watch
The following video walks you through the process of graphing a piecewise function.

hint
A common mistake when graphing piecewise functions is to graph each function entirely instead of considering the domains.

Consider the function f open parentheses x close parentheses equals open curly brackets table attributes columnalign left center end attributes row cell x plus 1 end cell cell if space x less than 2 end cell row cell 2 x minus 3 end cell cell if space x greater or equal than 2 end cell end table close

If you were to graph y equals x plus 1 and y equals 2 x minus 3 on the same axes, you would have this picture.



We know this can’t be the graph of the piecewise function, since this graph fails the vertical line test.

The moral of the story is – pay attention to the domain restrictions, including when an endpoint is open vs. closed. It’s important that the graph you produce is a function, meaning it passes the vertical line test.

summary
In this lesson, you recalled that when you graph a function, you consider the entire function. However, if you only want part of the graph, you learned how to graph a function on a restricted domain, which is part of, but not the entire, domain of a function. You learned how to apply this knowledge to graphing piecewise functions—which are made up of other functions that are on restricted domains—which requires you to graph each piece on their respective restricted domains of the function.

Source: THIS TUTORIAL HAS BEEN ADAPTED FROM CHAPTER 0 OF "CONTEMPORARY CALCULUS" BY DALE HOFFMAN. ACCESS FOR FREE AT WWW.CONTEMPORARYCALCULUS.COM. LICENSE: CREATIVE COMMONS ATTRIBUTION 3.0 UNITED STATES.

Terms to Know
Restricted Domain

Part of, but not the entire, domain of a function.