Integration · Class 12 · Lesson 05

Integration by partial fractions: split it, then integrate.

Short answer

Write a proper rational function as a sum of simpler fractions, one for each factor of the denominator, and integrate each piece.

Example: \(\dfrac{1}{x^2 - 1} = \dfrac{1}{2}\left(\dfrac{1}{x - 1} - \dfrac{1}{x + 1}\right)\), so \(\displaystyle\int \frac{dx}{x^2 - 1} = \frac{1}{2}\log\left|\frac{x - 1}{x + 1}\right| + C\).

Class 12HSC & CBSE
01

When to use partial fractions

Neither substitution nor parts helps much with something like \(\dfrac{1}{(x - 1)(x + 2)}\). But if you split it into two simpler fractions,

\[\frac{1}{(x - 1)(x + 2)} = \frac{1}{3}\cdot\frac{1}{x - 1} - \frac{1}{3}\cdot\frac{1}{x + 2}\]

each piece is a plain log integral. That splitting is called partial fractions. It is the reverse of adding fractions over a common denominator.

When it applies

The integrand is a rational function \(\dfrac{P(x)}{Q(x)}\) (a polynomial over a polynomial) and the denominator \(Q(x)\) can be factorised.

Proper or improper?

If \(\deg P < \deg Q\), the fraction is proper and you can split it straight away. If \(\deg P \ge \deg Q\), it is improper: divide first, so that it becomes a polynomial plus a proper fraction.

For instance, \(\dfrac{x^2 + 1}{x^2 - 1}\) is improper (both degrees are 2). Dividing gives \(1 + \dfrac{2}{x^2 - 1}\), and only the second part needs partial fractions.

02

The standard forms

The form of the split depends only on the factors of the denominator. Here \(A\), \(B\) and \(C\) are numbers to be found. (This \(C\) is a constant in the split; it has nothing to do with the \(+ C\) at the end of an integral.)

Denominator hasWrite the fraction as
distinct linear factors \((x - a)(x - b)\)\(\dfrac{A}{x - a} + \dfrac{B}{x - b}\)
three distinct linear factors\(\dfrac{A}{x - a} + \dfrac{B}{x - b} + \dfrac{C}{x - c}\)
a repeated linear factor \((x - a)^2\)\(\dfrac{A}{x - a} + \dfrac{B}{(x - a)^2}\)
\((x - a)^2(x - b)\)\(\dfrac{A}{x - a} + \dfrac{B}{(x - a)^2} + \dfrac{C}{x - b}\)
\((x - a)(x^2 + bx + c)\), with the quadratic not factorisable\(\dfrac{A}{x - a} + \dfrac{Bx + C}{x^2 + bx + c}\)

Two rules to remember. A repeated factor \((x - a)^2\) needs a term for each power, \((x - a)\) and \((x - a)^2\). A quadratic factor that won't split into real linear factors (its discriminant is negative) gets a linear numerator \(Bx + C\), not just a constant.

After splitting, these integrals finish the job:

\[\int \frac{dx}{x - a} = \log|x - a| + C\]

\[\int \frac{dx}{(x - a)^2} = -\frac{1}{x - a} + C\]

\[\int \frac{dx}{x^2 + a^2} = \frac{1}{a}\tan^{-1}\frac{x}{a} + C\]

\[\int \frac{x\,dx}{x^2 + a^2} = \frac{1}{2}\log(x^2 + a^2) + C\]

\[\int \frac{dx}{x^2 - a^2} = \frac{1}{2a}\log\left|\frac{x - a}{x + a}\right| + C\]

03

Finding the constants

Take \(\dfrac{3x + 5}{(x + 1)(x + 3)} = \dfrac{A}{x + 1} + \dfrac{B}{x + 3}\). Multiply through by the denominator:

\[3x + 5 = A(x + 3) + B(x + 1)\]

This holds for every \(x\), so you have two ways to get \(A\) and \(B\).

Method 1: substitute convenient values

Put \(x = -1\): the \(B\) term vanishes and \(2 = 2A\), so \(A = 1\). Put \(x = -3\): \(-4 = -2B\), so \(B = 2\). Choosing the roots of the factors kills all but one term each time. This is the fastest method for distinct linear factors.

Method 2: compare coefficients

Expand the right side: \((A + B)x + (3A + B)\). Matching with \(3x + 5\) gives \(A + B = 3\) and \(3A + B = 5\), so again \(A = 1\), \(B = 2\).

In practice you mix them. Substitute the roots to get as many constants as you can, then compare one coefficient (usually the highest power of \(x\), or the constant term) for whatever is left. Example 4 and Example 6 below do exactly this.

04

The x² = t trick for even functions

Look at \(\dfrac{x^2}{(x^2 + 1)(x^2 + 4)}\). Every \(x\) appears as \(x^2\). Splitting with \(\dfrac{Ax + B}{x^2 + 1} + \dfrac{Cx + D}{x^2 + 4}\) works but means four unknowns.

Instead, write \(t\) for \(x^2\) only while doing the algebra:

\[\frac{t}{(t + 1)(t + 4)} = \frac{A}{t + 1} + \frac{B}{t + 4}\]

Put \(t = -1\): \(-1 = 3A\), so \(A = -\dfrac{1}{3}\). Put \(t = -4\): \(-4 = -3B\), so \(B = \dfrac{4}{3}\). Now put \(x^2\) back:

\[\frac{x^2}{(x^2 + 1)(x^2 + 4)}\]

\[= -\frac{1}{3}\cdot\frac{1}{x^2 + 1} + \frac{4}{3}\cdot\frac{1}{x^2 + 4}\]

Both pieces are \(\tan^{-1}\) integrals. This is not a substitution in the integral; \(dx\) never changes. It is just a shortcut for the splitting, and it works whenever the fraction is a function of \(x^2\) alone. Example 7 finishes this one.

05

Solved examples

Example 1: Two distinct factors

Easy

Evaluate \(\displaystyle\int \frac{dx}{(x - 1)(x + 2)}\).

  1. Write \(\dfrac{1}{(x - 1)(x + 2)} = \dfrac{A}{x - 1} + \dfrac{B}{x + 2}\), so \(1 = A(x + 2) + B(x - 1)\).
  2. \(x = 1\): \(1 = 3A\), \(A = \dfrac{1}{3}\). \(x = -2\): \(1 = -3B\), \(B = -\dfrac{1}{3}\).
  3. Integrate: \(\dfrac{1}{3}\log|x - 1| - \dfrac{1}{3}\log|x + 2| + C\).

Answer\(\dfrac{1}{3}\log\left|\dfrac{x - 1}{x + 2}\right| + C\)

Example 2: A linear numerator

Easy

Evaluate \(\displaystyle\int \frac{3x + 5}{(x + 1)(x + 3)}\,dx\).

  1. From the section above, \(A = 1\) and \(B = 2\): the integrand is \(\dfrac{1}{x + 1} + \dfrac{2}{x + 3}\).
  2. Check at \(x = 0\): left side \(\dfrac{5}{3}\); right side \(1 + \dfrac{2}{3} = \dfrac{5}{3}\). ✓

Answer\(\log|x + 1| + 2\log|x + 3| + C\)

Example 3: Three linear factors

Medium

Evaluate \(\displaystyle\int \frac{x}{(x - 1)(x - 2)(x - 3)}\,dx\).

  1. \(x = A(x - 2)(x - 3) + B(x - 1)(x - 3) + C(x - 1)(x - 2)\).
  2. \(x = 1\): \(1 = 2A\), \(A = \dfrac{1}{2}\). \(x = 2\): \(2 = -B\), \(B = -2\). \(x = 3\): \(3 = 2C\), \(C = \dfrac{3}{2}\).
  3. Each piece integrates to a log.

Answer\(\dfrac{1}{2}\log|x - 1| - 2\log|x - 2| + \dfrac{3}{2}\log|x - 3| + C\)

Example 4: A repeated factor

Medium

Evaluate \(\displaystyle\int \frac{x}{(x - 1)^2(x + 2)}\,dx\).

  1. Write \(\dfrac{A}{x - 1} + \dfrac{B}{(x - 1)^2} + \dfrac{C}{x + 2}\). Then \(x = A(x - 1)(x + 2) + B(x + 2) + C(x - 1)^2\).
  2. \(x = 1\): \(1 = 3B\), \(B = \dfrac{1}{3}\). \(x = -2\): \(-2 = 9C\), \(C = -\dfrac{2}{9}\).
  3. No root gives \(A\), so compare \(x^2\) terms: \(0 = A + C\), so \(A = \dfrac{2}{9}\).
  4. Integrate: \(\dfrac{2}{9}\log|x - 1| - \dfrac{1}{3(x - 1)} - \dfrac{2}{9}\log|x + 2| + C\).

Answer\(\dfrac{2}{9}\log\left|\dfrac{x - 1}{x + 2}\right| - \dfrac{1}{3(x - 1)} + C\)

Example 5: An improper fraction

Medium

Evaluate \(\displaystyle\int \frac{x^2 + 1}{x^2 - 5x + 6}\,dx\).

  1. Same degree on top and bottom, so divide: \(\dfrac{x^2 + 1}{x^2 - 5x + 6} = 1 + \dfrac{5x - 5}{(x - 2)(x - 3)}\).
  2. Split: \(5x - 5 = A(x - 3) + B(x - 2)\). \(x = 2\): \(5 = -A\), \(A = -5\). \(x = 3\): \(10 = B\).
  3. So the integrand is \(1 - \dfrac{5}{x - 2} + \dfrac{10}{x - 3}\).

Answer\(x - 5\log|x - 2| + 10\log|x - 3| + C\)

Example 6: A quadratic factor

Exam level

Evaluate \(\displaystyle\int \frac{dx}{(x + 1)(x^2 + 1)}\).

  1. \(x^2 + 1\) does not factorise, so write \(\dfrac{A}{x + 1} + \dfrac{Bx + C}{x^2 + 1}\). Then \(1 = A(x^2 + 1) + (Bx + C)(x + 1)\).
  2. \(x = -1\): \(1 = 2A\), \(A = \dfrac{1}{2}\).
  3. Compare \(x^2\): \(0 = A + B\), so \(B = -\dfrac{1}{2}\). Compare constants: \(1 = A + C\), so \(C = \dfrac{1}{2}\).
  4. The integrand is \(\dfrac{1}{2}\cdot\dfrac{1}{x + 1} - \dfrac{1}{2}\cdot\dfrac{x}{x^2 + 1} + \dfrac{1}{2}\cdot\dfrac{1}{x^2 + 1}\).

Answer\(\dfrac{1}{2}\log|x + 1| - \dfrac{1}{4}\log(x^2 + 1) + \dfrac{1}{2}\tan^{-1}x + C\)

Example 7: Using x² = t

Exam level

Evaluate \(\displaystyle\int \frac{x^2}{(x^2 + 1)(x^2 + 4)}\,dx\).

  1. From the \(x^2 = t\) section, the integrand is \(-\dfrac{1}{3}\cdot\dfrac{1}{x^2 + 1} + \dfrac{4}{3}\cdot\dfrac{1}{x^2 + 4}\).
  2. \(\displaystyle\int \frac{dx}{x^2 + 1} = \tan^{-1}x\) and \(\displaystyle\int \frac{dx}{x^2 + 4} = \frac{1}{2}\tan^{-1}\frac{x}{2}\).
  3. So the answer is \(-\dfrac{1}{3}\tan^{-1}x + \dfrac{4}{3}\cdot\dfrac{1}{2}\tan^{-1}\dfrac{x}{2} + C\).

Answer\(-\dfrac{1}{3}\tan^{-1}x + \dfrac{2}{3}\tan^{-1}\dfrac{x}{2} + C\)

Example 8: Substitute first, then split

Exam level

Evaluate \(\displaystyle\int \frac{e^x}{(e^x + 1)(e^x + 2)}\,dx\).

  1. Put \(t = e^x\), \(dt = e^x\,dx\). The integral becomes \(\displaystyle\int \frac{dt}{(t + 1)(t + 2)}\).
  2. Split: \(\dfrac{1}{(t + 1)(t + 2)} = \dfrac{1}{t + 1} - \dfrac{1}{t + 2}\).
  3. Integrate: \(\log|t + 1| - \log|t + 2| + C\). Both brackets are positive because \(e^x > 0\).

Answer\(\log\dfrac{e^x + 1}{e^x + 2} + C\)

Vipul Sir's tip

After finding \(A\), \(B\) and \(C\), put \(x = 0\) (or any value you haven't used) into both sides of the split. If the two sides don't match, a constant is wrong, and you have caught it before integrating. I make every student do this check until it becomes a reflex.

06

Common mistakes

1. Splitting an improper fraction without dividing

\(\dfrac{x^2}{(x - 1)(x + 1)} = \dfrac{A}{x - 1} + \dfrac{B}{x + 1}\) has no solution: the right side always has a numerator of degree 1, and the left side has \(x^2\).

Divide first: \(\dfrac{x^2}{x^2 - 1} = 1 + \dfrac{1}{x^2 - 1}\). Then split the proper part.

2. Leaving out a power of a repeated factor

For \(\dfrac{x}{(x - 1)^2(x + 2)}\), writing only \(\dfrac{A}{x - 1} + \dfrac{C}{x + 2}\) is wrong. You need \(\dfrac{B}{(x - 1)^2}\) as well, as in Example 4. Without it the equations for the constants have no solution.

3. A constant over a quadratic factor

For \(\dfrac{1}{(x + 1)(x^2 + 1)}\), the second fraction must be \(\dfrac{Bx + C}{x^2 + 1}\), not \(\dfrac{B}{x^2 + 1}\). With only a constant on top, the \(x^2\), \(x\) and constant terms give three equations in two unknowns, and they don't agree.

07

Practice questions

Try each one on paper before you open the answer.

Q1Evaluate \(\displaystyle\int \frac{dx}{x^2 - 9}\).

\(\dfrac{1}{(x - 3)(x + 3)} = \dfrac{1}{6}\left(\dfrac{1}{x - 3} - \dfrac{1}{x + 3}\right)\).

Answer: \(\dfrac{1}{6}\log\left|\dfrac{x - 3}{x + 3}\right| + C\).

Q2Evaluate \(\displaystyle\int \frac{2x + 1}{(x + 2)(x - 3)}\,dx\).

\(2x + 1 = A(x - 3) + B(x + 2)\). \(x = -2\): \(A = \dfrac{3}{5}\). \(x = 3\): \(B = \dfrac{7}{5}\).

Answer: \(\dfrac{3}{5}\log|x + 2| + \dfrac{7}{5}\log|x - 3| + C\).

Q3Evaluate \(\displaystyle\int \frac{dx}{x(x + 1)^2}\).

\(\dfrac{A}{x} + \dfrac{B}{x + 1} + \dfrac{C}{(x + 1)^2}\): \(x = 0\) gives \(A = 1\), \(x = -1\) gives \(C = -1\), and the \(x^2\) terms give \(A + B = 0\), so \(B = -1\).

Answer: \(\log|x| - \log|x + 1| + \dfrac{1}{x + 1} + C\).

Q4Evaluate \(\displaystyle\int \frac{x}{(x - 1)(x^2 + 1)}\,dx\).

\(\dfrac{A}{x - 1} + \dfrac{Bx + C}{x^2 + 1}\): \(A = \dfrac{1}{2}\), \(B = -\dfrac{1}{2}\), \(C = \dfrac{1}{2}\).

Answer: \(\dfrac{1}{2}\log|x - 1| - \dfrac{1}{4}\log(x^2 + 1) + \dfrac{1}{2}\tan^{-1}x + C\).

Q5Evaluate \(\displaystyle\int \frac{dx}{(x^2 + 1)(x^2 + 9)}\).

With \(t = x^2\): \(\dfrac{1}{(t + 1)(t + 9)} = \dfrac{1}{8}\left(\dfrac{1}{t + 1} - \dfrac{1}{t + 9}\right)\).

Answer: \(\dfrac{1}{8}\tan^{-1}x - \dfrac{1}{24}\tan^{-1}\dfrac{x}{3} + C\).

Q6Evaluate \(\displaystyle\int \frac{x^2}{(x - 1)(x - 2)}\,dx\).

Improper, so divide: \(1 + \dfrac{3x - 2}{(x - 1)(x - 2)}\). Then \(3x - 2 = A(x - 2) + B(x - 1)\) gives \(A = -1\), \(B = 4\).

Answer: \(x - \log|x - 1| + 4\log|x - 2| + C\).

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

08

Frequently asked questions

What are partial fractions?

Simpler fractions that add up to a given rational function. For example, \(\dfrac{1}{x^2 - 1} = \dfrac{1}{2}\left(\dfrac{1}{x - 1} - \dfrac{1}{x + 1}\right)\). Integrating the pieces is easy, which is why the method is used in integration.

When can I use partial fractions?

When the integrand is a polynomial divided by a polynomial and the denominator factorises into linear factors, repeated linear factors or quadratics that don't factorise further. If the numerator's degree is not less than the denominator's, divide first.

What if the denominator has a quadratic factor?

If the quadratic has real roots, factorise it into two linear factors. If it doesn't (negative discriminant), give it a numerator of the form \(Bx + C\). The \(x\) part integrates to a log and the constant part to a \(\tan^{-1}\).

What is the fastest way to find A, B and C?

Multiply out, then put \(x\) equal to each root of the denominator; each root removes all but one constant. For anything left (repeated or quadratic factors), compare the coefficient of the highest power of \(x\). Then check with a value like \(x = 0\). The next lesson, definite integration, uses these results with limits.

Related lessons

← All integration lessons
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

Class 11 & 12 Maths

Integration gets easier once you can spot the method.

Concept-first classes in small batches in Goregaon and Vile Parle, or online, for HSC, CBSE and ICSE students. Your first class is free.

WhatsApp↗