Sub topic 7
Clearing Fractions and Solving for a Variable in a Denominator
This chapter assumes you can add and multiply fractions, find a common denominator, and solve a simple linear equation. It also assumes you know the earlier chapters' basic moves: do the same thing to both sides, and undo operations in reverse order. Here we apply those moves to formulas where the target variable sits inside a fraction.
Why denominators need their own treatment
When the target variable is in a numerator, it behaves like any other term. Multiply or divide to move the surrounding factors away. A variable in a denominator is different. You cannot reach it by adding, subtracting, or dividing by the other symbols, because it is "underneath" a division.
The fix is always the same idea: multiply both sides by whatever is in the denominator. The division disappears, and the variable moves up into an ordinary position where the single-occurrence methods work.
There are three situations, in increasing difficulty:
- The target is in a numerator of a fraction, such as
y = (x + 3)/4. - The target is the whole denominator, or part of it, such as
v = d/t. - The target appears in a sum of fractions, such as
1/R = 1/R1 + 1/R2.
Case 1: target in a numerator
Solve y = (x + 3)/4 for x.
The expression for x is: add 3, then divide by 4. Undo in reverse order. First multiply both sides by 4, then subtract 3.
4y = x + 3x = 4y - 3
Multiplying by the denominator is the "clearing" step. It turns a fraction equation into one without fractions. Notice that you must multiply the entire side, not just one piece. If the right side were x/4 + 3, then multiplying by 4 gives 4y = x + 12, because the 3 is multiplied too.
Case 2: target in a denominator
Solve v = d/t for t.
The variable t is underneath. Multiply both sides by t:
v·t = dt = d/v
The second step is a plain division, now that t appears once as a factor. This is the pattern for every "variable in the denominator" problem: multiply it up, then isolate it.
A harder single-fraction example is y = (x + 1)/(x - 2), solved for x. The variable now appears twice, once on top and once on the bottom. Clear the denominator first:
y(x - 2) = x + 1yx - 2y = x + 1(distribute)yx - x = 2y + 1(gather everyxterm on one side)x(y - 1) = 2y + 1(factor)x = (2y + 1)/(y - 1)
Steps 3 and 4 are the collect-and-factor technique from the previous chapter. Clearing the fraction is what created the situation where it applies.
Check with x = 3.5. Then y = 4.5/1.5 = 3. The formula gives x = (2·3 + 1)/(3 - 1) = 3.5. It matches.
Case 3: sums of fractions
Parallel resistors in electronics follow 1/R = 1/R1 + 1/R2. Solve for R2.
Route A: combine, then flip
Subtract 1/R1 from both sides:
1/R2 = 1/R - 1/R1
Combine the right side over the common denominator R·R1:
1/R2 = (R1 - R)/(R·R1)
Now take the reciprocal of both sides:
R2 = (R·R1)/(R1 - R)
Route B: multiply everything by the common denominator
Multiply every term by R·R1·R2. Each fraction cancels one factor:
R1·R2 = R·R2 + R·R1R1·R2 - R·R2 = R·R1(collectR2terms)R2(R1 - R) = R·R1(factor)R2 = R·R1/(R1 - R)
Both routes agree. Route B is more mechanical and rarely fails. Route A is shorter once you are comfortable with it.
def second_resistor(r_total, r1):
# From 1/R = 1/R1 + 1/R2:
# 1/R2 = 1/R - 1/R1 = (R1 - R) / (R * R1), so R2 = R * R1 / (R1 - R)
if r1 == r_total:
raise ValueError("R1 must differ from R; otherwise R2 is undefined")
return r_total * r1 / (r1 - r_total)
print(second_resistor(2, 6)) # 3.0, since 1/6 + 1/3 = 1/2The guard in the code is not decoration. It reflects the denominator R1 - R in the result, which we return to below.
The reciprocal shortcut and when it fails
Taking the reciprocal of both sides is valid when each side is a single fraction (or a single nonzero number). If 1/x = a/b, then x = b/a, provided a and b are nonzero.
It is not valid term by term. This is the most common error in this topic:
| Wrong | Why it fails |
|---|---|
| `1/(a + b) = 1/a + 1/b` | Reciprocal of a sum is not a sum of reciprocals. Test `a = b = 1`: left is 1/2, right is 2. |
| From `1/R = 1/R1 + 1/R2`, write `R = R1 + R2` | Same mistake. With `R1 = 6`, `R2 = 3`, the true `R` is 2, not 9. |
| Cancel `x` from `(x + 1)/x` to get `1` | You can only cancel factors, not terms. The correct simplification is `1 + 1/x`. |
Before you flip, combine each side into one fraction. Only then take the reciprocal.
Another worked case: the thin lens equation
The lens equation is 1/f = 1/u + 1/v, where f is focal length, u the object distance, and v the image distance. Solve for v.
Multiply by f·u·v:
u·v = f·v + f·uu·v - f·v = f·uv(u - f) = f·uv = f·u/(u - f)
It has the same structure as the resistor formula. Recognizing the family 1/a = 1/b + 1/c saves time: the answer is always c = a·b/(b - a).
A sanity test: if the object is very far away (u huge), then v = f·u/(u - f) is close to f·u/u = f. A distant object forms its image at the focal point. The formula passes.
Restrictions you must state
Clearing fractions has two risks.
Zero denominators in the result. In R2 = R·R1/(R1 - R), the case R1 = R makes the denominator zero. Physically that means 1/R1 = 1/R, so 1/R2 = 0. No finite resistor satisfies that. The formula is undefined, and so is the situation it describes.
In x = (2y + 1)/(y - 1), the case y = 1 is excluded. If you substitute y = 1 into the original, x + 1 = x - 2 has no solution. The restriction is real, not an artifact.
Multiplying by something that could be zero. You multiplied by t, or by x - 2, or by R·R1·R2. That is only a valid "same operation on both sides" if the multiplier is not zero. The original formula already has those quantities in denominators, so they were nonzero to begin with. State this as a condition: "valid for t ≠ 0".
Also watch for physical sign conditions. In the resistor formula, a parallel combination is always smaller than either resistor, so a valid input needs R < R1. If you pass r_total = 6 and r1 = 2, the function returns -3.0, a negative resistance. The algebra is fine, but the inputs describe an impossible circuit.
Checking the result
Use two checks every time.
Substitution. Pick numbers for the known variables, compute the target with your formula, and plug everything into the original equation. For the resistor case, take R = 2 and R1 = 6. Then R2 = 12/4 = 3. Original: 1/6 + 1/3 = 1/2, which equals 1/R.
Special cases. Choose inputs where you know the answer. If R1 = 2R, then 1/R2 = 1/R - 1/(2R) = 1/(2R), so R2 should be 2R. The formula gives R·2R/(2R - R) = 2R.
A short script can do the substitution check exactly, using fractions to avoid rounding:
from fractions import Fraction
def second_resistor(r_total, r1):
if r1 == r_total:
raise ValueError("R1 must differ from R; otherwise R2 is undefined")
return r_total * r1 / (r1 - r_total)
for r_total, r1 in [(Fraction(2), Fraction(6)),
(Fraction(5), Fraction(8)),
(Fraction(3, 2), Fraction(4))]:
r2 = second_resistor(r_total, r1)
assert 1 / r_total == 1 / r1 + 1 / r2, (r_total, r1, r2)
print(r_total, r1, r2)Every assertion passes, and the printed R2 values are exact fractions.
Confirming with a computer algebra system
SymPy can rearrange the same equation, which gives you an independent check of your hand work.
from sympy import symbols, Eq, solve, simplify
R, R1, R2 = symbols('R R1 R2', positive=True)
result = solve(Eq(1/R, 1/R1 + 1/R2), R2)
print(result)
mine = R * R1 / (R1 - R)
print(simplify(result[0] - mine)) # 0The printed difference is 0, so your formula equals SymPy's. Note that SymPy's answer may be written in a different but equivalent form. Subtract and simplify rather than comparing the text. Also note that solve does not warn you that R1 = R is a problem. Stating restrictions is still your job.
Common errors
- Multiplying only some terms by the common denominator. Every term on both sides gets multiplied.
- Dropping parentheses:
y(x - 2)must becomeyx - 2y, notyx - 2. - Reciprocating term by term instead of combining first.
- Forgetting to factor the target out when it appears in two terms after clearing.
- Leaving the answer without a restriction such as
y ≠ 1.
Exercises
Exercise
Solve p = k/(q + 2) for q. State any restriction.
Show answer
Multiply both sides by q + 2: p(q + 2) = k. Divide by p: q + 2 = k/p. Subtract 2: q = k/p - 2. Restriction: p ≠ 0 (and since k/(q+2) is nonzero when k ≠ 0, p = 0 is only possible if k = 0). The original also requires q ≠ -2.
Exercise
Solve the lens equation 1/f = 1/u + 1/v for f. Then test your result with u = 30 and v = 60.
Show answer
Combine the right side: 1/f = (v + u)/(u·v). Take the reciprocal of both sides: f = u·v/(u + v). Test: f = 30·60/90 = 20. Check: 1/30 + 1/60 = 3/60 = 1/20. Restriction: u + v ≠ 0, u ≠ 0, v ≠ 0.
Exercise
Solve y = (3x - 1)/(x + 4) for x. For which value of y does the formula fail, and why?
Show answer
Clear the denominator: y(x + 4) = 3x - 1, so yx + 4y = 3x - 1. Collect: yx - 3x = -1 - 4y. Factor: x(y - 3) = -(1 + 4y). So x = -(4y + 1)/(y - 3) = (4y + 1)/(3 - y). It fails at y = 3, because the original would need 3x - 1 = 3x + 12, which is impossible.