Math concepts

Partial Fraction Decomposition: Four Worked Examples

October 23, 20268 min read
Partial Fraction Decomposition: Four Worked Examples

A rational expression can look harder to integrate than it is. Consider (3x+1)/(x2−x−2)(3x+1)/(x^2-x-2). Once its denominator is factored, the expression can become two fractions whose antiderivatives are logarithms. The difficult part is choosing the right shape before solving for any constants. Guess a missing term and the later algebra cannot repair the setup.

This guide uses four original examples: distinct linear factors, a repeated linear factor, an irreducible quadratic factor, and a numerator that first requires division. Each ends by recombining the answer. The method follows OpenStax Calculus, Volume 2, §3.4, which sets out the degree condition and the three factor patterns. For the meaning of the resulting integral, see our integral guide. The algebra below stands on its own.

First check the degrees and factor the denominator

Write the rational function as P(x)/Q(x)P(x)/Q(x). Partial fraction decomposition starts with a proper fraction: deg⁡P<deg⁡Q\deg P<\deg Q. If that inequality fails, divide PP by QQ, retaining the polynomial quotient and a proper remainder. Do not try to hide the quotient inside constants.

Next factor QQ over the real numbers. The factorization determines the template, before any coefficient calculation:

Denominator factorTerms to include
Distinct linear (x−a)(x-a)A/(x−a)A/(x-a)
Repeated linear (x−a)m(x-a)^mA1/(x−a)+A2/(x−a)2+⋯+Am/(x−a)mA_1/(x-a)+A_2/(x-a)^2+\cdots+A_m/(x-a)^m
Irreducible quadratic q(x)q(x)(Bx+C)/q(x)(Bx+C)/q(x)

The template is an identity for every allowed value of xx, not a statement about one convenient test point. After clearing denominators, you can solve for unknowns in two complementary ways. Substitute roots of linear factors to remove terms, as in Examples 1 and 2, or expand both sides and equate the coefficient of each power of xx, as in Example 3. A root substitution may determine one constant instantly, but it rarely replaces every coefficient comparison when a quadratic factor remains. Always use the remaining coefficients as a check, even if strategic substitutions seemed to give all the numbers. This also explains why the missing term in Example 2 is detectable: the shortened template cannot match all coefficients simultaneously. It is a structural failure, not merely a bad choice of substitution. If you solve at a few ordinary inputs instead, you are solving a finite system; you still need to verify the resulting polynomial identity for all xx. A complete recombination does that in one line.

An irreducible quadratic has no real linear factors. Its numerator must be linear, even if the solved value of BB happens to be zero. Keep the original denominator's excluded values in mind: two formulas can agree everywhere in their shared domain without becoming defined at a canceled pole. A quick factor check before coefficient work prevents most structural mistakes.

Example 1: two distinct linear factors

Decompose F(x)=(3x+1)/[(x−2)(x+1)]F(x)=(3x+1)/[(x-2)(x+1)]. The numerator has degree one and the denominator degree two, so division is unnecessary. The factors are distinct. Set

3x+1(x−2)(x+1)=Ax−2+Bx+1.\frac{3x+1}{(x-2)(x+1)}=\frac{A}{x-2}+\frac{B}{x+1}.

Multiply by the denominator, keeping the excluded points x=2,−1x=2,-1 out of the original function's domain:

3x+1=A(x+1)+B(x−2).3x+1=A(x+1)+B(x-2).

This is a polynomial identity. Substituting x=2x=2 gives 7=3A7=3A, hence A=7/3A=7/3. Substituting x=−1x=-1 gives −2=−3B-2=-3B, hence B=2/3B=2/3. These substitutions solve the polynomial identity; they do not claim that the original rational function is defined at those points.

Now recombine instead of stopping at two plausible constants:

73(x−2)+23(x+1)=7(x+1)+2(x−2)3(x−2)(x+1)=9x+33(x−2)(x+1)=F(x).\frac{7}{3(x-2)}+\frac{2}{3(x+1)} =\frac{7(x+1)+2(x-2)}{3(x-2)(x+1)} =\frac{9x+3}{3(x-2)(x+1)}=F(x).

The equality holds for x≠2,−1x\ne2,-1. A single numerical spot check would be weaker: two wrong expressions can agree at one input. Matching the entire numerator is the decisive check.

Example 2: a repeated factor needs two terms

Take G(x)=(2x+5)/[x(x+1)2]G(x)=(2x+5)/[x(x+1)^2]. The repeated factor (x+1)2(x+1)^2 requires both first and second powers in the denominators:

G(x)=Ax+Bx+1+C(x+1)2.G(x)=\frac{A}{x}+\frac{B}{x+1}+\frac{C}{(x+1)^2}.

Multiplication by x(x+1)2x(x+1)^2 produces

2x+5=A(x+1)2+Bx(x+1)+Cx.2x+5=A(x+1)^2+Bx(x+1)+Cx.

Set x=0x=0 to get A=5A=5. Set x=−1x=-1 to get 3=−C3=-C, so C=−3C=-3. To find BB, compare the x2x^2 coefficients: A+B=0A+B=0, so B=−5B=-5. The xx coefficient then provides an independent check: 2A+B+C=10−5−3=22A+B+C=10-5-3=2, as required.

Recombine all three numerators:

5(x+1)2−5x(x+1)−3x=5x2+10x+5−5x2−5x−3x=2x+5.5(x+1)^2-5x(x+1)-3x =5x^2+10x+5-5x^2-5x-3x=2x+5.

Thus G(x)=5/x−5/(x+1)−3/(x+1)2G(x)=5/x-5/(x+1)-3/(x+1)^2 for x≠0,−1x\ne0,-1. Deliberate wrong template: A/x+B/(x+1)2A/x+B/(x+1)^2 omits the first-power repeated-factor term. For this particular numerator, its combined numerator would be A(x+1)2+BxA(x+1)^2+Bx. Its x2x^2 coefficient requires A=0A=0, while its constant requires A=5A=5. The contradiction diagnoses a missing term, not a hard system of equations. The full template resolves it.

Example 3: an irreducible quadratic takes a linear numerator

Consider H(x)=(2x2+3x+5)/[(x−1)(x2+1)]H(x)=(2x^2+3x+5)/[(x-1)(x^2+1)]. Since x2+1x^2+1 has no real root, leave it quadratic over the reals. The proper template is

H(x)=Ax−1+Bx+Cx2+1.H(x)=\frac{A}{x-1}+\frac{Bx+C}{x^2+1}.

Clearing denominators gives

2x2+3x+5=A(x2+1)+(Bx+C)(x−1).2x^2+3x+5=A(x^2+1)+(Bx+C)(x-1).

At x=1x=1, 10=2A10=2A, so A=5A=5. Comparing coefficients yields A+B=2A+B=2, hence B=−3B=-3, and −B+C=3-B+C=3, hence C=0C=0. The constant check is A−C=5A-C=5. It succeeds. Zero is a solved value for CC, not a reason to have guessed a constant numerator at the start.

The recombination is short: 5(x2+1)−3x(x−1)=2x2+3x+55(x^2+1)-3x(x-1)=2x^2+3x+5. Therefore H(x)=5/(x−1)−3x/(x2+1)H(x)=5/(x-1)-3x/(x^2+1), on x≠1x\ne1. This example also makes integration convenient: the derivative of x2+1x^2+1 is 2x2x, so the second term is a logarithmic substitution after a constant adjustment. If a quadratic factor were repeated, each power would need its own linear numerator, just as a repeated linear factor needs every power.

Example 4: divide an improper fraction first

Now take J(x)=(x2+4x+5)/(x2−1)J(x)=(x^2+4x+5)/(x^2-1). Both polynomials have degree two. Long division, or subtracting the denominator once, gives

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

Only the remainder is decomposed. Let 4x+6=A(x+1)+B(x−1)4x+6=A(x+1)+B(x-1). Substituting x=1x=1 gives 10=2A10=2A, so A=5A=5. At x=−1x=-1, 2=−2B2=-2B, so B=−1B=-1. Hence

J(x)=1+5x−1−1x+1,x≠±1.J(x)=1+\frac5{x-1}-\frac1{x+1},\qquad x\ne\pm1.

Recombine the entire result, including the polynomial quotient. The two proper terms give [5(x+1)−(x−1)]/(x2−1)=(4x+6)/(x2−1)[5(x+1)-(x-1)]/(x^2-1)=(4x+6)/(x^2-1). Adding one restores (x2−1+4x+6)/(x2−1)=(x2+4x+5)/(x2−1)(x^2-1+4x+6)/(x^2-1)=(x^2+4x+5)/(x^2-1). Dropping the one would pass a coefficient check on the remainder but fail against the original fraction.

Integrate a result and check by differentiating

Return to Example 3. On either interval separated by x=1x=1, integrate term by term:

∫H(x) dx=5ln⁡∣x−1∣−32ln⁡(x2+1)+C.\int H(x)\,dx =5\ln|x-1|-\frac32\ln(x^2+1)+C.

Differentiate: 5/(x−1)−(3/2)(2x)/(x2+1)=5/(x−1)−3x/(x2+1)=H(x)5/(x-1)-(3/2)(2x)/(x^2+1)=5/(x-1)-3x/(x^2+1)=H(x). The absolute value is needed around x−1x-1; x2+1x^2+1 is positive for real xx. The constant CC can differ between disconnected intervals. This final derivative check catches errors that a correct decomposition alone cannot, such as a missing factor of two during integration.

If another technique is mixed into the integral, integration by parts examples show how to verify an antiderivative after several steps. Laplace transforms are another reason to learn the algebra: inverse-transform work often starts by splitting a rational expression. In Math Zen, practice the supporting factorization and derivative skills as separate questions before combining them in a longer integral.

A compact self-check before moving on

For any new rational expression, run the same sequence: compare degrees, divide if necessary, factor the denominator, write one term for every required factor power, solve the polynomial identity, and recombine the full expression. The four cases above deliberately use different templates; the recombination step is the common safeguard. A useful extra test is to inspect behavior near an excluded value. In Example 1, the term with denominator x−2x-2 controls the divergence near x=2x=2; a decomposition without that term cannot reproduce the original pole. This does not determine every coefficient, but it is another way to notice an incomplete template before doing the full identity. Similarly, a repeated squared factor can produce a stronger divergence than a first-power term alone. Always use the algebraic recombination as the final proof, because visual behavior near one pole will not detect every coefficient error. If it fails, inspect the template first, then the coefficient arithmetic. A solved system cannot rescue a missing factor term.

Common Questions

When do I divide before using partial fractions?
Divide when the numerator degree is at least the denominator degree. Decompose only the proper remainder after polynomial division.
Why include every power of a repeated factor?
A repeated factor (x-a)^m needs terms with denominators x-a through (x-a)^m. Leaving one out can make the coefficient identity impossible.
How do I check a decomposition?
Put its terms over the original denominator and simplify the combined numerator. It must equal the original numerator as a polynomial, not merely at one chosen value.

Put This Into Practice