Skip to main content

Integration by partial fractions in HSC Mathematics Extension 2: decomposing rational functions over linear, repeated and irreducible quadratic factors and integrating

Syllabus dot point

“Decompose rational functions into partial fractions and use the decomposition to integrate, including linear, repeated and irreducible quadratic factors”

HSCMaths Extension 2Further Integration (MEX-C1)12 min read

Quick answer

A proper rational function (numerator degree less than denominator degree) can be written as a sum of partial fractions, one for each factor of the denominator. Distinct linear factors give terms Ax−a\frac{A}{x - a}; repeated factors give Ax−a+B(x−a)2\frac{A}{x-a} + \frac{B}{(x-a)^2}; irreducible quadratics give Bx+Cx2+px+q\frac{Bx + C}{x^2 + px + q}. Each piece integrates to a logarithm or arctangent.

Jump to a section
  1. What this dot point is asking
  2. When to use partial fractions
  3. Distinct linear factors
  4. Repeated linear factors
  5. Irreducible quadratic factors
  6. The cover-up method
  7. Finding the unknown constants
  8. Integrating each piece
  9. How exam questions ask about partial fractions
  10. Exam-style questions

What this dot point is asking

NESA wants you to integrate rational functions (a polynomial divided by a polynomial) by first splitting them into simpler partial fractions. You must recognise the three cases (distinct linear factors, repeated linear factors, and irreducible quadratic factors), write the correct decomposition form for each, find the unknown constants, and integrate the resulting pieces into logarithms and arctangents. The skill is examined both as a standalone "express as partial fractions" question and as the engine inside a larger integral.

When to use partial fractions

The method applies to proper rational functions, where the numerator has lower degree than the denominator. That degree condition is not a technicality, it is what guarantees a decomposition exists with constant (and linear) numerators. If the function is improper (numerator degree greater than or equal to denominator degree), you must first divide using polynomial long division to extract a polynomial part plus a proper remainder, then decompose only the remainder. Skipping the division on an improper fraction produces a system of equations with no solution, which is a sure sign you have started in the wrong place.

The deeper reason the method is worth the effort: a single complicated rational function has no obvious antiderivative, but each partial fraction is a textbook standard form. So decomposition converts a hard problem into a sum of easy ones, and you can predict the shape of the answer (logarithms from linear factors, arctangents from irreducible quadratics) before doing any integrating.

Key fact

Every proper rational function factorises into partial fractions, one block per denominator factor: a distinct linear factor (x−a)(x - a) contributes Ax−a\dfrac{A}{x - a}; a repeated factor (x−a)2(x - a)^2 contributes Ax−a+B(x−a)2\dfrac{A}{x - a} + \dfrac{B}{(x - a)^2} (one term per power up to the multiplicity); an irreducible quadratic (x2+px+q)(x^2 + px + q) contributes Bx+Cx2+px+q\dfrac{Bx + C}{x^2 + px + q} (a full linear numerator). If the fraction is improper, divide first. Linear pieces integrate to logs; the quadratic piece integrates to a log plus an arctangent.

Distinct linear factors

If the denominator factorises into distinct linear factors, write one fraction per factor:

px+q(x−a)(x−b)=Ax−a+Bx−b.\frac{px + q}{(x - a)(x - b)} = \frac{A}{x - a} + \frac{B}{x - b}.

Multiply through by (x−a)(x−b)(x - a)(x - b) to clear denominators, then either equate coefficients or substitute convenient values of xx. Each term integrates as ∫Ax−a dx=Aln⁡∣x−a∣+C\int \dfrac{A}{x - a}\,dx = A\ln|x - a| + C.

Repeated linear factors

A repeated factor (x−a)2(x - a)^2 needs a separate term for every power up to the multiplicity, not just one term:

…(x−a)2=Ax−a+B(x−a)2.\frac{\ldots}{(x - a)^2} = \frac{A}{x - a} + \frac{B}{(x - a)^2}.

The reason both terms are needed is a counting argument: a proper fraction over (x−a)2(x - a)^2 has two degrees of freedom in its numerator, so the decomposition must also carry two unknowns. Using only B(x−a)2\dfrac{B}{(x-a)^2} throws one away and the system fails. A cube (x−a)3(x - a)^3 would need three terms, up to C(x−a)3\dfrac{C}{(x - a)^3}. The first term integrates to a logarithm; the higher terms integrate by the power rule, for example ∫B(x−a)2 dx=−Bx−a\int \dfrac{B}{(x - a)^2}\,dx = -\dfrac{B}{x - a}.

Irreducible quadratic factors

A quadratic x2+px+qx^2 + px + q with no real roots (negative discriminant, p2−4q<0p^2 - 4q < 0) cannot be split into real linear factors, so it gets a full linear numerator:

…x2+px+q=Bx+Cx2+px+q.\frac{\ldots}{x^2 + px + q} = \frac{Bx + C}{x^2 + px + q}.

A constant numerator is not enough here, for the same degrees-of-freedom reason: a proper fraction over a quadratic has a numerator of degree up to one, so you need both BB and CC. Such a term integrates in two pieces: split it into a part proportional to the derivative 2x+p2x + p of the denominator (which integrates to a logarithm) plus a leftover constant, which after completing the square integrates to an arctangent.

The cover-up method

For distinct linear factors there is a shortcut that avoids solving a system. To find the constant over (x−a)(x - a), multiply the whole identity by (x−a)(x - a) and then set x=ax = a: every other term still has a factor of (x−a)(x - a) in it and vanishes, leaving the constant alone. In practice you "cover up" the factor (x−a)(x - a) in the original denominator and evaluate what remains at x=ax = a. For 5x−3(x+1)(x−3)\dfrac{5x - 3}{(x + 1)(x - 3)}, the constant over (x+1)(x + 1) is found by covering (x+1)(x + 1) and putting x=−1x = -1 into 5x−3x−3=−8−4=2\dfrac{5x - 3}{x - 3} = \dfrac{-8}{-4} = 2. The cover-up method is fast and reliable for simple linear factors, but it only isolates constants over single linear factors; for repeated or irreducible-quadratic blocks you still need to equate coefficients for the remaining unknowns.

Finding the unknown constants

Two methods recover the constants AA, BB, CC after you clear the denominators, and good answers mix them. The cover-up (substitution) method substitutes the value of xx that makes one factor zero, instantly isolating the constant over that factor; it is fastest for distinct linear factors. The equate-coefficients method expands the right side and matches the coefficient of each power of xx on both sides, producing a small linear system; it is the reliable route when irreducible quadratics or repeated factors are involved, since not every constant can be isolated by a single substitution. The efficient workflow is to cover up the linear factors first, then equate one or two coefficients (often the highest power and the constant term) to pin down the rest. Always verify with a check value of xx, as in the worked examples below, before integrating.

Integrating each piece

Once decomposed, each fragment maps to a standard integral, and recognising the target shape in advance is a useful sanity check on your decomposition.

  • ∫Ax−a dx=Aln⁡∣x−a∣+C\displaystyle\int \frac{A}{x - a}\,dx = A\ln|x - a| + C (a logarithm; keep the absolute value).
  • ∫B(x−a)2 dx=−Bx−a+C\displaystyle\int \frac{B}{(x - a)^2}\,dx = -\frac{B}{x - a} + C (power rule, no logarithm).
  • ∫Bx+Cx2+px+q dx\displaystyle\int \frac{Bx + C}{x^2 + px + q}\,dx: write the numerator as B2(2x+p)\tfrac{B}{2}(2x + p) plus a constant. The first part gives B2ln⁡(x2+px+q)\tfrac{B}{2}\ln(x^2 + px + q) (no absolute value, since an irreducible quadratic is always positive); the leftover constant over the completed square gives an arctangent.

So the final answer to a partial-fractions integral is always a combination of logarithms and arctangents (plus possibly a polynomial, if the original fraction was improper).

How exam questions ask about partial fractions

  • "Express ……\dfrac{\ldots}{\ldots} as a sum of partial fractions." Decomposition only, no integration. Choose the correct form for each factor and find all constants; finish with the constants substituted in.
  • "Use partial fractions to find ∫…\int \ldots." Decompose first, then integrate term by term to logs and arctangents, with +C+C.
  • "Hence find ∫ab…\int_a^b \ldots" (definite). Decompose, integrate, then substitute the limits; the modulus inside the logs keeps everything real over the interval.
  • A denominator with an irreducible quadratic (x2+1x^2 + 1, x2+x+1x^2 + x + 1). Use a linear numerator Bx+CBx + C; expect an arctangent in the answer.
  • A repeated factor (x−a)2(x - a)^2 or (x+a)2(x + a)^2. Include both Ax−a\dfrac{A}{x - a} and B(x−a)2\dfrac{B}{(x - a)^2}; the second integrates without a log.
  • An improper-looking integrand (numerator degree ≥\ge denominator degree). Do polynomial long division first, then decompose the remainder.
Exam technique

Write the decomposition form before finding any constants, so the setup mark is secured even if the arithmetic slips. State the discriminant test in words when you use a Bx+CBx + C numerator ("x2+1x^2 + 1 is irreducible since its discriminant is negative"), which is exactly what markers want to see. Use cover-up to grab the linear-factor constants quickly, then equate coefficients for the rest, and do a quick check at a convenient value of xx before integrating. In the answer, keep absolute values inside logs over linear factors, drop them over an irreducible quadratic (it is always positive), and never lose the +C+C. For a definite integral, simplify the logs with log laws where it makes the final value cleaner.

Evaluate ∫3x+1(x−1)(x+2) dx\displaystyle\int \frac{3x + 1}{(x - 1)(x + 2)}\,dx (distinct linear factors)

Evaluate ∫3x+1(x−1)(x+2) dx\displaystyle\int \frac{3x + 1}{(x - 1)(x + 2)}\,dx with distinct linear factors

The integrand is a proper rational function with two distinct linear factors in the denominator. We split it into partial fractions, find the constants using the cover-up method, then integrate each piece as a logarithm.

Set up the partial fraction decomposition: Each distinct linear factor in the denominator contributes one fraction with a constant numerator. Write:

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

Multiply both sides through by (x−1)(x+2)(x - 1)(x + 2) to clear the denominators:

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

Find the constants using the cover-up method: Substitute the value of xx that makes each factor zero. Setting x=1x = 1 kills the BB term: 4=A(3)4 = A(3), so A=43A = \dfrac{4}{3}. Setting x=−2x = -2 kills the AA term: −5=B(−3)-5 = B(-3), so B=53B = \dfrac{5}{3}.

Integrate each partial fraction: Each term of the form Cx−a\dfrac{C}{x - a} integrates to Cln⁡∣x−a∣C\ln|x - a|. Combining the two pieces:

∫3x+1(x−1)(x+2) dx=43ln⁡∣x−1∣+53ln⁡∣x+2∣+C.\int \frac{3x + 1}{(x - 1)(x + 2)}\,dx = \frac{4}{3}\ln|x - 1| + \frac{5}{3}\ln|x + 2| + C.

Verify the decomposition: Check at x=0x = 0: the original integrand gives 1(−1)(2)=−12\dfrac{1}{(-1)(2)} = -\dfrac{1}{2}; the decomposition gives 4/3−1+5/32=−43+56=−86+56=−12\dfrac{4/3}{-1} + \dfrac{5/3}{2} = -\dfrac{4}{3} + \dfrac{5}{6} = -\dfrac{8}{6} + \dfrac{5}{6} = -\dfrac{1}{2}. The values match, confirming the constants are correct.

Final answer: ∫3x+1(x−1)(x+2) dx=43ln⁡∣x−1∣+53ln⁡∣x+2∣+C\displaystyle\int \frac{3x + 1}{(x - 1)(x + 2)}\,dx = \frac{4}{3}\ln|x - 1| + \frac{5}{3}\ln|x + 2| + C.

Evaluate ∫x+3(x−1)2 dx\displaystyle\int \frac{x + 3}{(x - 1)^2}\,dx (a repeated linear factor)

Evaluate ∫x+3(x−1)2 dx\displaystyle\int \frac{x + 3}{(x - 1)^2}\,dx with a repeated linear factor

A repeated factor needs one term per power, so the decomposition carries two unknowns even though there is only one distinct factor.

Write the form for a repeated factor: The factor (x−1)2(x - 1)^2 contributes a term for each power up to the multiplicity:

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

Multiply through by (x−1)2(x - 1)^2:

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

Find the constants: Cover-up still gives one of them: setting x=1x = 1 kills the AA term, so B=1+3=4B = 1 + 3 = 4. For AA, compare the coefficient of xx on each side: the left has 11, the right has AA, so A=1A = 1. (Equivalently, substitute any other value of xx.)

Integrate, noting the power-rule term: The first term gives a logarithm; the second integrates by the power rule, not to a log:

∫x+3(x−1)2 dx=∫1x−1 dx+∫4(x−1)2 dx=ln⁡∣x−1∣−4x−1+C.\int \frac{x + 3}{(x - 1)^2}\,dx = \int \frac{1}{x - 1}\,dx + \int \frac{4}{(x - 1)^2}\,dx = \ln|x - 1| - \frac{4}{x - 1} + C.

Final answer: ∫x+3(x−1)2 dx=ln⁡∣x−1∣−4x−1+C\displaystyle\int \frac{x + 3}{(x - 1)^2}\,dx = \ln|x - 1| - \frac{4}{x - 1} + C.

Evaluate ∫3x2+2x+1(x−1)(x2+1) dx\displaystyle\int \frac{3x^2 + 2x + 1}{(x - 1)(x^2 + 1)}\,dx (an irreducible quadratic)

Evaluate ∫3x2+2x+1(x−1)(x2+1) dx\displaystyle\int \frac{3x^2 + 2x + 1}{(x - 1)(x^2 + 1)}\,dx with an irreducible quadratic

The denominator mixes a linear factor with an irreducible quadratic, so the answer will contain both a logarithm and an arctangent.

Write the form with a linear numerator over the quadratic: Since x2+1x^2 + 1 has discriminant 0−4=−4<00 - 4 = -4 < 0 it is irreducible, so it gets a Bx+CBx + C numerator:

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

Multiply through by (x−1)(x2+1)(x - 1)(x^2 + 1):

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

Find the constants by mixing cover-up and coefficients: Cover-up the linear factor: at x=1x = 1,   3+2+1=A(2)\;3 + 2 + 1 = A(2), so A=3A = 3. Compare x2x^2 coefficients: 3=A+B=3+B3 = A + B = 3 + B, so B=0B = 0. Substitute x=0x = 0 for the constant: 1=A−C=3−C1 = A - C = 3 - C, so C=2C = 2.

Integrate each piece to a log and an arctangent: With B=0B = 0 the quadratic piece is just 2x2+1\dfrac{2}{x^2 + 1}, a standard arctangent form:

∫3x2+2x+1(x−1)(x2+1) dx=∫3x−1 dx+∫2x2+1 dx=3ln⁡∣x−1∣+2arctan⁡x+C.\int \frac{3x^2 + 2x + 1}{(x - 1)(x^2 + 1)}\,dx = \int \frac{3}{x - 1}\,dx + \int \frac{2}{x^2 + 1}\,dx = 3\ln|x - 1| + 2\arctan x + C.

Final answer: ∫3x2+2x+1(x−1)(x2+1) dx=3ln⁡∣x−1∣+2arctan⁡x+C\displaystyle\int \frac{3x^2 + 2x + 1}{(x - 1)(x^2 + 1)}\,dx = 3\ln|x - 1| + 2\arctan x + C.

Edge case: an improper fraction, ∫x2x2−1 dx\displaystyle\int \frac{x^2}{x^2 - 1}\,dx

Integrate the improper fraction ∫x2x2−1 dx\displaystyle\int \frac{x^2}{x^2 - 1}\,dx

The numerator degree equals the denominator degree, so this is improper and must be divided before any decomposition.

Divide first to extract the polynomial part: Because the degrees are equal, write x2=(x2−1)+1x^2 = (x^2 - 1) + 1, so

x2x2−1=1+1x2−1.\frac{x^2}{x^2 - 1} = 1 + \frac{1}{x^2 - 1}.

The constant 11 is the polynomial part; only the proper remainder 1x2−1\dfrac{1}{x^2 - 1} is decomposed.

Decompose the proper remainder: Factor x2−1=(x−1)(x+1)x^2 - 1 = (x - 1)(x + 1) and write 1(x−1)(x+1)=Ax−1+Bx+1\dfrac{1}{(x-1)(x+1)} = \dfrac{A}{x - 1} + \dfrac{B}{x + 1}. Cover-up gives A=12A = \dfrac{1}{2} (at x=1x = 1) and B=−12B = -\dfrac{1}{2} (at x=−1x = -1).

Integrate the polynomial part and the fractions:

∫x2x2−1 dx=∫1 dx+∫1/2x−1 dx−∫1/2x+1 dx=x+12ln⁡∣x−1∣−12ln⁡∣x+1∣+C.\int \frac{x^2}{x^2 - 1}\,dx = \int 1\,dx + \int \frac{1/2}{x - 1}\,dx - \int \frac{1/2}{x + 1}\,dx = x + \tfrac{1}{2}\ln|x - 1| - \tfrac{1}{2}\ln|x + 1| + C.

This can be tidied with log laws to x+12ln⁡∣x−1x+1∣+Cx + \tfrac{1}{2}\ln\left|\dfrac{x - 1}{x + 1}\right| + C.

Final answer: ∫x2x2−1 dx=x+12ln⁡∣x−1x+1∣+C\displaystyle\int \frac{x^2}{x^2 - 1}\,dx = x + \tfrac{1}{2}\ln\left|\frac{x - 1}{x + 1}\right| + C.

Common traps
Decomposing an improper fraction directly
If the numerator degree is at least the denominator degree, divide first. Skipping this gives an inconsistent system with no solution.
Too few terms for a repeated factor
A factor (x−a)2(x - a)^2 needs both Ax−a\dfrac{A}{x-a} and B(x−a)2\dfrac{B}{(x-a)^2}. Using only one term loses a degree of freedom and the system fails.
A constant numerator over an irreducible quadratic
An irreducible quadratic factor needs a linear numerator Bx+CBx + C, not just a constant.
Treating the repeated term as a logarithm
B(x−a)2\dfrac{B}{(x - a)^2} integrates by the power rule to −Bx−a-\dfrac{B}{x - a}, not to a log.
Dropping the absolute value in the logarithm
Integrating 1x−a\dfrac{1}{x - a} gives ln⁡∣x−a∣\ln|x - a|; the modulus matters for negative arguments. (An irreducible quadratic is always positive, so its log needs no modulus.)

Exam-style questions

Questions in the style of NESA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

HSC 2023-style4 marks
Find ∫025x−3(x+1)(x−3) dx\displaystyle\int_0^2 \frac{5x - 3}{(x + 1)(x - 3)} \, dx.
Show worked answer →

Decompose into partial fractions over the distinct linear factors: 5x−3(x+1)(x−3)=Ax+1+Bx−3\frac{5x - 3}{(x + 1)(x - 3)} = \frac{A}{x + 1} + \frac{B}{x - 3}.

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

  • At x=3x = 3: 12=4B12 = 4B, so B=3B = 3.
  • At x=−1x = -1: −8=−4A-8 = -4A, so A=2A = 2.

So the integrand is 2x+1+3x−3\frac{2}{x + 1} + \frac{3}{x - 3}, and

∫02=[2ln⁡∣x+1∣+3ln⁡∣x−3∣]02\int_0^2 = \left[2\ln|x + 1| + 3\ln|x - 3|\right]_0^2.

At x=2x = 2: 2ln⁡3+3ln⁡1=2ln⁡32\ln 3 + 3\ln 1 = 2\ln 3. At x=0x = 0: 2ln⁡1+3ln⁡3=3ln⁡32\ln 1 + 3\ln 3 = 3\ln 3.

Value =2ln⁡3−3ln⁡3=−ln⁡3= 2\ln 3 - 3\ln 3 = -\ln 3 (equivalently ln⁡13\ln\frac{1}{3}).

Mark notes: 1 mark for the partial fraction setup, 1 mark for A=2A = 2 and B=3B = 3, 1 mark for the antiderivative with logs, 1 mark for evaluating to −ln⁡3-\ln 3 (note ∣x−3∣|x - 3| keeps the logs real on [0,2][0, 2]).

HSC 2024-style3 marks
Use partial fractions to find ∫3x2+2x+1(x−1)(x2+1) dx\displaystyle\int \frac{3x^2 + 2x + 1}{(x - 1)(x^2 + 1)} \, dx.
Show worked answer →

The denominator has a linear factor and an irreducible quadratic factor, so write

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

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

  • At x=1x = 1: 6=2A6 = 2A, so A=3A = 3.
  • At x=0x = 0: 1=A−C=3−C1 = A - C = 3 - C, so C=2C = 2.
  • Comparing x2x^2 coefficients: 3=A+B=3+B3 = A + B = 3 + B, so B=0B = 0.

The integrand is 3x−1+2x2+1\frac{3}{x - 1} + \frac{2}{x^2 + 1}, so

∫=3ln⁡∣x−1∣+2arctan⁡x+C\int = 3\ln|x - 1| + 2\arctan x + C.

Mark notes: 1 mark for the correct partial fraction form with a linear numerator over the quadratic, 1 mark for finding A=3A = 3, B=0B = 0, C=2C = 2, 1 mark for the primitive 3ln⁡∣x−1∣+2arctan⁡x+C3\ln|x - 1| + 2\arctan x + C.

HSC 2021-style3 marks
Express 3x2−5(x−2)(x2+x+1)\dfrac{3x^2 - 5}{(x - 2)(x^2 + x + 1)} as a sum of partial fractions over the real numbers.
Show worked answer →

Since x2+x+1x^2 + x + 1 is irreducible over the reals (its discriminant 1−4=−3<01 - 4 = -3 < 0), use a linear numerator over it:

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

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

  • At x=2x = 2: 7=A(4+2+1)=7A7 = A(4 + 2 + 1) = 7A, so A=1A = 1.
  • Comparing x2x^2 coefficients: 3=A+B=1+B3 = A + B = 1 + B, so B=2B = 2.
  • Comparing constants: −5=A−2C=1−2C-5 = A - 2C = 1 - 2C, so C=3C = 3.

(Check the xx coefficient: A−2B+C=1−4+3=0A - 2B + C = 1 - 4 + 3 = 0, matching the 00 coefficient of xx on the left.)

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

Mark notes: 1 mark for the correct form with Bx+CBx + C over the irreducible quadratic, 1 mark for A=1A = 1, 1 mark for B=2B = 2 and C=3C = 3.

Practise this

Sources & how we know this

ExamExplained