In mathematics, a piecewise function is a function in which more than one formula is used to define the output over different pieces of the domain. Piecewise functions are defined using the common functional notation, where the body of the function is an array of functions and associated intervals. We use piecewise functions to describe situations in which a rule or relationship changes as the input value crosses certain “boundaries.”
Graphing Piecewise Functions
Example 1: Consider the piecewise definition of the absolute value function:
For all
For all values of
After finding and plotting some ordered pairs for all parts ("pieces") of the function the result is the V-shaped curve of the absolute value function below.
Absolute Value Graph: Piecewise Function
The piecewise function,
Example 2: Graph the function and determine its domain and range:
Start by choosing values for
Substitute those values into the first part of the piecewise function
Those points satisfy the first part of the function and create the following ordered pairs:
For the middle part (piece),
For the last part (piece),
Now graph all the ordered pairs:
Piecewise Function
The piecewise function
Notice the open and closed circles in the graph. This has to do with the specific domains for each part of the function. An open circle at the end of an interval means that the end point is not included in the interval, i.e. strictly less than or strictly greater than. A closed circle means the end point is included (equal to).
The domain of the function starts at negative infinity and continues through each piece, without any gaps, to positive infinity. Since there is an closed AND open dot at
The range begins at the lowest