Integration by partial fractions

Some fractions refuse to integrate directly no matter how hard you stare at them — 3x+5(x−1)(x+2)\dfrac{3x+5}{(x-1)(x+2)} is not the derivative of anything obvious, and no substitution simplifies it. Integration by partial fractions is the fix: split a rational function P(x)Q(x)\dfrac{P(x)}{Q(x)} into a sum of simpler fractions — one per factor of the denominator — each of which integrates to a standard logarithm or an inverse-tangent form. This is one of the three core techniques in the Integrals chapter of CBSE Class 12 Mathematics, used whenever the integrand is a ratio of polynomials with no clean derivative-of-denominator relationship. The syllabus keeps to three factor patterns: distinct linear factors, repeated linear factors, and irreducible quadratic factors. Master the decomposition templates and two ways to pin down the unknown constants — substitution and coefficient comparison — and the integral itself becomes routine.

The core insight

Split P(x)Q(x)\dfrac{P(x)}{Q(x)} into a sum of simple fractions matching the factors of Q(x)Q(x), then integrate each piece using the standard log and arctan forms.

The core idea

Proper vs improper. A rational function P(x)Q(x)\dfrac{P(x)}{Q(x)} is proper when the degree of PP is less than the degree of QQ. If it is improper (degree of P≥P \ge degree of QQ), do polynomial long division first, writing it as a quotient polynomial plus a proper remainder fraction, and apply partial fractions only to that remainder.

Factor and template. Factor Q(x)Q(x) completely, then assign one partial-fraction term per factor, with constants A,B,…A, B, \dots to be found:

P(x)Q(x)=Ax−a  +  Bx−b  +  Cx+Dex2+fx+g  +  ⋯\frac{P(x)}{Q(x)} = \frac{A}{x-a} \;+\; \frac{B}{x-b} \;+\; \frac{Cx+D}{ex^2+fx+g} \;+\; \cdots

where: each linear factor (x−a)(x-a) contributes a single term Ax−a\dfrac{A}{x-a}; a repeated linear factor (x−a)2(x-a)^2 contributes two terms, Ax−a+B(x−a)2\dfrac{A}{x-a}+\dfrac{B}{(x-a)^2}; and an irreducible quadratic (ex2+fx+g)(ex^2+fx+g), one with no real roots, contributes a term with a linear numerator, Cx+Dex2+fx+g\dfrac{Cx+D}{ex^2+fx+g}, never a bare constant.

Figure
A denominator factor on the left mapped by an arrow to its matching partial fraction template on the right, shown for a linear factor, a repeated linear factor, and an irreducible quadratic factor
Factor of Q(x) — matching partial-fraction term (x - a) A / (x - a) (x - a)^2 A / (x - a) + B / (x - a)^2 ax^2 + bx + c, no real roots (Ax + B) / (ax^2 + bx + c) quadratic numerator must be linear, never a bare constant

Finding the constants. Clear denominators by multiplying both sides by Q(x)Q(x), then find A,B,…A, B, \dots either by substituting convenient xx-values (especially the roots of linear factors, which make every other term vanish) or by comparing coefficients of matching powers of xx. When an irreducible quadratic is present there is no real root to substitute, so coefficient comparison is the reliable route. Many problems combine both strategies: substitute at the roots of the linear factors first to knock out those constants quickly, then compare whatever coefficients remain to pin down the rest — this mixed approach is exactly what the competitive-stretch example below needs, since it has one linear factor and one irreducible quadratic factor together. Once split, each term integrates by a standard form: Ax−a→Aln⁡∣x−a∣\dfrac{A}{x-a}\to A\ln|x-a|, A(x−a)2→−Ax−a\dfrac{A}{(x-a)^2}\to -\dfrac{A}{x-a}, and a quadratic-denominator term is split further into a "derivative of denominator" piece (a logarithm) plus a piece matching ∫dxax2+bx+c\int\dfrac{dx}{ax^2+bx+c} (a standard integral covered separately in this chapter). It helps to recognize this technique as one of three main tools for the Integrals chapter — alongside substitution and integration by parts — and to reach for it specifically when the integrand is a clean ratio of polynomials rather than a product involving trigonometric or exponential factors.

Derivation ADecomposing and integrating a rational function with two distinct linear factors

The goal is to show, end to end, how a rational integrand with a factorable denominator of two distinct linear pieces is converted into a sum of two log terms — the most common pattern this technique produces, and the one worth being fastest at, since a correct root-substitution collapses each unknown constant to a one-line calculation.

Step 1. Confirm the fraction is proper (numerator degree less than denominator degree) — here numerator degree 1<1 < denominator degree 22, so no long division is needed — then write the general template with unknown constants for each distinct linear factor: P(x)(x−a)(x−b)=Ax−a+Bx−b\dfrac{P(x)}{(x-a)(x-b)} = \dfrac{A}{x-a} + \dfrac{B}{x-b}.

Step 2. Clear denominators by multiplying both sides by (x−a)(x−b)(x-a)(x-b), giving the polynomial identity P(x)=A(x−b)+B(x−a)P(x) = A(x-b) + B(x-a), which must hold for every value of xx.

Step 3. Exploit the roots. Setting x=ax = a makes the BB term vanish (its factor (x−a)(x-a) becomes zero), instantly giving AA; setting x=bx = b isolates BB the same way. This substitution trick is what makes distinct-linear-factor cases the fastest to solve.

Step 4. Integrate each term using ∫kx−a dx=kln⁡∣x−a∣+C\int \dfrac{k}{x-a}\,dx = k\ln|x-a| + C, and add the results, giving a sum of natural-log terms as the final antiderivative. This same four-step skeleton — template, clear, substitute roots, integrate log terms — generalizes directly: with three distinct linear factors you would simply carry three constants and three roots through the identical logic instead of two.

Worked example

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

Step 1. The denominator has two distinct linear factors, so write 3x+5(x−1)(x+2)=Ax−1+Bx+2\dfrac{3x+5}{(x-1)(x+2)} = \dfrac{A}{x-1} + \dfrac{B}{x+2}.

Step 2. Clear denominators: 3x+5=A(x+2)+B(x−1)3x+5 = A(x+2) + B(x-1).

Step 3. Set x=1x=1: 3(1)+5=A(3)⇒8=3A⇒A=833(1)+5 = A(3) \Rightarrow 8 = 3A \Rightarrow A = \dfrac83. Set x=−2x=-2: 3(−2)+5=B(−3)⇒−1=−3B⇒B=133(-2)+5 = B(-3) \Rightarrow -1 = -3B \Rightarrow B = \dfrac13.

Step 4. Integrate term by term:

∫3x+5(x−1)(x+2) dx=83ln⁡∣x−1∣+13ln⁡∣x+2∣+C\int \frac{3x+5}{(x-1)(x+2)}\,dx = \frac83\ln|x-1| + \frac13\ln|x+2| + C

Answer: 83ln⁡∣x−1∣+13ln⁡∣x+2∣+C\dfrac83\ln|x-1| + \dfrac13\ln|x+2| + C.

Competitive stretch

For a mixed case with a linear and an irreducible quadratic factor, ∫2x2+x+1x(x2+1) dx\displaystyle\int \frac{2x^2+x+1}{x(x^2+1)}\,dx needs the template Ax+Bx+Cx2+1\dfrac{A}{x} + \dfrac{Bx+C}{x^2+1}. Clearing denominators gives 2x2+x+1=A(x2+1)+Bx2+Cx2x^2+x+1 = A(x^2+1) + Bx^2 + Cx. Setting x=0x=0 gives A=1A=1; comparing x2x^2 coefficients gives 2=A+B⇒B=12 = A+B \Rightarrow B=1; comparing xx coefficients gives C=1C=1. Splitting x+1x2+1\dfrac{x+1}{x^2+1} into xx2+1+1x2+1\dfrac{x}{x^2+1}+\dfrac{1}{x^2+1} and integrating gives ln⁡∣x∣+12ln⁡(x2+1)+tan⁡−1x+C\ln|x| + \tfrac12\ln(x^2+1) + \tan^{-1}x + C.

Common traps

  • Applying partial fractions directly to an improper fraction (numerator degree greater than or equal to denominator degree) without first doing polynomial long division.
  • Using the wrong template for a repeated linear factor — (x−a)2(x-a)^2 needs two terms, Ax−a+B(x−a)2\dfrac{A}{x-a}+\dfrac{B}{(x-a)^2}, not just A(x−a)2\dfrac{A}{(x-a)^2}.
  • Using a constant numerator Aax2+bx+c\dfrac{A}{ax^2+bx+c} for an irreducible quadratic factor instead of the correct linear numerator Ax+Bax2+bx+c\dfrac{Ax+B}{ax^2+bx+c}.
  • Forgetting to split the numerator of a quadratic-denominator term into a derivative-of-denominator part plus a constant before integrating — it cannot be one clean logarithm unless the numerator already matches the denominator's derivative.

Ask the tutor: unsure which partial-fraction template fits your denominator, or want a walkthrough of solving for the unknown constants on your own problem?

Why does substituting the root of a linear factor work so well to find the constants?

When you clear denominators, you get a polynomial identity like P(x)=A(x−b)+B(x−a)P(x) = A(x-b) + B(x-a) that must hold for every xx, including x=ax=a and x=bx=b themselves — it is an identity, not just an equation at one point, which is exactly why plugging in any value is legitimate. Plugging in x=ax=a makes the factor (x−a)(x-a) multiplying BB vanish, leaving only the AA term — so you solve for AA in one line instead of a system of equations. It only works cleanly at the roots of the linear factors; for an irreducible quadratic there is no real root, so you switch to comparing coefficients instead. As a habit, always plug your final constants back into the cleared equation and check it holds for one extra value of xx — this catches sign slips before they cost you the whole integral.

How do I know whether to use substitution or coefficient comparison?

Use substitution at every real root of a linear factor first — it is faster and gives constants directly with almost no algebra. If any factor is a repeated linear factor or an irreducible quadratic, you will run out of convenient roots, so compare coefficients of matching powers of xx on both sides of the cleared equation for whatever constants remain. Most exam problems combine both: substitute at the linear roots, then compare one or two leftover coefficients — exactly the pattern in the competitive-stretch example, where x=0x=0 gives AA instantly and the x2x^2 and xx coefficients then hand over BB and CC.

What if the denominator does not factor nicely over the rationals?

The CBSE syllabus restricts problems to denominators that factor into the three standard patterns covered here — distinct linear factors, repeated linear factors, and irreducible quadratics with integer or simple rational coefficients. If a denominator does not factor this way, the problem is outside the syllabus scope; recheck your factoring rather than assuming a harder case is intended. In practice, exam denominators are deliberately built from small integer roots or a recognizable perfect-square pattern, so a quick trial of small integer values (or a fast quadratic-formula check for real roots) is usually enough to reveal the correct factorization before you commit to a template.

Before this

Where this leads