Other types of linear functions that are not strictly increasing, decreasing, or constant may be needed to model a context. In this lesson, we will use what we know about graphing linear functions and key features of graphs to extend to new types of function: piecewise functions, absolute value functions, and step funcitons.
Sometimes more than one linear equation is needed to create a linear model for a given situation. Piecewise graphs are formed by two or more functions on restricted domains.
In a piecewise-defined function, a domain is given for each equation.
Consider the following linear piecewise function: f(x) = \begin{cases} x+2, & x \leq 0 \\ \dfrac{1}{2}x+5, & 0<x<3 \\ -x-1, & x \geq 3 \end{cases}
Consider the following linear piecewise function: f(x) = \begin{cases} \dfrac{3}{4}x-2, & x < -2 \\ 1, & -2 \leq x < 4 \\ x + 3, & x \geq 4 \end{cases}
Evaluate the function at f(-4), f(-2), f(0), and f(4).
Graph the piecewise function.
Describe the key features of the function graphed in part (b).
Write the piecewise-defined function based on the graph shown:
The domain of a piecewise function is visible in both the piecewise-defined function and the graph itself.
An absolute value function is a function that contains a variable expression inside absolute value bars; a function of the form f\left(x\right) = a\left|x - h\right| + k, where a, h and k are constants.
Let's consider the absolute value function f\left(x\right)=\left|x\right|. This looks similar to the linear function f\left(x\right)=x but with absolute value signs. We know that f\left(x\right)=x represents a straight line through the origin on the coordinate plane.
Recall that absolute value represents the distance from zero, which is always positive. So, outputs for negative input values will be positive, as shown in the table and on the diagram below. Notice that this occurs at the x-intercept of the graph of f\left(x\right)=x.
Table of values:
x | -2 | -1 | 0 | 1 | 2 |
---|---|---|---|---|---|
f\left(x\right)=\left|x\right| | 2 | 1 | 0 | 1 | 2 |
Graph:
We can think of absolute value functions as being defined by two functions: one for values of x that would make the original function positive and another for values of x that make the original function negative.
So, f\left(x\right)=\left|x\right| can be redefined as:
f(x)= \begin{cases} -x, &x<0 \\x, &x \geq 0 \end{cases}
Consider the function f\left(x\right) = \left|3x - 6 \right|.
x | 0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
f\left(x\right) |
Complete the table of values for this function.
State the minimum and the y-intercept of the function.
Sketch a graph of the function.
Write the absolute value function as a piecewise-defined function.
Absolute value functions can be rewritten as piecewise-defined functions made up of two linear functions that split at the vertex.
f\left(x\right)=\left|x\right| can be redefined as:
f\left(x\right)= \begin{cases} -x, x<0 \\x, x \geq 0 \end{cases}
A step graph is a type of function that takes constant values over intervals on the x-axis. Because of this, the graph doesn't change gradually but has distinct "steps".
A parking lot charges the following fees for the first hour of parking:
If a car is in the lot for 20 minutes, how much will they be charged?
Explain the meaning of the y-intercept in context.
Explain why a person who parks for 15 minutes is not charged \$4 for parking.
If \$24 is charged for parking from 1 hour up to 3 hours and \$34 is charged for parking from 3 hours up to 4 hours, draw the rest of the graph that displays charges for up to 4 hours of parking.
Create a step graph for the charge for sending parcels, where the vertical axis is in dollars:
Maximum weight (lbs.) | Charge per item |
---|---|
0.5 | \$2.50 |
3 | \$4.25 |
5 | \$7.75 |
The value of a step function will be the same for an interval of x, giving it the look of a staircase.