Algebra 2Functions and Linear Systems2 of 3
Functions and Linear Systems · 2

Piecewise and Absolute Value Functions

Sometimes a single equation isn't enough because the math rule changes depending on the number we plug in.

1

What a Piecewise Function Is and How to Evaluate It

A piecewise function uses different rules in different xx-zones, separated by a border. Here is a function whose rule changes at the border x=1\border{x = 1}, and we want to find f(3)f(3), f(−2)f(-2), and f(1)f(1):

f(x)={x+2⏟ruleif x<1⏟zone2x−3if x≥1\displaystyle f(x) = \begin{cases} \underbrace{\first{x + 2}}_{\text{rule}} & \text{if } \underbrace{\first{x < 1}}_{\text{zone}} \\ \second{2x - 3} & \text{if } \second{x \ge 1} \end{cases}
What a Piecewise Function Is and How to Evaluate It
−2-2
−1-1
00
22
33
44
1\border{1}
f(−2)=  ?f(-2) = \;?
f(1)=  ?f(1) = \;?
f(3)=  ?f(3) = \;?
Text solution
Right of the border (x=3x = 3)Since 3≥1\second{3 \ge 1}, the input 33 belongs to the bottom zone, so we ignore the top rule and plug 33 into the bottom rule.
f(3)\displaystyle f(3) =2(3)−3\displaystyle = \second{2(3) - 3} =6−3\displaystyle = 6 - 3 =3\displaystyle = 3
Left of the border (x=−2x = -2)Since −2<1\first{-2 < 1}, the input −2-2 falls in the top zone, so we plug it into the top rule.
f(−2)\displaystyle f(-2) =−2+2\displaystyle = \first{-2 + 2} =0\displaystyle = 0
On the border (x=1\border{x = 1})The bottom inequality has the "or equal to" bar (x≥1\second{x \ge 1}), which means the border value 1\border{1} belongs to the bottom rule.
f(1)\displaystyle f(1) =2(1)−3\displaystyle = \second{2(1) - 3} =2−3\displaystyle = 2 - 3 =−1\displaystyle = -1
2

Writing a Piecewise Function from a Word Problem

Now let's build the curly-bracket equation ourselves from a real-life cutoff: a t-shirt shop charges $15\first{\$15} per shirt for up to 10\border{10} shirts and $10\second{\$10} per shirt for more than 10\border{10} shirts, and we want to write the cost function C(x)C(x) for xx shirts and find the cost of 88, 1010, and 1111 shirts.

Writing a Piecewise Function from a Word Problem
x\htmlClass{lc-mute}{x}
00
55
1010
1515
up to 10 shirts$15 each\begin{array}{c}\text{up to } \border{10} \text{ shirts}\\[-2pt]\first{\$15} \text{ each}\end{array}
more than 10 shirts$10 each\begin{array}{c}\text{more than } \border{10} \text{ shirts}\\[-2pt]\second{\$10} \text{ each}\end{array}
C(x)=  ?C(x) = \;?
Text solution
Up to the border (0<x≤10\first{0 < x \le 10})Buying 1010 or fewer shirts costs $15\first{\$15} per shirt, and the ≤\le bar includes the border of 10\border{10} shirts in this first zone.
C(x)\displaystyle C(x) =15xif 0<x≤10\displaystyle = \first{15x} \quad \text{if } \first{0 < x \le 10}
Past the border (x>10\second{x > 10})Buying more than 10\border{10} shirts drops the price to $10\second{\$10} per shirt, which gives the second row of our piecewise function.
C(x)={15xif 0<x≤1010xif x>10\displaystyle C(x) = \begin{cases} \first{15x} & \text{if } \first{0 < x \le 10} \\ \second{10x} & \text{if } \second{x > 10} \end{cases}
Evaluate at 88, 1010, and 1111 shirtsBoth 88 and the border value 10\border{10} fall in 0<x≤10\first{0 < x \le 10}, while 1111 falls in x>10\second{x > 10}, making 1111 shirts cheaper than 88.
C(8)=15(8)=$120C(10)=15(10)=$150C(11)=10(11)=$110\displaystyle \begin{aligned} C(8) &= \first{15(8)} = \$120 \\ C(10) &= \first{15(10)} = \$150 \\ C(11) &= \second{10(11)} = \$110 \end{aligned}
3

Graphing a Piecewise Function

Next, we want to draw the graph of our first piecewise function by finding where each line meets the vertical border at x=1\border{x = 1}:

f(x)={x+2if x<12x−3if x≥1\displaystyle f(x) = \begin{cases} \first{x + 2} & \text{if } \first{x < 1} \\ \second{2x - 3} & \text{if } \second{x \ge 1} \end{cases}
Graphing a Piecewise Function
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
−2-2
22
44
−2-2
22
44
66
y=x+2\first{y = x + 2}
y=2x−3\second{y = 2x - 3}
x=1\border{x = 1}
Text solution
Left endpoint on the border (x=1\border{x = 1})Plug the border x=1\border{x = 1} into the left rule x+2\first{x + 2} to see where that line stops, and mark it with an open circle because x<1\first{x < 1} comes right up to 11 without touching it.
1+2\displaystyle \first{1 + 2} =3  ⟹  open circle at (1,3)\displaystyle = 3 \implies \text{open circle at } \first{(1, 3)}
Draw the left ray (x<1\first{x < 1})Because we are drawing to the left of the border, use the slope of 1\slope{1} from (1,3)\first{(1, 3)} by going down 1\slope{1} and left 1\slope{1}.
(1,3)→down 1, left 1(0,2)→down 1, left 1(−1,1)\displaystyle \begin{aligned} \first{(1, 3)} &\xrightarrow{\slope{\text{down } 1,\text{ left } 1}} \first{(0, 2)} \\ &\xrightarrow{\slope{\text{down } 1,\text{ left } 1}} \first{(-1, 1)} \end{aligned}
Right endpoint and ray (x≥1\second{x \ge 1})Plug x=1\border{x = 1} into the right rule 2x−3\second{2x - 3} for a closed dot (since x≥1\second{x \ge 1} includes the border), then follow the slope of 2\slope{2} up 2\slope{2} and right 1\slope{1}.
2(1)−3=−1  ⟹  closed dot at (1,−1)→up 2, right 1(2,1)→up 2, right 1(3,3)\displaystyle \begin{aligned} \second{2(1) - 3} &= -1 \\ &\implies \text{closed dot at } \second{(1, -1)} \\ &\xrightarrow{\slope{\text{up } 2,\text{ right } 1}} \second{(2, 1)} \\ &\xrightarrow{\slope{\text{up } 2,\text{ right } 1}} \second{(3, 3)} \end{aligned}

At the vertical border x=1\border{x = 1}, we keep only the left part of y=x+2y = \first{x + 2} (ending in an open circle) and the right part of y=2x−3y = \second{2x - 3} (starting at a closed dot), so every xx-value has a single output.

Moving the border doesn't move the two lines, only where they get trimmed and which dot counts on the border.
4

Graphing a Step Function

What if the rules inside a piecewise function have no xx in them and are just flat numbers? A piecewise function made of constant rules is a step function, because each piece has slope 0\slope{0} and graphs as a flat horizontal segment. Here is the cost of a parking garage that charges a flat $5\first{\$5} for up to 1\border{1} hour, $10\second{\$10} for more than 1\border{1} hour up to 2\border{2} hours, and $15\third{\$15} for more than 2\border{2} hours up to 33 hours:

f(x)={5if 0<x≤110if 1<x≤215if 2<x≤3\displaystyle f(x) = \begin{cases} \first{5} & \text{if } \first{0 < x \le 1} \\ \second{10} & \text{if } \second{1 < x \le 2} \\ \third{15} & \text{if } \third{2 < x \le 3} \end{cases}
Graphing a Step Function
00
11
22
33
hours\text{hours}
$5\first{\$5}
$10\second{\$10}
$15\third{\$15}
Text solution
First step (0<x≤1\first{0 < x \le 1})Draw a flat segment at height 5\first{5} from an open circle at x=0x = 0 (since 0<x\first{0 < x}) to a closed dot at x=1\border{x = 1} (since x≤1\first{x \le 1}).
open circle at (0,5)⟶closed dot at (1,5)\displaystyle \text{open circle at } \first{(0, 5)} \longrightarrow \text{closed dot at } \first{(1, 5)}
Second step (1<x≤2\second{1 < x \le 2})Past 1\border{1} hour, jump up to height 10\second{10} from an open circle at x=1\border{x = 1} to a closed dot at x=2\border{x = 2}.
open circle at (1,10)⟶closed dot at (2,10)\displaystyle \text{open circle at } \second{(1, 10)} \longrightarrow \text{closed dot at } \second{(2, 10)}
Third step (2<x≤3\third{2 < x \le 3})Past 2\border{2} hours, jump up to height 15\third{15} from an open circle at x=2\border{x = 2} to a closed dot at x=3x = 3.
open circle at (2,15)⟶closed dot at (3,15)\displaystyle \text{open circle at } \third{(2, 15)} \longrightarrow \text{closed dot at } \third{(3, 15)}
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
55
1010
1515
1\border{1}
2\border{2}
33
5

Writing a Piecewise Equation from a Graph

Now let's go in reverse: we are given a piecewise graph and want to write its curly-bracket equation.

x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
(0,3)\first{(0, 3)}
(2,1)\first{(2, 1)}
(2,4)\second{(2, 4)}
(3,6)\second{(3, 6)}
(4,8)\second{(4, 8)}
x=2\border{x = 2}

Each piece is part of a straight line y=mx+by = \slope{m}x + b, where m\slope{m} is the rise-over-run slope between two points and bb is the yy-intercept where the line crosses the yy-axis (x=0x = 0).

Writing a Piecewise Equation from a Graph
f(x)={  ?  if   ?    ?  if   ?  \displaystyle f(x) = \begin{cases} \first{\;?\;} & \text{if } \first{\;?\;} \\[4pt] \second{\;?\;} & \text{if } \second{\;?\;} \end{cases}
Text solution
Read the border and zonesBoth endpoints line up vertically at x=2\border{x = 2}, with a closed dot on the left piece and an open circle on the right piece.
left zone: x≤2,right zone: x>2\displaystyle \text{left zone: } \first{x \le 2}, \qquad \text{right zone: } \second{x > 2}
Find the left line (x≤2\first{x \le 2})From (0,3)\first{(0, 3)} to (2,1)\first{(2, 1)} the line goes down 2\slope{2} and right 2\slope{2}, and it crosses the yy-axis directly at (0,3)\first{(0, 3)}.
m\displaystyle \slope{m} =−22\displaystyle = \frac{-2}{2} =−1,b\displaystyle = \slope{-1}, \quad b =3  ⟹  y\displaystyle = 3 \implies y =−x+3\displaystyle = \first{-x + 3}
Trace the right line back to the yy-axis (x>2\second{x > 2})From (2,4)\second{(2, 4)} to (3,6)\second{(3, 6)} the slope is 2\slope{2} (up 2\slope{2}, right 1\slope{1}), so we extend that line from (2,4)\second{(2, 4)} by going left 1\slope{1} and down 2\slope{2} until we hit x=0x = 0.
(2,4)→left 1, down 2(1,2)→left 1, down 2(0,0)  ⟹  b=0,y=2x\displaystyle \begin{aligned} \second{(2, 4)} &\xrightarrow{\slope{\text{left } 1,\text{ down } 2}} \second{(1, 2)} \\ &\xrightarrow{\slope{\text{left } 1,\text{ down } 2}} \second{(0, 0)} \\ &\implies b = 0, \quad y = \second{2x} \end{aligned}
Combine the piecesPair each line's rule with its zone.
f(x)={−x+3if x≤22xif x>2\displaystyle f(x) = \begin{cases} \first{-x + 3} & \text{if } \first{x \le 2} \\ \second{2x} & \text{if } \second{x > 2} \end{cases}
6

Absolute Value as a Piecewise Function and How to Graph It

What happens when two pieces don't jump apart at the border, but meet at the exact same point to form a sharp corner? The parent absolute value function f(x)=∣x∣f(x) = |x| is a piecewise function with a border at x=0\border{x = 0}: it leaves positive numbers alone (y=xy = \first{x}) and multiplies negative numbers by −1-1 to make them positive (y=−xy = \second{-x}):

∣x∣={xif x≥0−xif x<0\displaystyle |x| = \begin{cases} \first{x} & \text{if } \first{x \ge 0} \\ \second{-x} & \text{if } \second{x < 0} \end{cases}

When we shift and stretch that V-shape into

y=a⏟right branchslope ∣x−h∣+k(a≠0),with vertex (h,k)\displaystyle \begin{aligned} y &= \underbrace{\slope{a}}_{\begin{gathered}\scriptstyle\text{right branch} \\ \scriptstyle\text{slope}\end{gathered}}\,|x - \border{h}| + \border{k} \quad (\slope{a} \ne 0), \\ & \text{with vertex } \border{(h, k)} \end{aligned}

the corner (vertex) sits at the border where the inside of the bars equals zero. Let's use the vertex and the slope a\slope{a} in front to graph y=∣x−3∣+2y = |x - \border{3}| + \border{2}, y=2∣x−3∣+2y = \slope{2}|x - \border{3}| + \border{2}, and y=−2∣x−3∣+2y = \slope{-2}|x - \border{3}| + \border{2}.

Absolute Value as a Piecewise Function and How to Graph It
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
−4-4
−2-2
22
44
66
22
44
66
y=∣x−3∣+2y=2∣x−3∣+2y=−2∣x−3∣+2\begin{alignedat}{2} y &= {}& &|x - \border{3}| + \border{2} \\ y &= {}& \slope{2}&|x - \border{3}| + \border{2} \\ y &= {}& \slope{-2}&|x - \border{3}| + \border{2} \end{alignedat}
y=∣x∣y = |x|
Text solution
Set the inside to zero for the vertexThe inside expression x−3x - 3 equals zero when x=3\border{x = 3}, which leaves the outside number 2\border{2} as the yy-value of the vertex.
x−3=0  ⟹  x=3,y=2∣3−3∣+2=2  ⟹  vertex at (3,2)\displaystyle \begin{aligned} x - 3 &= 0 \implies x = \border{3}, \\ y &= \slope{2}|3 - \border{3}| + \border{2} = \border{2} \\ &\implies \text{vertex at } \border{(3, 2)} \end{aligned}
Step out with positive a\slope{a} (y=2∣x−3∣+2y = \slope{2}|x - \border{3}| + \border{2})With a=2\slope{a = 2}, go up 2\slope{2} and over 1\slope{1} in both directions from the vertex (3,2)\border{(3, 2)} so the V stays symmetric.
(3,2)→up 2, right 1(4,4),(3,2)→up 2, left 1(2,4)\displaystyle \begin{aligned} \border{(3, 2)} &\xrightarrow{\slope{\text{up } 2,\text{ right } 1}} \first{(4, 4)}, \\ \border{(3, 2)} &\xrightarrow{\slope{\text{up } 2,\text{ left } 1}} \first{(2, 4)} \end{aligned}
Step out with negative a\slope{a} (y=−2∣x−3∣+2y = \slope{-2}|x - \border{3}| + \border{2})A negative number in front flips the V upside down, so from (3,2)\border{(3, 2)} go down 2\slope{2} and over 1\slope{1} in both directions.
(3,2)→down 2, right 1(4,0),(3,2)→down 2, left 1(2,0)\displaystyle \begin{aligned} \border{(3, 2)} &\xrightarrow{\slope{\text{down } 2,\text{ right } 1}} \first{(4, 0)}, \\ \border{(3, 2)} &\xrightarrow{\slope{\text{down } 2,\text{ left } 1}} \first{(2, 0)} \end{aligned}

For nonzero a\slope{a} in the family y=a∣x−3∣+2y = \slope{a}|x - \border{3}| + \border{2}, the vertex stays fixed on the border at (3,2)\border{(3, 2)} while the number a\slope{a} in front sets the slope of the right branch (and −a\slope{-a} on the left branch), flipping the V upside down whenever a\slope{a} is negative. When a=0\slope{a = 0}, the graph is the horizontal line y=2y = \first{2}.

The number in front of the absolute value bars sets the slope of the right branch from the vertex, while the left branch mirrors it across the line of symmetry.
7

Writing an Absolute Value Equation from a Graph

Because an absolute value equation only needs the vertex and the number a\slope{a} in front of the bars, we can read both straight from a V-shaped graph.

x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
(−1,4)\border{(-1, 4)}
(−2,1)\first{(-2, 1)}
(0,1)\first{(0, 1)}
Writing an Absolute Value Equation from a Graph
y=a∣x−h∣+ky=  ?\displaystyle \begin{aligned} y &= \slope{a}|x - \border{h}| + \border{k} \\[12pt] y &= \;? \end{aligned}
Text solution
Put the vertex (−1,4)\border{(-1, 4)} into the barsWrite the expression inside the bars that equals zero when x=−1\border{x = -1}, and put the vertex's yy-value +4\border{+4} outside the bars.
−1+1\displaystyle \border{-1} + 1 =0  ⟹  ∣x+1∣+4\displaystyle = 0 \implies |x + \border{1}| + \border{4}
Count the slope a\slope{a} on the right branchFrom the vertex (−1,4)\border{(-1, 4)} to (0,1)\first{(0, 1)} on the right branch, we go down 3\slope{3} and right 1\slope{1}, which gives the number to put in front of the bars.
a\displaystyle \slope{a} =−31\displaystyle = \frac{-3}{1} =−3  ⟹  y\displaystyle = \slope{-3} \implies y =−3∣x+1∣+4\displaystyle = \slope{-3}|x + \border{1}| + \border{4}
8

Rewriting an Absolute Value Function as a Piecewise Function

Finally, what if we have an absolute value equation like

f(x)\displaystyle f(x) =∣2x−6∣+1\displaystyle = |2x - 6| + 1

and want to rewrite it as a curly-bracket piecewise function with no absolute value bars?

Rewriting an Absolute Value Function as a Piecewise Function
f(x)=∣2x−6∣+1f(x)={  ?  if   ?    ?  if   ?  \displaystyle \begin{aligned} f(x) &= |2x - 6| + 1 \\[12pt] f(x) &= \begin{cases} {\;?\;} & \text{if } {\;?\;} \\[4pt] {\;?\;} & \text{if } {\;?\;} \end{cases} \end{aligned}
Text solution
Set the inside to zero for the borderThe absolute value bars change what they do right where the inside expression equals zero.
2x−6\displaystyle 2x - 6 =0  ⟹  2x\displaystyle = 0 \implies 2x =6  ⟹  x\displaystyle = 6 \implies x =3\displaystyle = \border{3}
Drop the bars on the positive side (x≥3\first{x \ge 3})When x≥3\first{x \ge 3}, the inside 2x−62x - 6 is zero or positive, so the bars do nothing and we simply remove them.
(2x−6)+1\displaystyle \first{(2x - 6)} + 1 =2x−5\displaystyle = \first{2x - 5}
Flip the inside on the negative side (x<3\second{x < 3})When x<3\second{x < 3}, the inside 2x−62x - 6 is negative, so we replace the bars with parentheses and a minus sign in front of only the inside expression.
−(2x−6)+1\displaystyle \second{-(2x - 6)} + 1 =−2x+6+1\displaystyle = \second{-2x + 6} + 1 =−2x+7\displaystyle = \second{-2x + 7}
Write the piecewise functionPair each simplified line with its zone (since the two branches meet at the vertex, the "or equal to" bar can go on either zone, though we usually write x≥3\first{x \ge 3}).
f(x)={2x−5if x≥3−2x+7if x<3\displaystyle f(x) = \begin{cases} \first{2x - 5} & \text{if } \first{x \ge 3} \\ \second{-2x + 7} & \text{if } \second{x < 3} \end{cases}

For f(x)=∣2x−6∣+1f(x) = |2x - 6| + 1, the border x=3\border{x = 3} splits the function into y=−(2x−6)+1=−2x+7y = \second{-(2x - 6)} + 1 = \second{-2x + 7} on the left (where 2x−62x - 6 is negative) and y=2x−5y = \first{2x - 5} on the right (where 2x−62x - 6 is positive).

Where the inside of the absolute value bars hits zero, the graph bends and the bars flip the sign of just the part inside them on the negative side.

Key concepts

Every piecewise or absolute value problem starts by locating the border where the rule changes:

Evaluating vs. graphing a piecewise function

The border is the cutoff number in the zones on the right. To evaluate at one input, check the zones first and plug into only the rule for that zone (the border value goes to the rule with ≤\le or ≥\ge). To graph the whole function, plug the border xx-value into both rules so you can mark the open circle and closed dot right on the border, then follow each slope outward (or draw flat horizontal steps when the rules are constant numbers with no xx).

Writing a piecewise equation from a graph

Use the border and the open or closed circles to write the zones, then find y=mx+by = \slope{m}x + b for each piece. When a piece crosses the yy-axis, read bb straight from the graph. When it doesn't, extend its line from the border endpoint to x=0x = 0 to find bb.

Absolute value functions

The border is where the inside of the bars equals zero. To graph y=a∣x−h∣+ky = \slope{a}|x - \border{h}| + \border{k} with a≠0\slope{a} \ne 0 or write its equation from a V-graph, you don't need two separate line equations. Set the inside to zero to find the vertex (h,k)\border{(h, k)}, and use a\slope{a} as the slope of the right branch and −a\slope{-a} as the slope of the left branch. Only split the bars when rewriting in curly-bracket form: at the border where the inside equals zero, drop the bars on the positive side, and put parentheses with a minus sign in front of only the inside expression on the negative side.

9

Practice

1

Given f(x)={−3x+4if x<2x−5if x≥2f(x) = \begin{cases} \first{-3x + 4} & \text{if } \first{x < 2} \\ \second{x - 5} & \text{if } \second{x \ge 2} \end{cases}, find f(−1)f(-1), f(5)f(5), and f(2)f(2).

Compare each input to the border x=2\border{x = 2} first: which zone includes numbers less than 22, greater than 22, and right on 22?

For x=−1x = -1: Since −1<2\first{-1 < 2}, use the top rule:
f(−1)\displaystyle f(-1) =−3(−1)+4\displaystyle = \first{-3(-1) + 4} =3+4\displaystyle = 3 + 4 =7\displaystyle = 7
For x=5x = 5: Since 5≥2\second{5 \ge 2}, use the bottom rule:
f(5)\displaystyle f(5) =5−5\displaystyle = \second{5 - 5} =0\displaystyle = 0
For x=2x = 2: Watch out for the slip of plugging the border value 2\border{2} into the top rule −3(2)+4\first{-3(2) + 4} to get −2-2; the top zone is strictly less than 22 (x<2\first{x < 2}), while the ≥\ge bar puts x=2\border{x = 2} in the bottom rule:
f(2)\displaystyle f(2) =2−5\displaystyle = \second{2 - 5} =−3\displaystyle = -3
Answerf(−1)=7f(-1) = 7, f(5)=0f(5) = 0, and f(2)=−3f(2) = -3.
2

A print shop charges $8\$8 per poster for orders of up to 1515 posters, and $5\$5 per poster for orders of more than 1515 posters. Write a piecewise function C(x)C(x) for the total cost of xx posters, and find how much you save by ordering 1616 posters instead of 1212.

Where is the border where the price changes, and does "up to 1515 posters" mean << or ≤\le?

The price changes at the border of 15\border{15} posters. "Up to 1515 posters" includes 15\border{15} (0<x≤15\first{0 < x \le 15}) at $8\first{\$8} each, and "more than 1515 posters" is strictly above 1515 (x>15\second{x > 15}) at $5\second{\$5} each (putting << on the top zone and ≥\ge on the bottom zone would wrongly price 1515 posters at $75\$75 instead of $120\$120):
C(x)={8xif 0<x≤155xif x>15\displaystyle C(x) = \begin{cases} \first{8x} & \text{if } \first{0 < x \le 15} \\ \second{5x} & \text{if } \second{x > 15} \end{cases}
Evaluate C(12)C(12) in the top zone and C(16)C(16) in the bottom zone (don't stop after finding C(16)=$80C(16) = \$80, subtract the two totals to find the savings):
C(12)=8(12)=$96,C(16)=5(16)=$80\displaystyle \begin{aligned} C(12) &= \first{8(12)} = \$96, \\ C(16) &= \second{5(16)} = \$80 \end{aligned}
AnswerC(x)={8xif 0<x≤155xif x>15C(x) = \begin{cases} 8x & \text{if } 0 < x \le 15 \\ 5x & \text{if } x > 15 \end{cases}. Since C(12)=$96C(12) = \$96 and C(16)=$80C(16) = \$80, you save $16\$16.
3

Graph f(x)={−2x+1if x≤1x+2if x>1f(x) = \begin{cases} \first{-2x + 1} & \text{if } \first{x \le 1} \\ \second{x + 2} & \text{if } \second{x > 1} \end{cases} by finding the border, the coordinates and circle type (open or closed) of both endpoints on the border, and one additional point on each ray.

Plug the border x=1\border{x = 1} into both rules first, then be careful with how a slope of −2\slope{-2} steps when you move to the left of the border.

Left ray (x≤1\first{x \le 1})Plugging the border x=1\border{x = 1} into −2x+1\first{-2x + 1} gives −2(1)+1=−1\first{-2(1) + 1} = -1, which is a closed dot at (1,−1)\first{(1, -1)} because of the ≤\le bar. Normally a slope of −2\slope{-2} goes down 2\slope{2} and right 1\slope{1}, so to draw to the left of x=1\border{x = 1} we reverse both directions and go up 2\slope{2} and left 1\slope{1} to (0,1)\first{(0, 1)} (going down 22 and left 11 is a common slip that gives (0,−3)(0, -3) and flips the slope to +2+2).
Right ray (x>1\second{x > 1})Don't start the right piece at the next whole number x=2x = 2, which would leave a gap between 11 and 22; plug the border x=1\border{x = 1} into x+2\second{x + 2} to put an open circle at (1,3)\second{(1, 3)}, then follow the slope of 1\slope{1} up 1\slope{1} and right 1\slope{1} to (2,4)\second{(2, 4)}.
AnswerBorder at x=1x = 1. Left ray: closed dot at (1,−1)(1, -1), extending left through (0,1)(0, 1). Right ray: open circle at (1,3)(1, 3), extending right through (2,4)(2, 4).
4

A tool rental shop charges a flat fee of $20\$20 for up to 22 hours, $35\$35 for more than 22 hours up to 44 hours, and $50\$50 for more than 44 hours up to 66 hours. Write the step function f(x)f(x) for the cost of renting a tool for xx hours and describe the three horizontal segments on its graph.

Since the fee is flat inside each time window, should the rules have an xx attached to the numbers, and which end of each step gets the closed dot?

Because each fee is a flat dollar amount rather than an hourly rate, the rules are just the constant numbers 20\first{20}, 35\second{35}, and 50\third{50} (attaching an xx to write 20x20x, 35x35x, and 50x50x would turn the flat steps into slanted lines).
Each "more than ... up to ..." window starts with << (an open circle on the left endpoint) and ends with ≤\le (a closed dot on the right endpoint).
Answerf(x)={20if 0<x≤235if 2<x≤450if 4<x≤6f(x) = \begin{cases} 20 & \text{if } 0 < x \le 2 \\ 35 & \text{if } 2 < x \le 4 \\ 50 & \text{if } 4 < x \le 6 \end{cases}. The graph has three horizontal segments: from an open circle at (0,20)(0, 20) to a closed dot at (2,20)(2, 20), from an open circle at (2,35)(2, 35) to a closed dot at (4,35)(4, 35), and from an open circle at (4,50)(4, 50) to a closed dot at (6,50)(6, 50).
5

Write the piecewise function for a graph that has a left ray passing through (0,4)\first{(0, 4)} and ending at an open circle at (3,1)\first{(3, 1)}, and a right ray starting at a closed dot at (3,−2)\second{(3, -2)} and passing through (4,1)\second{(4, 1)}.

After finding the slope of the right ray from (3,−2)\second{(3, -2)} to (4,1)\second{(4, 1)}, how many steps backward do you need to take from x=3\border{x = 3} to find where that line would cross x=0x = 0?

ZonesBoth rays meet the border at x=3\border{x = 3}, with an open circle on the left ray (x<3\first{x < 3}) and a closed dot on the right ray (x≥3\second{x \ge 3}).
Left rule (x<3\first{x < 3})From (0,4)\first{(0, 4)} to (3,1)\first{(3, 1)} the line goes down 3\slope{3} and right 3\slope{3} for a slope of m=−33=−1\slope{m} = \frac{-3}{3} = \slope{-1}, and it crosses the yy-axis at b=4b = 4, giving −x+4\first{-x + 4}.
Right rule (x≥3\second{x \ge 3})From (3,−2)\second{(3, -2)} to (4,1)\second{(4, 1)} the line goes up 3\slope{3} and right 1\slope{1}, so m=3\slope{m = 3}. Don't use the border endpoint's yy-value −2-2 as the yy-intercept bb (which gives the wrong rule 3x−23x - 2); step backward left 1\slope{1}, down 3\slope{3} three times from (3,−2)\second{(3, -2)} to reach the yy-axis:
(3,−2)→left 1, down 3(2,−5)→left 1, down 3(1,−8)→left 1, down 3(0,−11)  ⟹  b=−11\displaystyle \begin{aligned} \second{(3, -2)} &\xrightarrow{\slope{\text{left } 1,\text{ down } 3}} \second{(2, -5)} \\ &\xrightarrow{\slope{\text{left } 1,\text{ down } 3}} \second{(1, -8)} \\ &\xrightarrow{\slope{\text{left } 1,\text{ down } 3}} \second{(0, -11)} \implies b = -11 \end{aligned}
Answerf(x)={−x+4if x<33x−11if x≥3f(x) = \begin{cases} -x + 4 & \text{if } x < 3 \\ 3x - 11 & \text{if } x \ge 3 \end{cases}.
6

Graph y=−3∣x+2∣+1y = -3|x + 2| + 1 by finding the vertex and one point on each branch next to the vertex.

What xx-value makes the expression x+2x + 2 inside the bars equal zero, and which way do both branches go when a=−3\slope{a = -3}?

Find the vertexSet the inside of the bars to zero: x+2=0  ⟹  x=−2x + 2 = 0 \implies x = \border{-2} (watch out for the slip of reading +2+2 directly from ∣x+2∣|x + 2| and placing the vertex at (2,1)(2, 1)). With +1\border{+1} outside the bars, the vertex is at (−2,1)\border{(-2, 1)}.
Step out using a=−3\slope{a = -3}From (−2,1)\border{(-2, 1)}, go down 3\slope{3} and over 1\slope{1} in both directions to (−3,−2)\first{(-3, -2)} and (−1,−2)\first{(-1, -2)}.
AnswerVertex at (−2,1)(-2, 1), with branches going down 33 and over 11 in both directions through (−3,−2)(-3, -2) and (−1,−2)(-1, -2).
7

Write the equation of an absolute value function whose V-shaped graph has its vertex at (4,−3)\border{(4, -3)} and passes through (5,−1)\first{(5, -1)}.

What expression inside the bars becomes zero when you plug in x=4\border{x = 4}, and what is the rise-over-run from (4,−3)\border{(4, -3)} to (5,−1)\first{(5, -1)}?

Vertex (4,−3)\border{(4, -3)}For the inside of the bars to equal zero at x=4\border{x = 4}, we need ∣x−4∣|x - \border{4}| (writing ∣x+4∣|x + 4| is the common slip here, which puts the vertex at x=−4x = -4 instead of 44). Putting the yy-value −3\border{-3} outside gives ∣x−4∣−3|x - \border{4}| \border{- 3}.
Slope a\slope{a}From the vertex (4,−3)\border{(4, -3)} to (5,−1)\first{(5, -1)}, we go up 2\slope{2} and right 1\slope{1}, so a=2\slope{a = 2}.
Answery=2∣x−4∣−3y = 2|x - 4| - 3.
8

Rewrite f(x)=∣3x+6∣−4f(x) = |3x + 6| - 4 as a piecewise function with simplified rules and no absolute value bars.

Set 3x+6=03x + 6 = 0 to find the border, then when you replace the bars with parentheses and a minus sign in front for the negative zone, does the −4-4 outside the bars go inside the parentheses or stay outside?

Find the borderSet the inside expression equal to zero:
3x+6\displaystyle 3x + 6 =0  ⟹  3x\displaystyle = 0 \implies 3x =−6  ⟹  x\displaystyle = -6 \implies x =−2\displaystyle = \border{-2}
Positive zone (x≥−2\first{x \ge -2})Drop the bars and simplify:
(3x+6)−4\displaystyle \first{(3x + 6)} - 4 =3x+2\displaystyle = \first{3x + 2}
Negative zone (x<−2\second{x < -2})Replace the bars with parentheses and a minus sign in front of only the inside expression (don't wrap the parentheses around the outside −4-4 as −(3x+6−4)-(3x + 6 - 4), which wrongly flips −4-4 to +4+4 and gives −3x−2-3x - 2):
−(3x+6)−4\displaystyle \second{-(3x + 6)} - 4 =−3x−6−4\displaystyle = \second{-3x - 6} - 4 =−3x−10\displaystyle = \second{-3x - 10}
Answerf(x)={3x+2if x≥−2−3x−10if x<−2f(x) = \begin{cases} 3x + 2 & \text{if } x \ge -2 \\ -3x - 10 & \text{if } x < -2 \end{cases}.