Skip to content

Add and Subtract Rational Expressions

By the end of this section, you will be able to: add and subtract rational expressions with a common denominator; add and subtract rational expressions whose denominators are opposites; find the least common denominator of rational expressions; add and subtract rational expressions with unlike denominators; and add and subtract rational functions.

Add and subtract rational expressions with a common denominator

What is the first step you take when you add numerical fractions? You check if they have a common denominator. If they do, you add the numerators and place the sum over the common denominator. If they do not have a common denominator, you find one before you add.

It is the same with rational expressions. To add rational expressions, they must have a common denominator. When the denominators are the same, you add the numerators and place the sum over the common denominator.

Rational expression addition and subtraction. If pp, qq, and rr are polynomials where r0r \ne 0, then

pr+qr=p+qrandprqr=pqr.\frac{p}{r}+\frac{q}{r}=\frac{p+q}{r} \quad\text{and}\quad \frac{p}{r}-\frac{q}{r}=\frac{p-q}{r}.

To add or subtract rational expressions with a common denominator, add or subtract the numerators and place the result over the common denominator. We always simplify rational expressions. Be sure to factor, if possible, after you subtract the numerators so you can identify any common factors. Remember, too, we do not allow values that would make the denominator zero.

Example. Add:

11x+28x+4+x2x+4.\frac{11x+28}{x+4}+\frac{x^2}{x+4}.

Since the denominator is x+4x+4, we must exclude x=4x=-4.

Add the numerators over the common denominator.11x+28+x2x+4Write the degrees in descending order.x2+11x+28x+4Factor the numerator.(x+4)(x+7)x+4Remove common factors and simplify.x+7 \begin{array}{lrcl} \text{Add the numerators over the common denominator.} &&& \tfrac{11x+28+x^2}{x+4} \\[10pt] \text{Write the degrees in descending order.} &&& \tfrac{x^2+11x+28}{x+4} \\[10pt] \text{Factor the numerator.} &&& \tfrac{(x+4)(x+7)}{x+4} \\[10pt] \text{Remove common factors and simplify.} &&& x+7 \end{array}

The expression simplifies to x+7x+7, but the original expression had a denominator of x+4x+4, so x4x\ne -4.

Simplify 9x+14x+7+x2x+7\tfrac{9x+14}{x+7}+\tfrac{x^2}{x+7}.

Simplify x2+8xx+5+15x+5\tfrac{x^2+8x}{x+5}+\tfrac{15}{x+5}.

To subtract rational expressions, they must also have a common denominator. When the denominators are the same, you subtract the numerators and place the difference over the common denominator. Be careful of the signs when you subtract a binomial or trinomial.

Example. Subtract:

5x27x+3x23x184x2+x9x23x18.\frac{5x^2-7x+3}{x^2-3x-18}-\frac{4x^2+x-9}{x^2-3x-18}.Subtract the numerators.5x27x+3(4x2+x9)x23x18Distribute the subtraction sign.5x27x+34x2x+9x23x18Combine like terms.x28x+12x23x18Factor the numerator and denominator.(x2)(x6)(x+3)(x6)Remove common factors.x2x+3 \begin{array}{lrcl} \text{Subtract the numerators.} &&& \tfrac{5x^2-7x+3-(4x^2+x-9)}{x^2-3x-18} \\[10pt] \text{Distribute the subtraction sign.} &&& \tfrac{5x^2-7x+3-4x^2-x+9}{x^2-3x-18} \\[10pt] \text{Combine like terms.} &&& \tfrac{x^2-8x+12}{x^2-3x-18} \\[10pt] \text{Factor the numerator and denominator.} &&& \tfrac{(x-2)(x-6)}{(x+3)(x-6)} \\[10pt] \text{Remove common factors.} &&& \tfrac{x-2}{x+3} \end{array}

Subtract 4x211x+8x23x+23x2+x3x23x+2\tfrac{4x^2-11x+8}{x^2-3x+2}-\tfrac{3x^2+x-3}{x^2-3x+2}.

Subtract 6x2x+20x2815x2+11x7x281\tfrac{6x^2-x+20}{x^2-81}-\tfrac{5x^2+11x-7}{x^2-81}.

Add and subtract rational expressions whose denominators are opposites

When the denominators of two rational expressions are opposites, it is easy to get a common denominator. We just have to multiply one of the fractions by 11\tfrac{-1}{-1}. For example,

Multiply the second fraction by 11.7d+5d=7d+(1)5(1)(d)The denominators are the same.7d+5dSimplify.2d \begin{array}{lrcl} \text{Multiply the second fraction by }\tfrac{-1}{-1}. & \tfrac{7}{d}+\tfrac{5}{-d} &=& \tfrac{7}{d}+\tfrac{(-1)5}{(-1)(-d)} \\[10pt] \text{The denominators are the same.} &&& \tfrac{7}{d}+\tfrac{-5}{d} \\[10pt] \text{Simplify.} &&& \tfrac{2}{d} \end{array}

Be careful with the signs as you work with opposites when the fractions are being subtracted.

Example. Subtract:

m26mm213m+21m2.\frac{m^2-6m}{m^2-1}-\frac{3m+2}{1-m^2}.Multiply the second fraction by 11.m26mm211(3m+2)1(1m2)Simplify the second fraction.m26mm213m2m21Subtract the numerators and distribute.m26m+3m+2m21Combine like terms.m23m+2m21Factor and remove common factors.(m1)(m2)(m1)(m+1)=m2m+1 \begin{array}{lrcl} \text{Multiply the second fraction by }\tfrac{-1}{-1}. &&& \tfrac{m^2-6m}{m^2-1}-\tfrac{-1(3m+2)}{-1(1-m^2)} \\[10pt] \text{Simplify the second fraction.} &&& \tfrac{m^2-6m}{m^2-1}-\tfrac{-3m-2}{m^2-1} \\[10pt] \text{Subtract the numerators and distribute.} &&& \tfrac{m^2-6m+3m+2}{m^2-1} \\[10pt] \text{Combine like terms.} &&& \tfrac{m^2-3m+2}{m^2-1} \\[10pt] \text{Factor and remove common factors.} &&& \tfrac{(m-1)(m-2)}{(m-1)(m+1)}=\tfrac{m-2}{m+1} \end{array}

Subtract y25yy246y64y2\tfrac{y^2-5y}{y^2-4}-\tfrac{6y-6}{4-y^2}.

Subtract 2n2+8n1n21n27n11n2\tfrac{2n^2+8n-1}{n^2-1}-\tfrac{n^2-7n-1}{1-n^2}.

Find the least common denominator of rational expressions

When we add or subtract rational expressions with unlike denominators, we need common denominators. Recall the numerical example 712+518\tfrac{7}{12}+\tfrac{5}{18}. We factor 1212 and 1818 into primes, line up common primes in columns, and use one prime from each column. Thus the LCD is 2233=362\cdot2\cdot3\cdot3=36, and 712=2136\tfrac{7}{12}=\tfrac{21}{36} while 518=1036\tfrac{5}{18}=\tfrac{10}{36}. We do the same thing for rational expressions, but leave the LCD in factored form.

Find the least common denominator of rational expressions.

  1. Factor each denominator completely.
  2. List the factors of each denominator. Match factors vertically when possible.
  3. Bring down the columns by including all factors, but do not include common factors twice.
  4. Write the LCD as the product of the factors.

Remember, we always exclude values that would make the denominator zero.

Example. (a) Find the LCD for 8x22x3\tfrac{8}{x^2-2x-3} and 3xx2+4x+3\tfrac{3x}{x^2+4x+3}. (b) Rewrite them as equivalent rational expressions with the lowest common denominator.

Factor the denominators and line up common factors:

x22x3=(x+1)(x3)x2+4x+3=(x+1)(x+3)LCD=(x+1)(x3)(x+3). \begin{array}{rcl} x^2-2x-3 &=& (x+1)(x-3) \\[4pt] x^2+4x+3 &=& (x+1)(x+3) \\[4pt] \text{LCD} &=& (x+1)(x-3)(x+3). \end{array}

Each expression needs its missing LCD factor:

8(x+1)(x3)=8(x+3)(x+1)(x3)(x+3),3x(x+1)(x+3)=3x(x3)(x+1)(x+3)(x3). \frac{8}{(x+1)(x-3)}=\frac{8(x+3)}{(x+1)(x-3)(x+3)}, \quad \frac{3x}{(x+1)(x+3)}=\frac{3x(x-3)}{(x+1)(x+3)(x-3)}.

After simplifying the numerators, the equivalent expressions are 8x+24(x+1)(x3)(x+3)\tfrac{8x+24}{(x+1)(x-3)(x+3)} and 3x29x(x+1)(x+3)(x3)\tfrac{3x^2-9x}{(x+1)(x+3)(x-3)}.

Find the LCD for 2x2x12\tfrac{2}{x^2-x-12} and 1x216\tfrac{1}{x^2-16}.

The equivalent expressions are

2x+8(x4)(x+3)(x+4)andx+3(x4)(x+3)(x+4).\frac{2x+8}{(x-4)(x+3)(x+4)}\quad\text{and}\quad\frac{x+3}{(x-4)(x+3)(x+4)}.

Find the LCD for 3xx23x10\tfrac{3x}{x^2-3x-10} and 5x2+3x+2\tfrac{5}{x^2+3x+2}.

The equivalent expressions are

3x2+3x(x+2)(x5)(x+1)and5x25(x+2)(x5)(x+1).\frac{3x^2+3x}{(x+2)(x-5)(x+1)}\quad\text{and}\quad\frac{5x-25}{(x+2)(x-5)(x+1)}.

Add and subtract rational expressions with unlike denominators

Now we have all the steps we need to add or subtract rational expressions with unlike denominators.

Example. Add 3x3+2x2\tfrac{3}{x-3}+\tfrac{2}{x-2}.

The expressions do not have a common denominator. The LCD is (x3)(x2)(x-3)(x-2). Rewrite each expression with the LCD, keeping the denominators factored:

3(x2)(x3)(x2)+2(x3)(x2)(x3)=3x6+2x6(x3)(x2)=5x12(x3)(x2). \frac{3(x-2)}{(x-3)(x-2)}+\frac{2(x-3)}{(x-2)(x-3)} =\frac{3x-6+2x-6}{(x-3)(x-2)} =\frac{5x-12}{(x-3)(x-2)}.

Because 5x125x-12 cannot be factored, the answer is simplified.

Add 2x2+5x+3\tfrac{2}{x-2}+\tfrac{5}{x+3}.

Add 4m+3+3m+4\tfrac{4}{m+3}+\tfrac{3}{m+4}.

Add or subtract rational expressions.

  1. Determine if the expressions have a common denominator.
    • If yes, go to step 2.
    • If no, rewrite each rational expression with the LCD: find the LCD, then rewrite each expression as an equivalent rational expression with the LCD.
  2. Add or subtract the rational expressions.
  3. Simplify, if possible.

Avoid the temptation to simplify too soon. Keep the denominators factored and simplify only after you have combined the numerators.

Example. Add:

8x22x3+3xx2+4x+3.\frac{8}{x^2-2x-3}+\frac{3x}{x^2+4x+3}.

The denominators factor as (x+1)(x3)(x+1)(x-3) and (x+1)(x+3)(x+1)(x+3), so the LCD is (x+1)(x3)(x+3)(x+1)(x-3)(x+3).

8x22x3+3xx2+4x+3=8(x+3)(x+1)(x3)(x+3)+3x(x3)(x+1)(x+3)(x3)=8x+24+3x29x(x+1)(x3)(x+3)=3x2x+24(x+1)(x3)(x+3). \begin{aligned} \frac{8}{x^2-2x-3}+\frac{3x}{x^2+4x+3} &=\frac{8(x+3)}{(x+1)(x-3)(x+3)}+\frac{3x(x-3)}{(x+1)(x+3)(x-3)} \\ &=\frac{8x+24+3x^2-9x}{(x+1)(x-3)(x+3)} \\ &=\frac{3x^2-x+24}{(x+1)(x-3)(x+3)}. \end{aligned}

The numerator is prime, so there are no common factors.

Add 1m2m2+5mm2+3m+2\tfrac{1}{m^2-m-2}+\tfrac{5m}{m^2+3m+2}.

Add 2nn23n10+6n2+5n+6\tfrac{2n}{n^2-3n-10}+\tfrac{6}{n^2+5n+6}.

The process we use to subtract rational expressions with different denominators is the same as for addition. We just have to be very careful of the signs when subtracting the numerators.

Example. Subtract 8yy2164y4\tfrac{8y}{y^2-16}-\tfrac{4}{y-4}.

The denominators factor as (y4)(y+4)(y-4)(y+4) and y4y-4, so the LCD is (y4)(y+4)(y-4)(y+4).

8yy2164y4=8y(y4)(y+4)4(y+4)(y4)(y+4)=8y4y16(y4)(y+4)=4(y4)(y4)(y+4)=4y+4. \begin{aligned} \frac{8y}{y^2-16}-\frac{4}{y-4} &=\frac{8y}{(y-4)(y+4)}-\frac{4(y+4)}{(y-4)(y+4)} \\ &=\frac{8y-4y-16}{(y-4)(y+4)} \\ &=\frac{4(y-4)}{(y-4)(y+4)} \\ &=\frac{4}{y+4}. \end{aligned}

Subtract 2xx241x+2\tfrac{2x}{x^2-4}-\tfrac{1}{x+2}.

Subtract 3z+36zz29\tfrac{3}{z+3}-\tfrac{6z}{z^2-9}.

There are lots of negative signs in the next example. Be extra careful.

Example. Subtract:

3n9n2+n6n+32n.\frac{-3n-9}{n^2+n-6}-\frac{n+3}{2-n}.

Factor n2+n6=(n2)(n+3)n^2+n-6=(n-2)(n+3). Since n2n-2 and 2n2-n are opposites, multiply the second rational expression by 11\tfrac{-1}{-1}. Then

3n9(n2)(n+3)n+32n=3n9(n2)(n+3)+n+3n2=3n9(n2)(n+3)+(n+3)(n+3)(n2)(n+3)=3n9+n2+6n+9(n2)(n+3)=n2+3n(n2)(n+3)=n(n+3)(n2)(n+3)=nn2. \begin{aligned} \frac{-3n-9}{(n-2)(n+3)}-\frac{n+3}{2-n} &=\frac{-3n-9}{(n-2)(n+3)}+\frac{n+3}{n-2} \\ &=\frac{-3n-9}{(n-2)(n+3)}+\frac{(n+3)(n+3)}{(n-2)(n+3)} \\ &=\frac{-3n-9+n^2+6n+9}{(n-2)(n+3)} \\ &=\frac{n^2+3n}{(n-2)(n+3)} \\ &=\frac{n(n+3)}{(n-2)(n+3)}=\frac{n}{n-2}. \end{aligned}

Subtract 3x1x25x626x\tfrac{3x-1}{x^2-5x-6}-\tfrac{2}{6-x}.

Subtract 2y2y2+2y8y12y\tfrac{-2y-2}{y^2+2y-8}-\tfrac{y-1}{2-y}.

Things can get very messy when both fractions must be multiplied by a binomial to get the common denominator.

Example. Subtract:

4a2+6a+53a2+7a+10.\frac{4}{a^2+6a+5}-\frac{3}{a^2+7a+10}.

Factor the denominators as (a+1)(a+5)(a+1)(a+5) and (a+2)(a+5)(a+2)(a+5). The LCD is (a+1)(a+5)(a+2)(a+1)(a+5)(a+2).

4(a+1)(a+5)3(a+2)(a+5)=4(a+2)(a+1)(a+5)(a+2)3(a+1)(a+2)(a+5)(a+1)=4a+8(3a+3)(a+1)(a+5)(a+2)=a+5(a+1)(a+5)(a+2)=1(a+1)(a+2). \begin{aligned} \frac{4}{(a+1)(a+5)}-\frac{3}{(a+2)(a+5)} &=\frac{4(a+2)}{(a+1)(a+5)(a+2)}-\frac{3(a+1)}{(a+2)(a+5)(a+1)} \\ &=\frac{4a+8-(3a+3)}{(a+1)(a+5)(a+2)} \\ &=\frac{a+5}{(a+1)(a+5)(a+2)} \\ &=\frac{1}{(a+1)(a+2)}. \end{aligned}

Subtract 3b24b52b26b+5\tfrac{3}{b^2-4b-5}-\tfrac{2}{b^2-6b+5}.

Subtract 4x243x2x2\tfrac{4}{x^2-4}-\tfrac{3}{x^2-x-2}.

We follow the same steps as before to find the LCD when we have more than two rational expressions. Start by factoring all three denominators.

Example. Simplify:

2uu1+1u2u1u2u.\frac{2u}{u-1}+\frac{1}{u}-\frac{2u-1}{u^2-u}.

The LCD of u1u-1, uu, and u(u1)u(u-1) is u(u1)u(u-1).

2uu1+1u2u1u(u1)=2u2u(u1)+u1u(u1)2u1u(u1)=2u2+u12u+1u(u1)=2u2uu(u1)=u(2u1)u(u1)=2u1u1. \begin{aligned} \frac{2u}{u-1}+\frac{1}{u}-\frac{2u-1}{u(u-1)} &=\frac{2u^2}{u(u-1)}+\frac{u-1}{u(u-1)}-\frac{2u-1}{u(u-1)} \\ &=\frac{2u^2+u-1-2u+1}{u(u-1)} \\ &=\frac{2u^2-u}{u(u-1)} \\ &=\frac{u(2u-1)}{u(u-1)}=\frac{2u-1}{u-1}. \end{aligned}

Simplify vv+1+3v16v21\tfrac{v}{v+1}+\tfrac{3}{v-1}-\tfrac{6}{v^2-1}.

Simplify 3ww+2+2w+717w+4w2+9w+14\tfrac{3w}{w+2}+\tfrac{2}{w+7}-\tfrac{17w+4}{w^2+9w+14}.

Add and subtract rational functions

To add or subtract rational functions, we use the same techniques we used to add or subtract polynomial functions.

Example. Find R(x)=f(x)g(x)R(x)=f(x)-g(x) where f(x)=x+5x2f(x)=\tfrac{x+5}{x-2} and g(x)=5x+18x24g(x)=\tfrac{5x+18}{x^2-4}.

Substitute the functions and factor x24=(x2)(x+2)x^2-4=(x-2)(x+2). The LCD is (x2)(x+2)(x-2)(x+2).

R(x)=x+5x25x+18(x2)(x+2)=(x+5)(x+2)(5x+18)(x2)(x+2)=x2+7x+105x18(x2)(x+2)=x2+2x8(x2)(x+2)=(x+4)(x2)(x2)(x+2)=x+4x+2. \begin{aligned} R(x)&=\frac{x+5}{x-2}-\frac{5x+18}{(x-2)(x+2)} \\ &=\frac{(x+5)(x+2)-(5x+18)}{(x-2)(x+2)} \\ &=\frac{x^2+7x+10-5x-18}{(x-2)(x+2)} \\ &=\frac{x^2+2x-8}{(x-2)(x+2)} \\ &=\frac{(x+4)(x-2)}{(x-2)(x+2)}=\frac{x+4}{x+2}. \end{aligned}

Find R(x)=f(x)g(x)R(x)=f(x)-g(x) where f(x)=x+1x+3f(x)=\tfrac{x+1}{x+3} and g(x)=x+17x2x12g(x)=\tfrac{x+17}{x^2-x-12}.

Find R(x)=f(x)+g(x)R(x)=f(x)+g(x) where f(x)=x4x+3f(x)=\tfrac{x-4}{x+3} and g(x)=4x+6x29g(x)=\tfrac{4x+6}{x^2-9}.

Key terms

least common denominator (LCD) — the smallest expression that is a multiple of every denominator in a collection of rational expressions. rational expression addition and subtraction — with a common denominator, add or subtract the numerators and place the result over that denominator.


This section is adapted from Intermediate Algebra 2e, Section 7.2: Add and Subtract Rational Expressions by Lynn Marecek and Andrea Honeycutt Mathis, © OpenStax, licensed under CC BY-NC-SA 4.0. Access the original for free at openstax.org. Changes: reformatted worked-example steps as accessible typeset mathematics; omitted the Be Prepared quiz, media link, and end-of-section exercises; and converted the practice problems (“Try Its”) into interactive exercises with instant feedback.