10.3 Modulus Functions and Equations

AHL 2.16

In this section you will learn
  • the definition of the absolute value (modulus) \(|x|\) and the graph of \(y = |x|\)
  • how the graph of \(y = |f(x)|\) is made from the graph of \(y = f(x)\)
  • the main properties of the modulus
  • how to solve \(|f(x)| = k\), \(|f(x)| = |g(x)|\) and \(|f(x)| = g(x)\) algebraically
  • how to solve equations with a sum of moduli, such as \(|x - a| + |x - b| = k\), by splitting into intervals
  • how to solve harder modulus equations graphically, with a GDC

Absolute value functions

The absolute value or modulus of a real number \(x\) is its distance from \(0\) on the number line. We write it as \(|x|\). A distance is never negative, so \(|x| \geq 0\). For example, \(|5| = 5\) and \(|-5| = 5\).

Definition of the modulus Not in the formula booklet

\[ |x| = \begin{cases} \;\;x & \text{if } x \geq 0 \\ -x & \text{if } x < 0 \end{cases} \qquad\qquad \text{or, equivalently,} \qquad |x| = \sqrt{x^2} . \]

The rule \(y = |x|\) gives exactly one output for each input, so it is a function: the absolute value function. Its graph is a “V” shape with its vertex at the origin (Figure 1).

Figure 1: The graph of \(y = |x|\) is made of two half-lines.

The graph of \(y = |f(x)|\)

Where \(f(x) \geq 0\), \(|f(x)| = f(x)\); where \(f(x) < 0\), \(|f(x)| = -f(x)\). So the graph of \(y = |f(x)|\) is the graph of \(y = f(x)\) with every part below the \(x\)-axis reflected in the \(x\)-axis. For example, \(y = |3x + 2|\) is a “V” with its vertex at \(\left(-\frac{2}{3}, 0\right)\). You only need this idea here, to see how many solutions a modulus equation has. Sketching \(y = |f(x)|\) (and \(y = f(|x|)\)) is studied in detail in Section 12.4.

Modulus equations

A modulus equation is an equation that contains the absolute value of an expression. To solve one, we use the definition and the properties of the modulus.

Properties of the modulus Not in the formula booklet

  • \(|x| \geq 0\) for all \(x\) \(\qquad\qquad\qquad\;\) \(|-x| = |x|\) for all \(x\)
  • \(|x|^2 = x^2\) for all \(x\) \(\qquad\qquad\quad\;\;\) \(|xy| = |x|\,|y|\) for all \(x, y\)
  • \(\left|\dfrac{x}{y}\right| = \dfrac{|x|}{|y|}\) for \(y \neq 0\) \(\qquad\qquad\) \(|x - y| = |y - x|\) for all \(x, y\)

Suppose \(|x| = a\) with \(a > 0\). Squaring gives \(x^2 = a^2\) (since \(|x|^2 = x^2\)), so \(x = \pm\sqrt{a^2} = \pm a\).

Solving modulus equations Not in the formula booklet

  • \(|f(x)| = k\), \(k > 0\): \(\quad f(x) = k\) or \(f(x) = -k\).
  • \(|f(x)| = |g(x)|\): \(\quad f(x) = g(x)\) or \(f(x) = -g(x)\). \(\;\) (Or square both sides: \(f(x)^2 = g(x)^2\).)
  • \(|f(x)| = g(x)\): \(\quad\) solve \(f(x) = \pm g(x)\), then reject any answer with \(g(x) < 0\).
  • \(k\): a positive constant

Example 1 Solve for \(x\).

(a) \(|2x + 5| = 3\)

(b) \(\left|\dfrac{x}{x + 2}\right| = 3\)

(c) \(|2x - 3| = |x + 3|\)

(a) \(2x + 5 = 3\) or \(2x + 5 = -3\). So \(x = -1\) or \(x = -4\).

(b) \(\dfrac{x}{x + 2} = 3\) or \(\dfrac{x}{x + 2} = -3\) (with \(x \neq -2\)).

  • \(x = 3x + 6 \Rightarrow x = -3\).
  • \(x = -3x - 6 \Rightarrow 4x = -6 \Rightarrow x = -\dfrac{3}{2}\).

So \(x = -3\) or \(x = -\dfrac{3}{2}\).

(c) \(2x - 3 = x + 3\) or \(2x - 3 = -(x + 3)\).

  • \(x = 6\).
  • \(3x = 0 \Rightarrow x = 0\).

Check: \(|9| = |9|\) ✓ and \(|-3| = |3|\) ✓. So \(x = 0\) or \(x = 6\).

Alternative for (c): square both sides. \((2x - 3)^2 = (x + 3)^2 \Rightarrow 3x^2 - 18x = 0 \Rightarrow 3x(x - 6) = 0\).

When an equation has two moduli and a constant, split the number line at the points where each expression inside is zero. On each interval, remove the modulus signs with the correct sign, and keep only answers that lie in that interval.

Example 2 Solve \(|x + 1| + |x - 3| = 6\).

The expressions inside are zero at \(x = -1\) and \(x = 3\).

  • \(x < -1\): both are negative. \(\;-(x + 1) - (x - 3) = 6 \Rightarrow -2x + 2 = 6 \Rightarrow x = -2\). This is in the interval ✓.
  • \(-1 \leq x \leq 3\): \(\;(x + 1) - (x - 3) = 4\). But \(4 \neq 6\), so there is no solution here.
  • \(x > 3\): both are positive. \(\;(x + 1) + (x - 3) = 6 \Rightarrow 2x - 2 = 6 \Rightarrow x = 4\). This is in the interval ✓.

So \(x = -2\) or \(x = 4\).

The graph of \(y = |x + 1| + |x - 3|\) (Figure 2) is flat at height \(4\) between \(x = -1\) and \(x = 3\), so the line \(y = 6\) meets it once on each side.

Figure 2: \(y = |x + 1| + |x - 3|\)

Some modulus equations cannot be solved with algebra. Then we draw both sides as graphs and find where they meet.

Example 3 Solve \(|\mathrm{e}^x - 4| = x + 2\) graphically.

Draw \(y = |\mathrm{e}^x - 4|\) and \(y = x + 2\) on the same axes (Figure 3). The modulus graph has its vertex where \(\mathrm{e}^x = 4\), at \(x = \ln 4 \approx 1.39\).

Figure 3: The two graphs meet twice.

The graphs intersect at two points. Using the GDC: \(x = 0.443\) or \(x = 2.09\) (3 s.f.).

On a Graphs page:

  1. Enter \(f_1(x) = |\mathrm{e}^x - 4|\) (type abs(, or choose the \(|\square|\) template from the templates palette).
  2. Enter \(f_2(x) = x + 2\).
  3. Press Menu → Analyze Graph → Intersection.
  4. Select a lower bound and an upper bound around one crossing point.
  5. Repeat step 3 and step 4 for the other crossing point.

Or, on a Calculator page, type nSolve(abs(e^(x)-4)=x+2, x, 0, 1) and then nSolve(abs(e^(x)-4)=x+2, x, 1.5, 3).

Modulus inequalities such as \(|2x - 1| \geq 5\) or \(|f(x)| \leq |g(x)|\) are solved in Section 11.5.

Common errors

✗ Wrong ✓ Right Why
\(\lvert x - 5\rvert = 2x + 1\) gives \(x = -6\) or \(x = \frac{4}{3}\) Only \(x = \frac{4}{3}\) At \(x = -6\) the right side is \(-11 < 0\), but a modulus is never negative.
\(\lvert x^2 - 5\rvert = 4 \Rightarrow x^2 = 9\) only \(x^2 - 5 = 4\) or \(x^2 - 5 = -4\) Always use both signs: \(f(x) = \pm k\).
\(\lvert x + 2\rvert = x + 2\) for all \(x\) Only for \(x \geq -2\) For \(x < -2\), \(\lvert x + 2\rvert = -(x + 2)\).
\(\lvert a + b\rvert = \lvert a\rvert + \lvert b\rvert\) \(\lvert a + b\rvert \leq \lvert a\rvert + \lvert b\rvert\) Try \(a = 3\), \(b = -3\). Only products and quotients split.
Keeping an answer that lies outside the interval it came from Check that each answer is in its interval On each interval the modulus signs were removed for that interval only.

Exercises

1 Solve \(|4x + 3| = 7\).

\(4x + 3 = 7 \Rightarrow x = 1\), or \(4x + 3 = -7 \Rightarrow x = -\dfrac{5}{2}\).

2 Solve \(|x^2 - 5| = 4\).

\(x^2 - 5 = 4 \Rightarrow x^2 = 9 \Rightarrow x = \pm 3\), or \(x^2 - 5 = -4 \Rightarrow x^2 = 1 \Rightarrow x = \pm 1\).

So \(x = -3, -1, 1\) or \(3\).

3 Solve \(|x - 5| = 2x + 1\).

\(x - 5 = 2x + 1 \Rightarrow x = -6\). But then \(2x + 1 = -11 < 0\): reject.

\(x - 5 = -(2x + 1) \Rightarrow 3x = 4 \Rightarrow x = \dfrac{4}{3}\). Check: \(\left|\frac{4}{3} - 5\right| = \frac{11}{3}\) and \(2 \times \frac{4}{3} + 1 = \frac{11}{3}\) ✓.

The only solution is \(x = \dfrac{4}{3}\).

4 Solve \(|x^2 - 4| = 3x\).

A modulus is never negative, so we need \(3x \geq 0\), that is \(x \geq 0\).

\(x^2 - 4 = 3x \Rightarrow x^2 - 3x - 4 = 0 \Rightarrow (x - 4)(x + 1) = 0\): \(x = 4\) ✓ or \(x = -1\) (reject).

\(x^2 - 4 = -3x \Rightarrow x^2 + 3x - 4 = 0 \Rightarrow (x + 4)(x - 1) = 0\): \(x = 1\) ✓ or \(x = -4\) (reject).

So \(x = 1\) or \(x = 4\). (Check: \(|1 - 4| = 3\) ✓ and \(|16 - 4| = 12\) ✓.)

5 Solve \(|3x + 1| = |x - 5|\).

\(3x + 1 = x - 5 \Rightarrow x = -3\), or \(3x + 1 = -(x - 5) \Rightarrow 4x = 4 \Rightarrow x = 1\).

Check: \(|-8| = |-8|\) ✓, \(|4| = |-4|\) ✓. So \(x = -3\) or \(x = 1\).

6 Solve \(|3x - 2| = 2|x + 1|\).

\(2|x + 1| = |2x + 2|\), so \(3x - 2 = 2x + 2\) or \(3x - 2 = -(2x + 2)\).

  • \(x = 4\).
  • \(5x = 0 \Rightarrow x = 0\).

Check: \(|10| = 2|5|\) ✓ and \(|-2| = 2|1|\) ✓. So \(x = 0\) or \(x = 4\).

7 Solve \(\left|\dfrac{2x + 1}{x - 3}\right| = 1\).

\(x \neq 3\), and \(|2x + 1| = |x - 3|\).

\(2x + 1 = x - 3 \Rightarrow x = -4\), or \(2x + 1 = -(x - 3) \Rightarrow 3x = 2 \Rightarrow x = \dfrac{2}{3}\).

8 Solve \(|x - 1| + |x + 2| = 5\).

Split at \(x = -2\) and \(x = 1\).

  • \(x < -2\): \(\;-(x - 1) - (x + 2) = -2x - 1 = 5 \Rightarrow x = -3\) ✓ (it is less than \(-2\)).
  • \(-2 \leq x \leq 1\): \(\;-(x - 1) + (x + 2) = 3 \neq 5\). No solution.
  • \(x > 1\): \(\;(x - 1) + (x + 2) = 2x + 1 = 5 \Rightarrow x = 2\) ✓ (it is greater than \(1\)).

So \(x = -3\) or \(x = 2\).

9 Solve \(x^2 - 5|x| + 6 = 0\).

Since \(x^2 = |x|^2\), this is a quadratic in \(|x|\):

\[ |x|^2 - 5|x| + 6 = 0 \;\Longrightarrow\; (|x| - 2)(|x| - 3) = 0 . \]

So \(|x| = 2\) or \(|x| = 3\), which gives \(x = \pm 2\) or \(x = \pm 3\).

10 Use your GDC to solve \(|x^2 - 2| = \mathrm{e}^{-x}\). Give your answers to 3 significant figures.

Draw \(y = |x^2 - 2|\) and \(y = \mathrm{e}^{-x}\) on the same axes and use Intersection for each crossing point. The graphs meet three times:

\[ x = -0.537, \qquad x = 1.32, \qquad x = 1.49 \qquad (3 \text{ s.f.}). \]

(The last two are on either side of the vertex of the “V” part at \(x = \sqrt{2} \approx 1.41\).)