Intuition Why this page exists
The parent note taught the recipe . This page is the stress test : we hunt down every kind of problem the topic can throw at you — every factor type, the degenerate cases people forget, a word problem, and an exam-style twist — and grind each one to a final answer you can check. By the end, no problem shape should be able to surprise you.
Before anything, one promise: I will not use a symbol without saying what it means, and every step gets a "Why?". So:
Definition The words we will use over and over
P ( x ) , Q ( x ) ::: two polynomials (sums of powers of x like 3 x 2 − x + 1 ). We integrate the fraction Q ( x ) P ( x ) .
deg ::: the degree — the highest power of x . deg ( 3 x 2 − x ) = 2 .
proper ::: deg P < deg Q . Only then can we split directly (see parent).
irreducible quadratic ::: a quadratic x 2 + b x + c that has no real roots , so it cannot be broken into two linear factors. We test with the discriminant b 2 − 4 c : if it is negative , no real roots exist.
ln ::: the natural logarithm, the function whose slope at x is 1/ x . This is why ∫ x 1 d x = ln ∣ x ∣ . The absolute value ∣ ⋅ ∣ is there because ln only accepts positive inputs, but x may be negative — so we always feed it the size of x .
arctan ::: the inverse of tan : it answers "which angle has this tangent?" We meet it because ∫ x 2 + 1 1 d x = arctan x .
Every partial-fraction integral you will ever meet lands in one of these cells. Each example below is tagged with the cell it covers.
Cell
What makes it special
Example
A distinct linear
all factors linear, all different
Ex 1
B repeated linear
a factor like ( x − a ) 2
Ex 2
C irreducible quadratic → arctan
leftover constant over a quadratic
Ex 3
D quadratic → log + arctan
numerator forces both pieces
Ex 4
E improper (degenerate degree)
deg P ≥ deg Q : must divide first
Ex 5
F repeated quadratic
( x 2 + c ) 2 in the denominator
Ex 6
G "fake" quadratic (sign trap)
quadratic that secretly factors
Ex 7
H word problem
rate/mixing model, real units
Ex 8
I exam twist
Laplace inverse via partial fractions
Ex 9
J mixed (linear + quadratic)
both templates in one problem
Ex 10
∫ x 2 − x − 6 5 x − 4 d x
Forecast: guess now — will the answer be logs, arctans, or a mix? (It should be pure logs: linear factors only.)
1. Factor the denominator. Why this step? We must know the pieces before we can un-add them.
x 2 − x − 6 = ( x − 3 ) ( x + 2 ) .
Proper? deg 1 < deg 2 ✓.
2. Write the template. Why? Each distinct linear factor gets one constant on top ([!formula] parent table).
( x − 3 ) ( x + 2 ) 5 x − 4 = x − 3 A + x + 2 B .
3. Cover-up for A . Why? Multiplying by ( x − 3 ) and setting x = 3 kills the B term, which still carries ( x − 3 ) → 0 .
A = 3 + 2 5 ( 3 ) − 4 = 5 11 .
4. Cover-up for B . Why the same trick at x = − 2 ? Multiplying by ( x + 2 ) and setting x = − 2 kills the A term (it carries ( x + 2 ) → 0 ), leaving B alone.
B = − 2 − 3 5 ( − 2 ) − 4 = − 5 − 14 = 5 14 .
5. Integrate each piece. Why log? ∫ x − a A d x = A ln ∣ x − a ∣ .
∫ = 5 11 ln ∣ x − 3∣ + 5 14 ln ∣ x + 2∣ + C .
Verify: recombine — x − 3 11/5 + x + 2 14/5 = ( x − 3 ) ( x + 2 ) 5 11 ( x + 2 ) + 5 14 ( x − 3 ) = x 2 − x − 6 5 x − 4 ✓ (checked in VERIFY).
∫ x 2 ( x − 3 ) 2 x − 1 d x
Here x 2 = ( x − 0 ) 2 is a repeated linear factor.
Forecast: how many unknowns? (Count: deg Q = 3 , so exactly three.)
1. Full template — every power down. Why? One term x 2 A 2 can only supply a constant numerator; we need the x A 1 term to reach the linear freedom (parent intuition box).
x 2 ( x − 3 ) 2 x − 1 = x A 1 + x 2 A 2 + x − 3 B .
2. Cover-up for A 2 (top power). Why it works only for the top power: multiplying by x 2 leaves A 2 bare at x = 0 .
A 2 = 0 − 3 2 ( 0 ) − 1 = − 3 − 1 = 3 1 .
3. Cover-up for B . Why? Multiplying by ( x − 3 ) and setting x = 3 kills both A terms (each keeps an x 2 that stays finite while their denominators blow up — more directly, multiplying by ( x − 3 ) leaves the A terms carrying ( x − 3 ) → 0 ), so only B survives.
B = 3 2 2 ( 3 ) − 1 = 9 5 .
4. Find A 1 by coefficient matching. Why? A 1 has no clean cover-up. Clear denominators:
2 x − 1 = A 1 x ( x − 3 ) + A 2 ( x − 3 ) + B x 2 .
Match the x 2 coefficient (fastest — only A 1 and B live there):
0 = A 1 + B ⇒ A 1 = − 9 5 .
5. Integrate. Why no log for the x 2 piece? ∫ x − 2 d x = − x − 1 (power rule; exponent isn't − 1 ).
∫ = − 9 5 ln ∣ x ∣ − 3 1 ⋅ x 1 + 9 5 ln ∣ x − 3∣ + C .
Verify: at x = 1 : LHS integrand 1 ⋅ ( − 2 ) 2 − 1 = − 2 1 ; pieces 1 − 5/9 + 1 1/3 + − 2 5/9 = − 2 1 ✓ (VERIFY).
Figure s01 — Alt-text: the red curve is the integrand x 2 + 4 1 , a smooth symmetric bump peaking at x = 0 . The black curve is the running area swept out from the far left; it climbs steeply where the bump is tall and flattens out where the bump is small, tracing an S. That S is exactly the shape of arctan — which is our clue that the antiderivative is an arctan and nothing else.
∫ x 2 + 4 4 d x
This is the degenerate quadratic case: numerator is a bare constant, no x term.
Forecast: log or arctan? (No x on top means no derivative-of-denominator to log — so pure arctan.)
1. Confirm irreducibility. Discriminant of x 2 + 0 x + 4 is 0 − 16 = − 16 < 0 ✓ — no real roots, cannot factor.
2. Match the standard arctan shape. Why this tool and not another? The only elementary function whose derivative is x 2 + d 2 1 is d 1 arctan d x . In s01 the red bump is the integrand and the black S-curve is the accumulated area: where the bump is tall the area climbs fast, where the bump fades the area levels off — read the S left-to-right and you are literally watching arctan being built. See Standard integrals — log and arctan .
∫ x 2 + d 2 1 d x = d 1 arctan d x , d = 2.
3. Apply with the constant 4 pulled out.
∫ x 2 + 4 4 d x = 4 ⋅ 2 1 arctan 2 x + C = 2 arctan 2 x + C .
Verify: differentiate 2 arctan 2 x : 2 ⋅ 1 + ( x /2 ) 2 1/2 = 1 + x 2 /4 1 = 4 + x 2 4 ✓ (VERIFY).
Figure s02 — Alt-text: two parabolas. The black one is x 2 + 6 x + 13 with its lowest point (vertex) sitting at x = − 3 . The red one is ( x + 3 ) 2 + 4 : the very same parabola after we slide it 3 units right so its vertex sits on the vertical axis. Completing the square is exactly this slide; once the vertex is on the axis the denominator reads as ( shifted x ) 2 + 4 , the clean u 2 + d 2 form the arctan formula needs.
∫ x 2 + 6 x + 13 3 x + 1 d x
Numerator has an x , so both pieces appear. This is the "log the derivative, arctan the square" move.
Forecast: we expect ( const ) ln ( … ) + ( const ) arctan ( … ) .
1. Derivative of the denominator. Why? If the top were exactly 2 x + 6 , the integral is instantly ln (a substitution u = x 2 + 6 x + 13 , see Integration by substitution ). So we build that piece.
d x d ( x 2 + 6 x + 13 ) = 2 x + 6.
2. Rewrite the numerator around it. Why? Split the top into "a multiple of 2 x + 6 " plus "a pure constant". Since 3 x + 1 = 2 3 ( 2 x + 6 ) + ( 1 − 9 ) = 2 3 ( 2 x + 6 ) − 8 :
x 2 + 6 x + 13 3 x + 1 = 2 3 ⋅ x 2 + 6 x + 13 2 x + 6 − x 2 + 6 x + 13 8 .
3. Log part. Why log here? Numerator is now the exact derivative of the denominator, so ∫ u u ′ d x = ln ∣ u ∣ .
∫ 2 3 ⋅ x 2 + 6 x + 13 2 x + 6 d x = 2 3 ln x 2 + 6 x + 13 .
(Here x 2 + 6 x + 13 = ( x + 3 ) 2 + 4 > 0 always, so the bars are never strictly needed — but we keep the ∣ ⋅ ∣ so the convention "logs always carry absolute-value bars" stays uniform with the linear cases.)
4. Arctan part — complete the square. Why? To force the u 2 + d 2 1 shape the arctan formula needs. In s02 the shift x → x + 3 slides the parabola's vertex onto the axis, turning x 2 + 6 x + 13 into ( x + 3 ) 2 + 4 (see Completing the square ).
x 2 + 6 x + 13 = ( x + 3 ) 2 + 4 , d = 2.
− 8 ∫ ( x + 3 ) 2 + 4 d x = − 8 ⋅ 2 1 arctan 2 x + 3 = − 4 arctan 2 x + 3 .
5. Combine.
∫ = 2 3 ln x 2 + 6 x + 13 − 4 arctan 2 x + 3 + C .
Verify: differentiate the answer and simplify — it returns x 2 + 6 x + 13 3 x + 1 ✓ (VERIFY).
∫ x 2 − 1 x 3 + 2 x d x
Degenerate degree: deg P = 3 ≥ deg Q = 2 . Applying the template directly is the classic mistake.
Forecast: we must divide first, so expect a polynomial term plus logs.
1. Long-divide. Why? No sum of proper fractions can equal an improper function; their degree is always smaller. Use Polynomial long division .
x 2 − 1 x 3 + 2 x = x + x 2 − 1 3 x .
(Check: x ( x 2 − 1 ) + 3 x = x 3 − x + 3 x = x 3 + 2 x ✓.)
2. Partial-fraction the proper remainder. Why now and not before? Only after dividing is the leftover x 2 − 1 3 x proper (deg 1 < deg 2 ), so only now is the template legal. Factor x 2 − 1 = ( x − 1 ) ( x + 1 ) :
( x − 1 ) ( x + 1 ) 3 x = x − 1 A + x + 1 B .
Cover-up: A = 1 + 1 3 ( 1 ) = 2 3 , B = − 1 − 1 3 ( − 1 ) = 2 3 .
3. Integrate all parts. Why? The polynomial x integrates by the power rule to 2 x 2 ; each linear piece integrates to a log.
∫ = 2 x 2 + 2 3 ln ∣ x − 1∣ + 2 3 ln ∣ x + 1∣ + C .
Verify: differentiate: x + 2 3 ( x − 1 1 + x + 1 1 ) = x + 2 3 ⋅ x 2 − 1 2 x = x + x 2 − 1 3 x = x 2 − 1 x 3 + 2 x ✓ (VERIFY).
∫ ( x 2 + 1 ) 2 x 2 + 2 d x
A quadratic raised to a power . Template needs a B x + C block for each power.
Forecast: likely an arctan plus an algebraic (non-log) fraction.
1. Full quadratic template. Why every power? Same logic as repeated linear — a single block can't span all numerators.
( x 2 + 1 ) 2 x 2 + 2 = x 2 + 1 B 1 x + C 1 + ( x 2 + 1 ) 2 B 2 x + C 2 .
2. Clear denominators and match. Why matching, not cover-up? Cover-up needs a real root to plug in; x 2 + 1 has none, so we compare coefficients instead. Multiply by ( x 2 + 1 ) 2 :
x 2 + 2 = ( B 1 x + C 1 ) ( x 2 + 1 ) + ( B 2 x + C 2 ) .
Expand RHS = B 1 x 3 + C 1 x 2 + ( B 1 + B 2 ) x + ( C 1 + C 2 ) . Match:
x 3 : B 1 = 0
x 2 : C 1 = 1
x 1 : B 1 + B 2 = 0 ⇒ B 2 = 0
x 0 : C 1 + C 2 = 2 ⇒ C 2 = 1
( x 2 + 1 ) 2 x 2 + 2 = x 2 + 1 1 + ( x 2 + 1 ) 2 1 .
3. First piece → arctan. Why? It is the standard shape with d = 1 : ∫ x 2 + 1 1 d x = arctan x .
4. Second piece — derive the reduction formula. Why derive, not just quote? So you can trust it. We want I = ∫ ( x 2 + 1 ) 2 d x . Start from the known ∫ x 2 + 1 d x = arctan x and differentiate the trial piece x 2 + 1 x by the quotient rule:
d x d ( x 2 + 1 x ) = ( x 2 + 1 ) 2 ( x 2 + 1 ) − x ( 2 x ) = ( x 2 + 1 ) 2 1 − x 2 .
Now write 1 − x 2 = 2 − ( x 2 + 1 ) , so
d x d ( x 2 + 1 x ) = ( x 2 + 1 ) 2 2 − x 2 + 1 1 .
Integrate both sides (LHS integrates to the bracket, and ∫ x 2 + 1 1 = arctan x ):
x 2 + 1 x = 2 I − arctan x ⇒ I = 2 1 ( x 2 + 1 x + arctan x ) .
5. Combine.
∫ = arctan x + 2 1 ⋅ x 2 + 1 x + 2 1 arctan x + C = 2 3 arctan x + 2 ( x 2 + 1 ) x + C .
Verify: differentiate — returns ( x 2 + 1 ) 2 x 2 + 2 ✓ (VERIFY).
∫ x 2 − 2 x − 3 7 d x
x 2 − 2 x − 3 looks like it wants a … B x + C block. Trap!
Forecast: check the discriminant before deciding.
1. Discriminant test. Why first? Only truly irreducible quadratics get B x + C ; if it factors we must use two linear blocks instead (see Factoring polynomials over the reals ).
( − 2 ) 2 − 4 ( 1 ) ( − 3 ) = 4 + 12 = 16 > 0.
Positive ⇒ real roots exist ⇒ it factors : ( x − 3 ) ( x + 1 ) .
2. Treat as two linear factors. Why cover-up now works: the denominator has genuine real roots x = 3 and x = − 1 to plug in, exactly what cover-up needs.
( x − 3 ) ( x + 1 ) 7 = x − 3 A + x + 1 B , A = 3 + 1 7 = 4 7 , B = − 1 − 3 7 = − 4 7 .
3. Integrate. Why? Each linear piece is a log; the difference of logs collapses to a single log of a ratio.
∫ = 4 7 ln ∣ x − 3∣ − 4 7 ln ∣ x + 1∣ + C = 4 7 ln x + 1 x − 3 + C .
Verify: x − 3 7/4 − x + 1 7/4 = 4 7 ⋅ ( x − 3 ) ( x + 1 ) 4 = x 2 − 2 x − 3 7 ✓ (VERIFY).
Worked example (8) A tank drains so that the outflow rate is
d V d t = V 2 − 4 V + 3 1 seconds per litre, where V is volume in litres. How long to drain from V = 5 L to V = 4 L?
Forecast: integrate a rational function between limits → expect a difference of logs, answer in seconds .
1. Set up the definite integral with the right limits. Why the limits are 4 to 5 , not 5 to 4 : the physical process runs from V = 5 down to V = 4 , so a naive read gives ∫ 5 4 . But ∫ 5 4 = − ∫ 4 5 , and elapsed time must be positive . We fix the sign once, up front, by writing the total time as the positive accumulation
T = ∫ 4 5 V 2 − 4 V + 3 d V ,
i.e. we integrate "seconds per litre" over the one litre of volume that passes between the two levels, lower limit below the upper. (If instead you kept ∫ 5 4 you would get a negative number and simply drop the sign — same answer.)
2. Factor & split. Why? The denominator factors into real linear pieces, so partial fractions applies (discriminant 16 > 0 ). V 2 − 4 V + 3 = ( V − 1 ) ( V − 3 ) :
( V − 1 ) ( V − 3 ) 1 = V − 1 A + V − 3 B , A = 1 − 3 1 = − 2 1 , B = 3 − 1 1 = 2 1 .
3. Antiderivative. Why combine into one log? The two logs share a coefficient magnitude 2 1 with opposite signs, so they merge into a single ln of a ratio, which is cleaner to evaluate at the limits.
F ( V ) = − 2 1 ln ∣ V − 1∣ + 2 1 ln ∣ V − 3∣ = 2 1 ln V − 1 V − 3 .
4. Evaluate F ( 5 ) − F ( 4 ) . Why F ( 5 ) − F ( 4 ) ? By the Fundamental Theorem, a definite integral is upper-limit value minus lower-limit value.
F ( 5 ) = 2 1 ln 4 2 = 2 1 ln 2 1 , F ( 4 ) = 2 1 ln 3 1 .
T = 2 1 ln 2 1 − 2 1 ln 3 1 = 2 1 ln 2 3 ≈ 0.2027 s .
Verify: 2 1 ln ( 1.5 ) = 0.20273 … seconds — positive time, correct units ✓ (VERIFY).
f ( t ) if its Laplace transform is F ( s ) = s ( s 2 + 2 s + 5 ) s + 3 .
Forecast: the s factor gives a constant, the quadratic gives an exponential-times-sinusoid (its roots are complex).
1. Partial-fraction in s . Why? Standard inverse-Laplace tables only know simple pieces, so we must split first — the same template machinery, now with s as the variable.
s ( s 2 + 2 s + 5 ) s + 3 = s A + s 2 + 2 s + 5 B s + C .
2. Cover-up for A . Why cover-up here: s = 0 is a real root of the denominator, so multiplying by s and setting s = 0 kills the quadratic term (it keeps a factor s → 0 ) and isolates A .
A = 0 + 0 + 5 0 + 3 = 5 3 .
3. Match for B , C . Why matching: the quadratic has no real root to plug in, so we compare coefficients. Clear denominators:
s + 3 = A ( s 2 + 2 s + 5 ) + ( B s + C ) s .
s 2 : 0 = A + B ⇒ B = − 5 3
s 1 : 1 = 2 A + C ⇒ C = 1 − 5 6 = − 5 1
F ( s ) = s 3/5 + s 2 + 2 s + 5 − 5 3 s − 5 1 .
4. Complete the square in the quadratic: s 2 + 2 s + 5 = ( s + 1 ) 2 + 2 2 . Why? The inverse-Laplace table is written in the shifted form ( s + a ) 2 + ω 2 , which decodes to e − a t times a sinusoid of frequency ω — so we must first rewrite the top around ( s + 1 ) :
− 5 3 s − 5 1 = − 5 3 ( s + 1 ) + 5 2 .
So the quadratic block is
− 5 3 ⋅ ( s + 1 ) 2 + 4 s + 1 + 5 2 ⋅ ( s + 1 ) 2 + 4 1 .
5. Read off inverses. Why these? Table: ( s + 1 ) 2 + 4 s + 1 → e − t cos 2 t , and ( s + 1 ) 2 + 4 2 → e − t sin 2 t .
f ( t ) = 5 3 − 5 3 e − t cos 2 t + 5 2 ⋅ 2 1 e − t sin 2 t = 5 3 − 5 3 e − t cos 2 t + 5 1 e − t sin 2 t .
Verify: at t = 0 , f ( 0 ) = 5 3 − 5 3 + 0 = 0 , matching the initial-value theorem lim s → ∞ s F ( s ) = lim s ( s 2 + 2 s + 5 ) s ( s + 3 ) = 0 ✓ (VERIFY).
∫ ( x − 1 ) ( x 2 + 4 ) 2 x 2 − x + 4 d x
The most general case: one linear factor and one irreducible quadratic, so both templates appear at once and interact.
Forecast: expect a ln ∣ x − 1∣ (from the linear), a ln ( x 2 + 4 ) (log part of the quadratic), and an arctan (arctan part of the quadratic).
1. Confirm the quadratic is irreducible & write the joint template. Why? x 2 + 4 has discriminant − 16 < 0 , so it stays whole and needs a linear top B x + C ; the linear factor needs a lone constant A .
( x − 1 ) ( x 2 + 4 ) 2 x 2 − x + 4 = x − 1 A + x 2 + 4 B x + C .
Counting check: total unknowns = 3 = deg Q ✓.
2. Cover-up for A . Why cover-up works for the linear piece: x = 1 is a real root; multiplying by ( x − 1 ) and setting x = 1 kills the quadratic term.
A = 1 2 + 4 2 ( 1 ) 2 − 1 + 4 = 5 5 = 1.
3. Match for B , C . Why matching, not cover-up: the quadratic has no real root to plug in, so we compare coefficients. Clear denominators with A = 1 :
2 x 2 − x + 4 = ( x 2 + 4 ) + ( B x + C ) ( x − 1 ) .
Expand RHS = x 2 + 4 + B x 2 − B x + C x − C = ( 1 + B ) x 2 + ( C − B ) x + ( 4 − C ) . Match:
x 2 : 1 + B = 2 ⇒ B = 1
x 0 : 4 − C = 4 ⇒ C = 0
(check x 1 : C − B = − 1 ✓)
( x − 1 ) ( x 2 + 4 ) 2 x 2 − x + 4 = x − 1 1 + x 2 + 4 x .
4. Integrate each piece. Why these forms? The linear gives a log; the x 2 + 4 x has (a multiple of) the denominator's derivative 2 x on top, so it is a log by substitution u = x 2 + 4 — no arctan needed here because C = 0 left no bare constant.
∫ = ln ∣ x − 1∣ + 2 1 ln x 2 + 4 + C .
(Had C been nonzero, a term x 2 + 4 C would have added a 2 C arctan 2 x — the full mixed answer would then carry all three pieces.)
Verify: differentiate: x − 1 1 + x 2 + 4 x = ( x − 1 ) ( x 2 + 4 ) ( x 2 + 4 ) + x ( x − 1 ) = ( x − 1 ) ( x 2 + 4 ) 2 x 2 − x + 4 ✓ (VERIFY).
Recall Which cell is which?
Pure constant over irreducible quadratic gives? ::: A pure arctan (Cell C).
Numerator has an x over irreducible quadratic gives? ::: log plus arctan (Cell D).
First thing to do if deg P ≥ deg Q ? ::: Polynomial long division (Cell E).
A quadratic with positive discriminant should be treated as? ::: Two linear factors (Cell G).
Repeated quadratic ( x 2 + 1 ) 2 template? ::: x 2 + 1 B 1 x + C 1 + ( x 2 + 1 ) 2 B 2 x + C 2 (Cell F).
A problem with one linear and one irreducible-quadratic factor needs? ::: both templates x − a A + x 2 + ⋯ B x + C at once (Cell J).
"Divide if fat, factor if you can, discriminant decides, Bx+C for the truly curved, every power for the repeated."
Prerequisites worth a detour: Completing the square , Integration by substitution , Standard integrals — log and arctan , Factoring polynomials over the reals .