IB Maths AA HL Topic 5 — Calculus Paper 1 & 2 HL ~11 min read

Integrating Factor

For first-order DEs in standard form dy/dx + P(x)y = Q(x) (linear in y), multiply both sides by μ = e∫P(x)dx. The LHS then collapses into the exact derivative d/dxy), and one integration finishes the job. The standard form, and the IF formula, are both in your formula booklet.

📘 What you need to know

How the integrating factor works

Integrating factor — formula booklet Standard form: dydx + P(x) y = Q(x)   ⟹   μ(x) = e∫P(x) dx

Why does this work? Because the LHS of dy/dx + Py = Q, when multiplied by μ, becomes μ·dy/dx + μ·P·y. The product rule tells us that’s exactly d/dxy) — but only when μ′ = P·μ, which the formula μ = e∫P dx guarantees.

The integrating factor technique — four steps STEP 1 — STANDARD FORM dy/dx + P(x) y = Q(x) multiply both sides by μ = e^∫P dx STEP 2 — AFTER MULTIPLYING BY μ μ·dy/dx + μ·P·y = μ·Q LHS collapses (product rule in reverse) STEP 3 — EXACT DERIVATIVE d/dx (μ·y) = μ·Q integrate both sides, then divide by μ STEP 4 — SOLUTION μ·y = ∫ μ·Q dx + c
The “collapse” in Step 3 is automatic — once you multiply by the right μ, the LHS μ·dy/dx + μ·P·y is, by construction, the product-rule expansion of d/dxy). No verification needed — that’s why μ = e∫P dx is chosen.

Common P(x) patterns and their IFs

P(x)∫P(x) dxμ = e∫P dx
constant kkxekx
k/xk ln \|x\|xk
2xx²ex²
tan x−ln \|cos x\|sec x
cot xln \|sin x\|sin x
The two most common IB patterns: P(x) = constant (gives exponential IF) and P(x) = k/x (gives power IF). If you see either, you can write down μ immediately without integrating from scratch.

🧭 Recipe — solving with the integrating factor

  1. Rearrange to standard form: dy/dx + P(x) y = Q(x). Divide through if dy/dx has a coefficient other than 1.
  2. Identify P(x) and Q(x), then compute μ(x) = e∫P dx. No +c in this step.
  3. Multiply both sides by μ. The LHS now equals d/dxy) — write this directly, no checking needed.
  4. Integrate both sides: μy = ∫ μ·Q(x) dx + c. Use Further Integration techniques on the RHS as required.
  5. Divide by μ to get y = (1/μ) [∫ μ Q dx + c]. Apply IC if given, then rearrange.

Worked examples

WE 1

Rearrange to standard form, identify P(x) and Q(x)

The differential equation x dy/dxy = x² is to be solved by the integrating factor method. Rearrange to standard form and state P(x), Q(x), and the integrating factor μ(x).

Step 1 — divide through by x to make dy/dx coefficient 1 x dy/dx – y = x² dy/dx – (1/x) y = x Step 2 — read off P(x) and Q(x) P(x) = -1/x, Q(x) = x Step 3 — compute the IF ∫ P(x) dx = ∫ -1/x dx = -ln|x| μ(x) = e^(-ln|x|) = 1/|x| (use 1/x for x > 0) Standard form: dy/dx − (1/x)y = x;   μ(x) = 1/x always divide by the dy/dx coefficient FIRST. Forgetting this is the #1 cause of wrong IFs. Once in standard form, P(x) is whatever multiplies y on the LHS (sign included!).
WE 2

Constant P — exponential IF

Find the general solution of dy/dx + 3y = ex.

Step 1 — already in standard form. P(x) = 3, Q(x) = e^x Step 2 — find the IF μ = e^∫3 dx = e^(3x) Step 3 — multiply through; LHS collapses d/dx (y e^(3x)) = e^(3x) · e^x = e^(4x) Step 4 — integrate y e^(3x) = ∫ e^(4x) dx = e^(4x)/4 + C Step 5 — divide by μ to isolate y y = e^x / 4 + C e^(-3x) y = eˣ4 + Ce⁻³ˣ verify: dy/dx + 3y = (e^x/4 – 3Ce^(-3x)) + 3(e^x/4 + Ce^(-3x)) = e^x/4 + 3e^x/4 = e^x ✓. The “Ce^(-3x)” piece is the general homogeneous solution; “e^x/4” is the particular solution.
WE 3

With initial condition — constant P and Q

Solve dy/dx + 2y = 4 given y(0) = 5.

Step 1 — standard form. P = 2, Q = 4 Step 2 — IF μ = e^(2x) Step 3 — collapse LHS, write exact derivative d/dx (y e^(2x)) = 4 e^(2x) Step 4 — integrate y e^(2x) = ∫ 4 e^(2x) dx = 2 e^(2x) + C y = 2 + C e^(-2x) Step 5 — apply IC y(0) = 5 5 = 2 + C · 1 ⟹ C = 3 y = 2 + 3e⁻²ˣ notice the structure: as x → ∞, y → 2 (the “steady-state”); the 3e^(-2x) is the transient decaying from the IC. Common pattern when Q is constant.
WE 4

P(x) = 1/x — power IF

Find the general solution of x dy/dx + y = x³.

Step 1 — divide through by x dy/dx + (1/x) y = x²; P = 1/x, Q = x² Step 2 — IF ∫ 1/x dx = ln|x| μ = e^(ln|x|) = x (for x > 0) Step 3 — multiply by μ = x x dy/dx + y = x³ ← original form! (this happens when IF cancels the divide-by-x step) d/dx (x y) = x³ Step 4 — integrate xy = ∫ x³ dx = x⁴/4 + C Step 5 — divide by x y = x³/4 + C/x y = x³4 + Cx a beautiful shortcut: when P(x) = 1/x, the IF brings you right back to the original equation in d/dx(xy) form. Recognize this and you can sometimes skip the multiplication step.
WE 5

P(x) = -2/x with initial condition

Solve x dy/dx − 2y = x⁴ given y(1) = 1.

Step 1 — divide through by x dy/dx – (2/x) y = x³; P = -2/x, Q = x³ Step 2 — IF ∫ -2/x dx = -2 ln|x| μ = e^(-2 ln|x|) = x^(-2) = 1/x² Step 3 — multiply by μ = 1/x² (1/x²) dy/dx – (2/x³) y = x d/dx (y/x²) = x Step 4 — integrate y/x² = ∫ x dx = x²/2 + C y = x⁴/2 + C x² Step 5 — apply IC y(1) = 1 1 = 1/2 + C ⟹ C = 1/2 y = x⁴/2 + x²/2 = x²(x² + 1)/2 y = x²(x² + 1)2 the IF for P = k/x is μ = x^k. Here k = -2, so μ = x^(-2) = 1/x². The minus sign matters — check carefully when you have negative P.
WE 6

Trig IF — P(x) = tan x

Solve dy/dx + (tan x) y = sec x given y(0) = 1.

Step 1 — standard form. P(x) = tan x, Q(x) = sec x Step 2 — find the IF ∫ tan x dx = -ln|cos x| μ = e^(-ln|cos x|) = 1/|cos x| = sec x (cos x > 0 near x = 0) Step 3 — multiply by μ = sec x sec x · dy/dx + sec x · tan x · y = sec²x d/dx (y sec x) = sec²x Step 4 — integrate (∫ sec²x dx = tan x) y sec x = tan x + C Step 5 — divide by sec x y = tan x / sec x + C / sec x = sin x + C cos x Step 6 — apply IC y(0) = 1 1 = sin 0 + C cos 0 = 0 + C ⟹ C = 1 y = sin x + cos x verify: dy/dx + (tan x) y = (cos x – sin x) + tan x (sin x + cos x) = cos x – sin x + sin²x/cos x + sin x = cos x + sin²x/cos x = (cos²x + sin²x)/cos x = 1/cos x = sec x ✓. The trig IFs (sec x for tan x, sin x for cot x) are worth memorizing.

💡 Top tips

⚠ Common mistakes

Up next: Modelling with Differential Equations. You’ll set up DEs from real-world contexts — “the rate of change of P is proportional to …” translates directly into a DE. Then you’ll use one of the techniques (separation, IF, etc.) to solve. Examples: population growth, Newton’s law of cooling, radioactive decay, fluid mixing.

Need help with Calculus?

Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.

Book Free Session →