Equations Containing Radicals
An equation with the unknown under a square root, such as , is solved by isolating the root and squaring both sides. Squaring is not an equivalent step, though: it can create extraneous roots, candidates that satisfy the squared equation but not the original one. This lesson shows the method, why the false roots appear, and why checking every candidate is part of the solution.
The method
- Isolate one radical on one side of the equation.
- Raise both sides to the power that removes it: square for , cube for .
- Solve the resulting equation.
- Check every candidate in the original equation and reject those that fail.
A first example with only one candidate:
Extraneous roots
(Factoring a quadratic is covered in Solving by Factoring; here SymPy can confirm it.) So the only solution is ; is extraneous. Where did it come from? Squaring makes positive and negative equal: is false, but is true. The squared equation is the same as either or , and is the solution of the second one. Remember that always means the non-negative root.
The picture makes it visible. The original equation asks where the line meets the curve . The squared equation also counts where the line meets the mirror curve :
import numpy as np
import matplotlib.pyplot as plt
xs = np.linspace(-6, 5, 400)
plt.figure(figsize=(6, 4))
plt.plot(xs, np.sqrt(xs + 6), label="y = √(x + 6)")
plt.plot(xs, -np.sqrt(xs + 6), "--", label="y = −√(x + 6)")
plt.plot(xs, xs, label="y = x")
plt.scatter([3, -2], [3, -2], color="black", zorder=3)
plt.axhline(0, color="gray", lw=0.5); plt.axvline(0, color="gray", lw=0.5)
plt.legend(); plt.title("x = 3 is real, x = −2 is extraneous")
for x in (3, -2):
print(x, "original holds:", np.sqrt(x + 6) == x)3 original holds: True
-2 original holds: False
The line meets the solid curve only at . The point lies on the dashed mirror curve, which squaring smuggled in.
A harder one
Note: is , not or . Squaring a side means squaring the whole side, not each term.
When two radicals appear, isolate one, square, then isolate the remaining one and square again:
Cube roots do not create false roots
Cubing is reversible, because every real number has exactly one real cube root and . So equations need no rejection step (still check for arithmetic slips):
Checking with SymPy
SymPy's solve checks candidates itself and drops extraneous ones. Squaring first and solving the squared equation shows what the candidates were:
from sympy import symbols, Eq, solve, sqrt
x = symbols("x")
print("squared eq:", solve(Eq(x + 6, x**2), x))
print("original: ", solve(Eq(sqrt(x + 6), x), x))
print("squared eq:", solve(Eq(2*x - 1, (x - 2)**2), x))
print("original: ", solve(Eq(sqrt(2*x - 1) + 2, x), x))
print("two roots: ", solve(Eq(sqrt(x + 5) - sqrt(x), 1), x))
print("cube root: ", solve(Eq(x - 2, (-3)**3), x)) # cubed by handsquared eq: [-2, 3]
original: [3]
squared eq: [1, 5]
original: [5]
two roots: [4]
cube root: [-25]
In software
Radical equations come from distance and physics formulas, where the square root is natural. The distance from to is ; asking where that distance is 5 gives and , and here both roots are real answers, two points on the line. Free-fall time solved for gives . Whenever code squares both sides of a condition to avoid a slow sqrt (comparing dx*dx + dy*dy < r*r instead of sqrt(...) < r), it relies on both sides being non-negative, which is exactly the condition that rules out extraneous roots.
Exercises
Exercise 1: One root
Solve .
Answer
Solution
Exercise 2: Spot the extraneous root
Solve by squaring. Which candidate is extraneous?
Answer
is the solution; is extraneous.
Solution
Exercise 3: No solution at all
Solve .
Answer
No solution.
Solution
Isolating gives . A square root is never negative, so there is no solution; you can stop here. (Squaring anyway gives , and the check rejects it.)
Exercise 4: A checker in code
Write check(candidates) that tests each candidate in and prints whether it is a real solution. Use the candidates from squaring: , so and .
Answer
4 passes, −1 fails ().
Solution
import math
def check(candidates):
for x in candidates:
ok = 3*x + 4 >= 0 and math.isclose(math.sqrt(3*x + 4), x)
print(x, "solution" if ok else "extraneous")
check([4, -1])4 solution
-1 extraneous
Test yourself
Why can squaring both sides of an equation create extraneous roots?
- Squaring is not allowed in algebra
- holds when as well as when
- Square roots are always negative
- SymPy introduces them
Solving gives the candidates and . What is the solution set?
- No solution
Which step needs no check for extraneous roots?
- Squaring both sides
- Raising both sides to the 4th power
- Cubing both sides
- Multiplying both sides by