Graphs with absolute value
Sketch y = |f(x)| and y = f(|x|) from the graph of y = f(x) using reflections in the axes, and see both as composites with the absolute value function.
There are two places to put an absolute value in $y = f(x)$: around the output, $|f(x)|$, or around the input, $f(|x|)$. Each is a simple reflection, but they reflect in different axes, and mixing them up is the classic error in this topic.
What absolute value does
$|u| = u$ when $u \ge 0$, and $|u| = -u$ when $u \lt 0$. So a positive number or zero is left alone, and a negative number has its sign flipped. Keep those two cases in mind: both graphs below come straight from them.
The graph of y = |f(x)|
Here the absolute value acts on the output, the height. Where the graph is on or above the $x$-axis the height is not negative, so nothing changes. Where the graph is below the $x$-axis the height is negative, so it is replaced by its opposite: that piece is reflected up.
Blue dashed: y = f(x). Orange: y = |f(x)|. The piece of the parabola between the zeroes flips up, leaving sharp corners at the zeroes.
Which points of the blue graph never move, whatever $a$ is? Predict how many solutions $|f(x)| = 3$ has, then imagine the line $y = 3$ across the orange graph to check.
The graph of y = f(|x|)
Now the absolute value acts on the input. For $x \ge 0$, $|x| = x$, so the graph is unchanged on the right. For $x \lt 0$, $f(|x|) = f(-x)$, which is the reflection of the right half in the $y$-axis. Whatever $f$ did on the left is thrown away.
Blue dashed: y = f(x). Orange: y = f(|x|). Only the part with x ≥ 0 survives, and it is copied across the y-axis.
With $a = 1$, count the turning points of the orange graph. Now make $a$ negative. Predict where the lowest point will be before you look, and explain why.
Let $f(x) = x^2 - 2x - 8 = (x + 2)(x - 4)$, with vertex $(1, -9)$ and $y$-intercept $-8$. Describe $y = |f(x)|$ and $y = f(|x|)$.
Doing both: y = |f(|x|)|
Apply the two steps one after the other, in either order. For the $f$ in Example 1, start from $y = f(|x|)$ and reflect everything below the $x$-axis up. You get a "W" with zeroes at $\pm 4$, local maxima at $(\pm 1, 9)$, and a local minimum at $(0, 8)$.
Why: composite functions
Write $A(x) = |x|$. Then $|f(x)| = A(f(x))$: do $f$ first, then take the absolute value of the answer, so the heights change. And $f(|x|) = f(A(x))$: take the absolute value of $x$ first, so only the inputs change. The order of composition is exactly the difference between the two graphs.
Your turn
$f(x) = x^2 - 2x - 8$. How many solutions does $|f(x)| = 5$ have?
Show the working
The graph of $y = |f(x)|$ has a local maximum at $(1, 9)$ between the zeroes $-2$ and $4$. The line $y = 5$ is below $9$, so it crosses the middle arch twice, and crosses each outer arm once. That is $4$ solutions.
The graph of $y = |f(x)|$ is formed by:
Where $f(x) \lt 0$, $|f(x)| = -f(x)$, which is the reflection in the $x$-axis. Where $f(x) \ge 0$, nothing changes.
$f$ has a local minimum at $(1, -9)$. Enter the $y$-coordinate of the corresponding point on $y = |f(x)|$.
$|-9| = 9$, so the point becomes $(1, 9)$, a local maximum.
$y = f(|x|)$ is always:
$f(|-x|) = f(|x|)$ for every $x$, so the graph is symmetric in the $y$-axis.
$f(x) = 2x - 5$. Find the $y$-intercept of $y = |f(x)|$.
$f(0) = -5$, and $|-5| = 5$.
$f(x) = (x + 2)(x - 4)$. Find the zeroes of $y = f(|x|)$. Enter both, separated by &.
For $x \ge 0$ the only zero is $x = 4$. The left half is the mirror image, so $x = -4$ is the other. The zero at $-2$ is on the discarded left half.
$f(x) = x^3 - x$. Which is true of $y = f(|x|)$?
For $x \ge 0$, $f$ has zeroes $0$ and $1$. Mirroring gives a zero at $-1$ too. Between $0$ and $1$ the cubic is negative, so $f(|x|)$ does go below the axis. It is even, not odd.
$f(x) = x^2 - 2x - 8$. How many solutions does $|f(x)| = 5$ have?
$|f(x)|$ has zeroes $-2$ and $4$, and a local maximum $(1, 9)$. The line $y = 5$ cuts the middle arch twice and each outer arm once: $4$ solutions.
$f(x) = x^2 - 2x - 8$. How many solutions does $f(|x|) = 0$ have?
$f(|x|) = 0$ means $|x| = -2$ or $|x| = 4$. Only $|x| = 4$ is possible, giving $x = \pm 4$: two solutions.
Exam style: $f(x) = x^2 - 2x - 8$. The graph of $y = |f(|x|)|$ has a local minimum on the $y$-axis. Find its $y$-coordinate.
$f(|0|) = f(0) = -8$, and taking the absolute value gives $8$. Near $x = 0$, $f(|x|)$ falls from $-8$ to $-9$ in both directions, so after reflecting up, $|f(|x|)|$ rises from $8$ to $9$: a local minimum at $(0, 8)$.
Exam style: $f(x) = x^2 - 2x - 8$. The equation $|f(x)| = k$ has exactly three solutions. Find $k$.
$y = |f(x)|$ has zeroes at $-2$ and $4$ and a local maximum at $(1, 9)$. A horizontal line $y = k$ with $0 \lt k \lt 9$ cuts it four times, and with $k \gt 9$ twice. Only $k = 9$ touches the top of the middle arch and also cuts both outer arms: three solutions.
Coaching Centre