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

Separation of Variables

Separation of variables solves first-order DEs whose right-hand side factors as g(x)·h(y) — a function of x multiplied by a function of y. The trick: get all the y‘s (and dy) on one side, all the x‘s (and dx) on the other, then integrate both sides. Watch out: if the RHS is a SUM (like x + y), this method doesn’t work.

📘 What you need to know

The technique in 4 steps

Separation of variables — core pattern dydx = g(x) · h(y)   ⟹   ∫ 1h(y) dy = ∫ g(x) dx + c
The four-step transformation: from DE to solution STEP 1 — ORIGINAL dy/dx = g(x) · h(y) separate: × dx, ÷ h(y) STEP 2 — SEPARATED (1/h(y)) dy = g(x) dx integrate both sides STEP 3 — INTEGRATED ∫ (1/h(y)) dy = ∫ g(x) dx evaluate + apply IC (if given) STEP 4 — SOLUTION F(y) = G(x) + c
Each step is a simple algebraic move. The “separation” is the algebra that puts y‘s on one side and x‘s on the other; integration then closes the loop. Only ONE constant of integration is needed — combine the +c from both sides into one.

Spotting separability — product vs sum

✓ Separable — RHS is a product
dy/dx = g(x) · h(y)
Examples: xy, 3x²y, ex·y², y·cos x, sin x · ln y. RHS factors into x-piece × y-piece. Use this technique.
✗ Not separable — sum, composition, etc.
dy/dx = (something that won’t factor)
Examples: x + y, x + y², sin(x + y), xy − ln x. Try integrating factor, homogeneous substitution, or Euler’s method.
Quick test for separability: can you write the RHS as (just-x-stuff) × (just-y-stuff)? If yes, separable. If you see a + or − connecting x and y at the top level, it’s almost certainly NOT separable.

🧭 Recipe — solving by separation of variables

  1. Check the form: is dy/dx = g(x) · h(y)? If not, this method doesn’t apply.
  2. Separate: rearrange to (1/h(y)) dy = g(x) dx. Move all y‘s to the left side, all x‘s to the right side.
  3. Integrate both sides. Use Further Integration techniques (partial fractions, substitution, parts) as needed. Add ONE +c.
  4. Apply the initial condition (if given) to find the value of c. Substitute (x₀, y₀) and solve.
  5. Rearrange to the requested form (y = f(x), or leave implicit if not specified). Drop modulus signs if the sign of y is fixed by the IC.

Worked examples

WE 1

Basic separable — general solution

Find the general solution of dy/dx = 3x²y.

Step 1 — check form: g(x) = 3x², h(y) = y ✓ separable Step 2 — separate (1/y) dy = 3x² dx Step 3 — integrate both sides ∫ (1/y) dy = ∫ 3x² dx ln|y| = x³ + c Step 4 — rearrange to y = f(x) |y| = e^(x³ + c) = e^c · e^(x³) y = A e^(x³) (where A = ±e^c, an arbitrary constant) y = A e^(x³) (general solution) verify: dy/dx = 3x²·A·e^(x³) = 3x²·y ✓. The “absorb the sign” trick: A = ±e^c covers both positive and negative solutions in one symbol.
WE 2

Particular solution with initial condition

Solve dy/dx = 2xy² given y(0) = 1. Express your answer in the form y = f(x).

Step 1 — check form: g(x) = 2x, h(y) = y² ✓ Step 2 — separate (1/y²) dy = 2x dx Step 3 — integrate ∫ y^(-2) dy = ∫ 2x dx -1/y = x² + c Step 4 — apply IC y(0) = 1 -1/1 = 0² + c ⟹ c = -1 -1/y = x² – 1 Step 5 — rearrange to y = f(x) 1/y = 1 – x² y = 1/(1 – x²) y = 11 − x² verify: y(0) = 1/(1-0) = 1 ✓, and dy/dx = 2x/(1-x²)² = 2x·y² ✓. Note: the solution blows up at x = ±1 — this is normal for non-linear DEs and is a feature of the original equation, not an error.
WE 3

Recognizing NON-separable equations

Show that the differential equation dy/dx = x + y² cannot be solved using separation of variables.

Step 1 — examine the RHS structure RHS = x + y² This is a SUM, not a product Step 2 — try to factor as g(x)·h(y) If x + y² = g(x)·h(y), then at x = 0: y² = g(0)·h(y) ⟹ h(y) = y² / g(0) (so h is purely a y-function) But then x + y² = g(x) · y² / g(0), so the x-term g(x)·y²/g(0) would always have a y² factor Contradiction: the LHS has a “lonely” x term with no y² factor Step 3 — conclusion RHS cannot be written as g(x) · h(y) — separation fails dy/dx = x + y² is NOT separable. a SUM of an x-term and a y-term at the top level is a dead giveaway for non-separability. For this equation, no closed-form analytical solution exists — you’d need Euler’s method.
WE 4

With a trig function on the x-side

Solve dy/dx = y cos x given y(0) = 2.

Step 1 — check form: g(x) = cos x, h(y) = y ✓ Step 2 — separate (1/y) dy = cos x dx Step 3 — integrate ∫ (1/y) dy = ∫ cos x dx ln|y| = sin x + c Step 4 — apply IC y(0) = 2 (positive, drop modulus) ln 2 = sin 0 + c = c c = ln 2 ln y = sin x + ln 2 Step 5 — exponentiate y = e^(sin x + ln 2) = e^(ln 2) · e^(sin x) = 2 e^(sin x) y = 2 e^(sin x) since y(0) = 2 > 0 and y stays positive (the solution is an exponential, which is always positive), we can drop the modulus on ln|y|. Verify: y(0) = 2·e^0 = 2 ✓ and dy/dx = 2 cos x · e^(sin x) = y cos x ✓.
WE 5

Modelling — bacteria population growth

A bacteria colony of size P grows according to dP/dt = 0.4P, where t is time in hours. Initially there are 50 bacteria. Find P(10).

Step 1 — separable: g(t) = 0.4, h(P) = P ✓ Step 2 — separate (1/P) dP = 0.4 dt Step 3 — integrate ∫ (1/P) dP = ∫ 0.4 dt ln P = 0.4t + c (P > 0, drop modulus) Step 4 — apply IC P(0) = 50 ln 50 = 0 + c ⟹ c = ln 50 ln P = 0.4t + ln 50 Step 5 — solve and evaluate at t = 10 P = e^(0.4t + ln 50) = 50 e^(0.4t) P(10) = 50 e^(0.4·10) = 50 e^4 ≈ 50 × 54.598 = 2729.9 P(10) = 50e⁴ ≈ 2730 bacteria classic exponential growth: dP/dt = kP gives P = P₀·e^(kt). After 10 hours, population grew from 50 to ≈ 2730 — a 55× increase. Whenever rate of change is proportional to size, separation of variables gives an exponential.
WE 6

Partial fractions needed (logistic-style)

Solve dy/dx = y(3 − y) given y(0) = 1. Express your answer in the form y = f(x).

Step 1 — separable: g(x) = 1, h(y) = y(3-y) ✓ Step 2 — separate 1/(y(3-y)) dy = dx Step 3 — partial fractions on the y-side 1/(y(3-y)) = A/y + B/(3-y) 1 = A(3-y) + By y=0: A = 1/3; y=3: B = 1/3 ⟹ 1/(y(3-y)) = (1/3)(1/y + 1/(3-y)) Step 4 — integrate both sides (1/3) ∫ (1/y + 1/(3-y)) dy = ∫ 1 dx (1/3) [ln|y| – ln|3-y|] = x + c (1/3) ln|y/(3-y)| = x + c Step 5 — apply IC y(0) = 1 (so 0 < y < 3 initially) (1/3) ln(1/2) = 0 + c ⟹ c = (1/3) ln(1/2) Multiply by 3: ln(y/(3-y)) = 3x + ln(1/2) Step 6 — exponentiate and rearrange y/(3-y) = (1/2) e^(3x) 2y = (3-y) e^(3x) = 3e^(3x) – y e^(3x) y(2 + e^(3x)) = 3 e^(3x) y = 3 e^(3x) / (2 + e^(3x)) y = 3e³ˣ2 + e³ˣ verify: y(0) = 3·1/(2+1) = 1 ✓. As x → ∞, y → 3 (the “carrying capacity”). This logistic-type solution appears in population modelling and will return in The Logistic Equation note.

💡 Top tips

⚠ Common mistakes

Up next: Homogeneous Differential Equations. These are DEs of the form dy/dx = f(y/x) — the RHS depends only on the ratio y/x. They’re NOT separable as written, but a clever substitution v = y/x turns them INTO a separable DE. Same toolkit you just learned, with one extra setup step.

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 →