Adding and Subtracting Rational Expressions

Learning goals

  • Add only over a shared denominator
  • Build the LCD from each factor at its highest power
  • Bracket the whole numerator being subtracted, then distribute
  • Keep restrictions from the original denominators, canceled or not
  • Turn a complex fraction into a division

Why a common denominator is needed at all

A common denominator is not a ritual step. It is the only way to make the two counts comparable. Once the pieces are the same size, addition is just counting them together:

37+27=57.\frac{3}{7} + \frac{2}{7} = \frac{5}{7}.

Written out with the size of the piece made explicit, the reason is visible. Three sevenths is 3⋅173 \cdot \frac{1}{7} and two sevenths is 2⋅172 \cdot \frac{1}{7}, so the sum is (3+2)⋅17(3 + 2) \cdot \frac{1}{7}. That step is the distributive property, run backwards, and it is the whole justification.

Fractions with the same denominator add by adding numerators#

Let AA, BB, and DD be polynomials, and fix any value of xx with D≠0D \neq 0, so that all the fractions below are defined. Since dividing by DD is the same as multiplying by the number 1D\frac{1}{D}, we can write AD=A⋅1D\frac{A}{D} = A \cdot \frac{1}{D} and BD=B⋅1D\frac{B}{D} = B \cdot \frac{1}{D}. Then

AD+BD=A⋅1D+B⋅1D=(A+B)⋅1D=A+BD.\frac{A}{D} + \frac{B}{D} = A \cdot \frac{1}{D} + B \cdot \frac{1}{D} = (A + B) \cdot \frac{1}{D} = \frac{A + B}{D}.

The middle equality is the distributive property with the common factor 1D\frac{1}{D} pulled out of both terms. Notice what the argument never used: it never asked what AA, BB, or DD actually are. It needed only that D≠0D \neq 0, so that 1D\frac{1}{D} exists. That is exactly why the rule for numbers and the rule for polynomials are the same rule.

Replacing BB with −B-B gives the subtraction version, AD−BD=A−BD\frac{A}{D} - \frac{B}{D} = \frac{A - B}{D}, with the same restriction D≠0D \neq 0.

So the rule needs one denominator. That makes the entire job of adding unlike fractions a single task: rewrite them so that they share a denominator. The tool for that is the other fact you already have, that multiplying the top and the bottom by the same nonzero quantity leaves a fraction’s value alone, because

C⋅KD⋅K=CD⋅KK=CD⋅1=CD,D≠0,  K≠0.\frac{C \cdot K}{D \cdot K} = \frac{C}{D} \cdot \frac{K}{K} = \frac{C}{D} \cdot 1 = \frac{C}{D}, \qquad D \neq 0,\; K \neq 0.

Adding when the denominators already match

When the denominators are identical, combine the numerators over that denominator and then simplify the result the way you learned in the first lesson of this chapter. Here that comes down to two moves: factor the numerator and the denominator, and cancel any factor they share.

AD+BD=A+BD,AD−BD=A−BD.\frac{A}{D} + \frac{B}{D} = \frac{A + B}{D}, \qquad \frac{A}{D} - \frac{B}{D} = \frac{A - B}{D}.

Worked example 1 Combine x2x+5+3x−10x+5\frac{x^2}{x+5} + \frac{3x-10}{x+5}

The denominators already match, so put the two numerators over the single denominator:

x2x+5+3x−10x+5=x2+3x−10x+5.\frac{x^2}{x+5} + \frac{3x-10}{x+5} = \frac{x^2 + 3x - 10}{x+5}.

Now factor the numerator and look for a factor shared with the denominator. Two numbers multiplying to −10-10 and adding to 33 are 55 and −2-2, so x2+3x−10=(x+5)(x−2)x^2 + 3x - 10 = (x+5)(x-2):

(x+5)(x−2)x+5=x−2.\frac{(x+5)(x-2)}{x+5} = x - 2.

The answer is x−2x - 2, valid for x≠−5x \neq -5. The polynomial x−2x - 2 is perfectly happy at x=−5x = -5, but the expression you started with is not, since x+5x + 5 sits in its denominator. Canceling a factor never widens the domain, so the restriction travels with the answer.

The minus sign owns the whole numerator

Almost every real error in this lesson is a sign error, and it comes from one place. In AD−BD=A−BD\frac{A}{D} - \frac{B}{D} = \frac{A - B}{D}, the minus sign applies to all of BB, not just to its first term. When BB is a single term like 33, you can hardly go wrong. The moment BB is a polynomial like 3x+43x + 4, the minus has to reach both terms, and the +4+4 becomes −4-4.

The habit that prevents this: write brackets around the numerator you are subtracting before you do anything else with it. Then distribute the minus sign as a separate, deliberate step.

Worked example 2 Combine 5x−2x2−9−3x+4x2−9\frac{5x-2}{x^2-9} - \frac{3x+4}{x^2-9}

The denominators match, so subtract the numerators. Bracket the numerator being subtracted:

5x−2x2−9−3x+4x2−9=(5x−2)−(3x+4)x2−9.\frac{5x-2}{x^2-9} - \frac{3x+4}{x^2-9} = \frac{(5x-2) - (3x+4)}{x^2-9}.

Now distribute the minus sign across both terms of 3x+43x + 4:

(5x−2)−(3x+4)=5x−2−3x−4=2x−6.(5x-2) - (3x+4) = 5x - 2 - 3x - 4 = 2x - 6.

Factor the top and the bottom, and cancel:

2x−6x2−9=2(x−3)(x−3)(x+3)=2x+3.\frac{2x-6}{x^2-9} = \frac{2(x-3)}{(x-3)(x+3)} = \frac{2}{x+3}.

The restrictions come from the original denominator x2−9=(x−3)(x+3)x^2 - 9 = (x-3)(x+3), so x≠3x \neq 3 and x≠−3x \neq -3. The factor x−3x - 3 canceled, but x=3x = 3 is still excluded.

Compare that with the wrong turn. A student who drops the brackets writes 5x−2−3x+4=2x+25x - 2 - 3x + 4 = 2x + 2 and reports 2x+2(x−3)(x+3)\frac{2x+2}{(x-3)(x+3)}, which will not simplify at all. The lost sign on the +4+4 turned 2x−62x - 6 into 2x+22x + 2 and destroyed the common factor.

Check your understanding

Simplify 4x+3x+2−2x−1x+2\dfrac{4x+3}{x+2} - \dfrac{2x-1}{x+2}.

Answer choices

Building the least common denominator

When the denominators differ, you must rebuild both fractions over a shared denominator. Any common denominator will do, but one of them is cheapest, and it is worth knowing which.

Start with numbers, where you already know the answer. To add 112+118\frac{1}{12} + \frac{1}{18}, look at what the denominators are made of:

12=22⋅3,18=2⋅32.12 = 2^2 \cdot 3, \qquad 18 = 2 \cdot 3^2.

A common denominator has to be a multiple of both. To be a multiple of 1212 it needs two factors of 22; to be a multiple of 1818 it needs two factors of 33. Take exactly the highest power of each prime that appears in either one, and you get the least common multiple:

22⋅32=36.2^2 \cdot 3^2 = 36.

Then 112=336\frac{1}{12} = \frac{3}{36} and 118=236\frac{1}{18} = \frac{2}{36}, so the sum is 536\frac{5}{36} and no canceling is needed at the end.

Polynomials factor into irreducible pieces in essentially one way, just as integers factor into primes, so the same recipe transfers word for word with “prime” replaced by “irreducible factor”. To build the least common denominator (LCD):

  1. Factor every denominator completely.
  2. List the distinct factors that appear anywhere.
  3. Raise each one to the highest power it reaches in any single denominator.
  4. Multiply those together.

Plain numbers left sitting in front of a denominator are handled by the rule you already know: take their ordinary least common multiple. The denominators 2x2x and 3x3x share the factor xx, and lcm⁡(2,3)=6\operatorname{lcm}(2,3) = 6, so their LCD is 6x6x.

That last clause is also where the word “least” runs out of room. A nonzero number never changes where a denominator vanishes, so if LL is a common denominator then so are 2L2L and 3L3L, and they have exactly the same degree. The recipe therefore pins the LCD down only up to a numeric constant. Convention settles the remaining choice in the obvious way: take the version carrying no surplus number, which is what the least common multiple of the coefficients gives you.

Take the denominators x2−4x^2 - 4 and x2−4x+4x^2 - 4x + 4. Factored, they are (x−2)(x+2)(x-2)(x+2) and (x−2)2(x-2)^2. The distinct factors are x−2x - 2 and x+2x + 2. The highest power of x−2x - 2 in a single denominator is 22, and the highest power of x+2x + 2 is 11, so

LCD=(x−2)2(x+2).\text{LCD} = (x-2)^2(x+2).
Building the least common denominator from factorsRow one: x squared minus 4 is built from one block reading (x minus 2) and one block reading (x plus 2). Row two: x squared minus 4x plus 4 is built from two blocks reading (x minus 2). The LCD row holds two blocks reading (x minus 2) and one block reading (x plus 2).x² - 4 =(x - 2)(x + 2)x² - 4x + 4 =(x - 2)(x - 2)LCD =(x - 2)(x - 2)(x + 2)
Each denominator is a stack of factors. The LCD takes every distinct factor as many times as it appears in the denominator that uses it most, and no more.

Check your understanding

What is the least common denominator of 5x2−4x\dfrac{5}{x^2-4x} and 1x2−16\dfrac{1}{x^2-16}?

Answer choices

The full method, with unlike denominators

Putting the pieces together gives one procedure that always works.

  1. Factor every denominator completely.
  2. Read off the restrictions from those factors, before anything cancels.
  3. Build the LCD: each distinct factor, to the highest power it reaches in any single denominator.
  4. Rewrite each fraction over the LCD by multiplying its numerator and its denominator by the factors it is missing.
  5. Combine the numerators over the single denominator, bracketing every numerator that is being subtracted.
  6. Expand, collect, factor, cancel. The restrictions from step 2 stay with the answer.

Worked example 3 Combine 2x+3x+1\frac{2}{x} + \frac{3}{x+1}

Factor the denominators: xx is already a single factor, and x+1x + 1 cannot be factored further. The first denominator is zero at x=0x = 0 and the second at x=−1x = -1, so the restrictions are x≠0x \neq 0 and x≠−1x \neq -1.

The two denominators share no factor, so the LCD is their product, x(x+1)x(x+1), and both fractions are missing a factor:

2x⋅x+1x+1=2(x+1)x(x+1),3x+1⋅xx=3xx(x+1).\frac{2}{x} \cdot \frac{x+1}{x+1} = \frac{2(x+1)}{x(x+1)}, \qquad \frac{3}{x+1} \cdot \frac{x}{x} = \frac{3x}{x(x+1)}.

Combine over the single denominator and expand the top:

2(x+1)+3xx(x+1)=2x+2+3xx(x+1)=5x+2x(x+1).\frac{2(x+1) + 3x}{x(x+1)} = \frac{2x + 2 + 3x}{x(x+1)} = \frac{5x+2}{x(x+1)}.

The numerator 5x+25x + 2 shares no factor with x(x+1)x(x+1), so this is already the answer:

5x+2x(x+1),x≠0,  x≠−1.\frac{5x+2}{x(x+1)}, \qquad x \neq 0,\; x \neq -1.

Check your understanding

Simplify 3x+2−1x−1\dfrac{3}{x+2} - \dfrac{1}{x-1}.

Answer choices

Worked example 4 Combine x+4x2+3x−2x+3\frac{x+4}{x^2+3x} - \frac{2}{x+3}

Factor the denominators: x2+3x=x(x+3)x^2 + 3x = x(x+3), and the second is already x+3x + 3. So the restrictions are x≠0x \neq 0 and x≠−3x \neq -3.

The distinct factors are xx and x+3x + 3, each to the first power, so the LCD is x(x+3)x(x+3). The first fraction already sits over it. The second is missing a factor of xx:

2x+3⋅xx=2xx(x+3).\frac{2}{x+3} \cdot \frac{x}{x} = \frac{2x}{x(x+3)}.

Combine, bracketing the numerator that is being subtracted:

(x+4)−2xx(x+3)=4−xx(x+3).\frac{(x+4) - 2x}{x(x+3)} = \frac{4 - x}{x(x+3)}.

The numerator 4−x4 - x is zero only at x=4x = 4, while the denominator’s factors vanish at x=0x = 0 and x=−3x = -3. So the numerator shares no factor with the denominator, and the expression is already in lowest terms:

4−xx(x+3),x≠0,  x≠−3.\frac{4-x}{x(x+3)}, \qquad x \neq 0,\; x \neq -3.

Worked example 5 Combine xx−2−4x2−2x\frac{x}{x-2} - \frac{4}{x^2-2x}

Factor: x2−2x=x(x−2)x^2 - 2x = x(x-2). The denominators are x−2x - 2 and x(x−2)x(x-2), so the restrictions are x≠2x \neq 2 and x≠0x \neq 0. The LCD is x(x−2)x(x-2), since that already contains both.

The second fraction sits over the LCD. The first is missing a factor of xx:

xx−2⋅xx=x2x(x−2).\frac{x}{x-2} \cdot \frac{x}{x} = \frac{x^2}{x(x-2)}.

Combine over the single denominator:

x2−4x(x−2)=(x−2)(x+2)x(x−2)=x+2x.\frac{x^2 - 4}{x(x-2)} = \frac{(x-2)(x+2)}{x(x-2)} = \frac{x+2}{x}.

The answer is x+2x\frac{x+2}{x}, with x≠0x \neq 0 and x≠2x \neq 2. That second restriction is the one people lose. The final form x+2x\frac{x+2}{x} shows no trouble at x=2x = 2, but the expression you were handed has x−2x - 2 in a denominator. No amount of later algebra can make that expression exist at x=2x = 2.

Why the recipe works

You have now used the LCD recipe several times. Here is why it is forced to produce a common denominator at all.

The recipe gives a common denominator#

Call the product produced by the recipe LL. Take any one of the denominators, call it DD. Every factor of DD appears in LL raised to at least the power it has in DD, because LL uses the highest power that factor reaches in any denominator, and DD is one of them. So DD divides LL, which means L=D⋅QL = D \cdot Q for some polynomial QQ. Multiplying that fraction’s numerator and denominator by QQ rewrites it over LL, and the same works for every fraction in the sum.

Why the product is usually the worse choice

Multiplying the denominators together always produces a common denominator, and when they share no factor at all, that product is the LCD. But when they do share a factor, the product carries a copy of it that you will have to cancel back out at the end. Watch the same problem run both ways.

Combine 2x2−4+3x2−4x+4\dfrac{2}{x^2-4} + \dfrac{3}{x^2-4x+4}, whose denominators factor as (x−2)(x+2)(x-2)(x+2) and (x−2)2(x-2)^2.

Using the LCD (x−2)2(x+2)(x-2)^2(x+2). The first fraction is missing one x−2x - 2 and the second is missing one x+2x + 2:

2(x−2)(x+2)⋅x−2x−2+3(x−2)2⋅x+2x+2=2(x−2)+3(x+2)(x−2)2(x+2).\frac{2}{(x-2)(x+2)} \cdot \frac{x-2}{x-2} + \frac{3}{(x-2)^2} \cdot \frac{x+2}{x+2} = \frac{2(x-2) + 3(x+2)}{(x-2)^2(x+2)}.

The numerator is 2x−4+3x+6=5x+22x - 4 + 3x + 6 = 5x + 2, so the answer is

5x+2(x−2)2(x+2),x≠2,  x≠−2.\frac{5x+2}{(x-2)^2(x+2)}, \qquad x \neq 2,\; x \neq -2.

Using the product (x−2)3(x+2)(x-2)^3(x+2). Now the first fraction needs (x−2)2(x-2)^2 and the second needs (x−2)(x+2)(x-2)(x+2):

2(x−2)2+3(x−2)(x+2)(x−2)3(x+2)=2x2−8x+8+3x2−12(x−2)3(x+2)=5x2−8x−4(x−2)3(x+2).\frac{2(x-2)^2 + 3(x-2)(x+2)}{(x-2)^3(x+2)} = \frac{2x^2 - 8x + 8 + 3x^2 - 12}{(x-2)^3(x+2)} = \frac{5x^2 - 8x - 4}{(x-2)^3(x+2)}.

That numerator is not in lowest terms, so you are forced to factor a quadratic that you created yourself, 5x2−8x−4=(5x+2)(x−2)5x^2 - 8x - 4 = (5x+2)(x-2), and cancel:

(5x+2)(x−2)(x−2)3(x+2)=5x+2(x−2)2(x+2).\frac{(5x+2)(x-2)}{(x-2)^3(x+2)} = \frac{5x+2}{(x-2)^2(x+2)}.

Same answer, more work, and a real risk of stopping early and calling 5x2−8x−4(x−2)3(x+2)\frac{5x^2-8x-4}{(x-2)^3(x+2)} the final answer. The LCD route never built the surplus x−2x - 2 in the first place, so there was nothing to cancel.

The restrictions come from the original denominators

The domain is settled before you do any algebra at all. Factor the denominators exactly as they are given, and exclude every value that kills any factor. Two consequences catch people out.

A factor that cancels still restricts. In Worked Example 5 the factor x−2x - 2 canceled, but the starting expression was undefined at x=2x = 2, so the answer is undefined there too. The simplified form agrees with the original at every value it is allowed to have, and says nothing about the value it was never allowed to have.

Building up never adds a new restriction. Every factor you multiply a fraction by, on its way to the LCD, is already a factor of some denominator in the problem. So the values that factor kills were excluded from the very beginning. That has a useful consequence: the LCD is zero at exactly the excluded values, and nowhere else. If some denominator is zero at x=ax = a, then since that denominator divides the LCD, the LCD is zero at x=ax = a too. Going the other way, if the LCD is zero at x=ax = a, then one of its irreducible factors is zero there. That factor came from some denominator, which is therefore also zero at x=ax = a. So once you have the factored LCD in front of you, you can read the full list of restrictions straight off it.

Check your understanding

The expression 3x−4−12x2−4x\dfrac{3}{x-4} - \dfrac{12}{x^2-4x} simplifies to 3x\dfrac{3}{x}. Which values of xx must be excluded?

Answer choices

Complex fractions are division in disguise

A complex fraction has a fraction inside its numerator, inside its denominator, or both. The method is not new, because the main fraction bar means division, and dividing rational expressions is already in your hands: multiply by the reciprocal. What is new is bookkeeping: a complex fraction has more denominators to track than an ordinary one.

  1. Combine the top into a single fraction.
  2. Combine the bottom into a single fraction.
  3. Multiply the top by the reciprocal of the bottom.
  4. Collect restrictions from every denominator that appeared, including the main one, since the bottom of the big fraction cannot be zero either.

Worked example 6 Simplify 1x+121x−12\dfrac{\frac{1}{x} + \frac{1}{2}}{\frac{1}{x} - \frac{1}{2}}

Combine the top over the LCD 2x2x, then the bottom over the same LCD:

1x+12=22x+x2x=2+x2x,1x−12=22x−x2x=2−x2x.\frac{1}{x} + \frac{1}{2} = \frac{2}{2x} + \frac{x}{2x} = \frac{2 + x}{2x}, \qquad \frac{1}{x} - \frac{1}{2} = \frac{2}{2x} - \frac{x}{2x} = \frac{2 - x}{2x}.

Now the complex fraction is one fraction divided by another, so multiply by the reciprocal:

2+x2x÷2−x2x=2+x2x⋅2x2−x=x+22−x.\frac{2+x}{2x} \div \frac{2-x}{2x} = \frac{2+x}{2x} \cdot \frac{2x}{2-x} = \frac{x+2}{2-x}.

For the restrictions, hunt through every denominator that appeared. The 1x\frac{1}{x} terms force x≠0x \neq 0. The bottom of the big fraction cannot be zero, and 2−x2x=0\frac{2-x}{2x} = 0 exactly when x=2x = 2, so x≠2x \neq 2 as well:

x+22−x,x≠0,  x≠2.\frac{x+2}{2-x}, \qquad x \neq 0,\; x \neq 2.

Notice that the final form still shows x≠2x \neq 2 in its denominator, but has lost all trace of x≠0x \neq 0. That is the restriction you must carry by hand.

Check your understanding

Simplify 1x−131x+13\dfrac{\frac{1}{x} - \frac{1}{3}}{\frac{1}{x} + \frac{1}{3}}.

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

Go deeper (optional)

You can skip this and keep going. Read it if you want to know more.

Why the recipe gives the smallest common denominator

Why the recipe gives the smallest common denominator#

Call the product produced by the recipe LL. The lesson already showed that LL is a common denominator. Now suppose CC is any common denominator, so every denominator divides CC. Pick one distinct factor pp, and let kk be the highest power of pp occurring in a single denominator, reached in some denominator DjD_j. Then pkp^k divides DjD_j, and DjD_j divides CC, so pkp^k divides CC. Run that argument once for each distinct factor. The distinct factors share no piece with one another, so CC must be divisible by the product of all of those highest powers, and that product is exactly LL. Hence LL divides CC, and no common denominator can have smaller degree than LL.

Both halves of this argument lean on the same fact: a polynomial factors into irreducible pieces in essentially one way, the same pieces every time. That is what makes “the highest power of each factor” a well-defined thing to ask for, and it is the same reasoning that makes lcm⁡(12,18)=36\operatorname{lcm}(12, 18) = 36, carried over from primes to irreducible polynomials.

A bit of history (optional)

Ask why halves and thirds cannot simply be added. The answer hides inside two words you have used since primary school.

Denominator comes from the Latin denominare, to name. The bottom of a fraction names the kind of piece you are counting: sevenths, or halves, or (x−2)(x-2)-ths. Numerator comes from numerare, to count, and the top says how many of those pieces you hold. Medieval arithmetic books stated the whole rule in that same vocabulary. You may add only quantities of the same denomination, they wrote. That is this lesson in older clothing.

So the common denominator is not a ritual. Add one half to one third and you are adding counts of two different things, so the counts alone cannot simply be added. Rewrite both as sixths and the counts describe one piece, so they combine.

The bar arrived later than the words did. It shows up in the work of al-Hassar, in twelfth-century Morocco. He wrote one quantity above another with a stroke between them, and Fibonacci later carried the notation into Europe.

Nothing in that naming argument cares whether the piece is a seventh or an (x−2)(x-2)-th. The LCD you built today is a medieval rule about denomination, aimed at polynomials.