Functions Reference

Piecewise and Absolute-Value Functions

Piecewise rules choose an expression by input, while absolute value describes distance and creates a V-shaped graph.

Solved Examples

Jump directly to a worked example by evaluation, form, equation, or graph feature.

Fact Table

IdeaRuleWatch For
Piecewise functionUse the one rule whose condition contains the input.At a boundary, decide which inequality includes equality.
Absolute value$|u|=u$ when $u\ge0$; $|u|=-u$ when $u<0$.Absolute value is never negative.
Graph form$y=a|x-h|+k$ has vertex $(h,k)$.$a<0$ reflects the V downward.
Equation$|u|=c$ gives $u=c$ or $u=-c$ for $c>0$.If $c<0$, there is no solution.

Content Formulas

Absolute Value
$$|x|=\begin{cases}x,&x\ge0\\-x,&x<0\end{cases}$$
Vertex Form
$$y=a|x-h|+k$$
Distance
$$|x-a|=d\Longleftrightarrow x=a\pm d$$
Read a piecewise rule one condition at a time. Do not substitute into every expression and then choose the answer you like.

Classic Examples

Evaluate a Piecewise Function

For $f(x)=\begin{cases}2x+1,&x<3\\x^2-2,&x\ge3\end{cases}$, find $f(3)$.

Solution Steps
  1. Compare the input $3$ with each condition.
  2. Select the rule that includes equality.
  3. Evaluate that rule at $3$.
$$3\ge3$$$$f(3)=3^2-2$$$$\boxed{f(3)=7}$$

Write Absolute Value as a Piecewise Rule

Write $g(x)=|x-2|$ as a piecewise function.

Solution Steps
  1. Find where the inside expression changes sign.
  2. Keep $x-2$ when it is nonnegative.
  3. Negate $x-2$ when it is negative.
$$x-2=0\Rightarrow x=2$$$$x\ge2:\quad |x-2|=x-2$$$$\boxed{g(x)=\begin{cases}2-x,&x<2\\x-2,&x\ge2\end{cases}}$$

Solve an Absolute-Value Equation

Solve $|2x-1|=7$.

Solution Steps
  1. Split the equation into the positive and negative cases.
  2. Solve each linear equation.
  3. State both solutions.
$$2x-1=7\quad\text{or}\quad2x-1=-7$$$$x=4\quad\text{or}\quad x=-3$$$$\boxed{x=-3,\ 4}$$

Read an Absolute-Value Transformation

Describe $y=-2|x+3|+1$.

Solution Steps
  1. Read $x+3$ as a horizontal shift left $3$.
  2. Read $-2$ as a reflection and vertical stretch.
  3. Read $+1$ as the vertical shift and state the vertex.
$$x+3=x-(-3)\Rightarrow\text{left }3$$$$-2\Rightarrow\text{reflect down and stretch by }2$$$$\boxed{\text{vertex }(-3,1),\ \text{shift up }1}$$