Sub topic 14
Extension: Absolute Value Equations
Prerequisites and the key idea
Assume you can solve linear equations, distribute factors, combine like terms, and check answers by substitution. You should also know that a variable represents an unknown number.
The absolute value of a number is its distance from zero. It is never negative. For example, |5| = 5 and |-5| = 5.
An absolute value equation contains an expression inside absolute-value bars, such as |2x - 1| = 5. The expression 2x - 1 can equal either 5 or -5, because both numbers have absolute value 5.
Solving an absolute value equation
For an equation in the form |expression| = c, first consider the value of c.
| Value of `c` | Meaning | Number of real solutions |
|---|---|---|
| `c > 0` | The expression can be `c` or `-c` | Usually two |
| `c = 0` | The expression must equal zero | Usually one |
| `c < 0` | An absolute value cannot be negative | None |
When c > 0, create two linear equations:
expression = cexpression = -c
Worked example
Solve |3x - 4| = 8.
Because 8 is positive, use two cases:
3x - 4 = 8
3x = 12
x = 4
3x - 4 = -8
3x = -4
x = -4/3
The solution set is x = 4 or x = -4/3. Check both values in the original equation:
|3(4) - 4| = |8| = 8|3(-4/3) - 4| = |-8| = 8
Both values work.
Equations with a zero or negative right side
Consider |5x + 1| = 0. The only number with absolute value zero is zero, so solve:
5x + 1 = 0
x = -1/5
Now consider |2x - 7| = -3. There is no real solution because absolute value cannot be negative. Do not create two cases for a negative right side.
If the absolute value is part of a larger equation, isolate it first. For example:
2|x - 3| + 1 = 9
Subtract 1 and divide by 2:
|x - 3| = 4
Then solve both cases:
x - 3 = 4, sox = 7x - 3 = -4, sox = -1
A repeatable method
Use this procedure:
- Isolate the absolute-value expression.
- Inspect the right side.
- If it is negative, stop: there is no real solution.
- If it is zero, set the inside expression equal to zero.
- If it is positive, solve both positive and negative cases.
- Substitute each answer into the original equation.
A program can follow the same cases exactly:
from fractions import Fraction
def solve_absolute_linear(a, b, c):
"""Solve |a*x + b| = c over the real numbers."""
a, b, c = Fraction(a), Fraction(b), Fraction(c)
if c < 0:
return "no solution"
if a == 0:
return "infinitely many solutions" if abs(b) == c else "no solution"
if c == 0:
return {-b / a}
return { (c - b) / a, (-c - b) / a }
print(solve_absolute_linear(3, -4, 8)) # {Fraction(4, 1), Fraction(-4, 3)}Exercise
Solve |4x + 1| = 9 and explain why both cases are required.
Show answer
The cases are 4x + 1 = 9 and 4x + 1 = -9. They give x = 2 and x = -5/2. Both check in the original equation.