IB Maths AA HLTopic 5 — CalculusPaper 1 & 2HL~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
Pattern to spot: dy/dx = g(x) · h(y) — the RHS must be a PRODUCT of an x-only piece and a y-only piece.
Separation step: rearrange to (1/h(y)) dy = g(x) dx. Think of it as “multiplying dx across and dividing by h(y)”.
Integrate both sides: ∫(1/h(y)) dy = ∫g(x) dx. Add ONE constant of integration +c (not two — combine).
Initial condition AFTER integrating: substitute the (x₀, y₀) values to solve for c, then rearrange.
Partial fractions often needed on the y-side when 1/h(y) is a rational function (e.g., 1/(y(3−y))).
Implicit answer is OK unless the question says “express in the form y = f(x)”. Leaving the solution implicit is often easier.
Sum on RHS = NOT separable. dy/dx = x + y cannot be factored as g(x)·h(y) — use integrating factor or another method.
Variables may not be x, y: P and t (population/time), N and t, etc. are common in modelling.
The technique in 4 steps
Separation of variables — core patterndydx = g(x) · h(y) ⟹ ∫ 1h(y) dy = ∫ g(x) dx + 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
Check the form: is dy/dx = g(x) · h(y)? If not, this method doesn’t apply.
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.
Integrate both sides. Use Further Integration techniques (partial fractions, substitution, parts) as needed. Add ONE +c.
Apply the initial condition (if given) to find the value of c. Substitute (x₀, y₀) and solve.
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 ✓ separableStep 2 — separate(1/y) dy = 3x² dxStep 3 — integrate both sides∫ (1/y) dy = ∫ 3x² dxln|y| = x³ + cStep 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 dxStep 3 — integrate∫ y^(-2) dy = ∫ 2x dx-1/y = x² + cStep 4 — apply IC y(0) = 1-1/1 = 0² + c ⟹ c = -1-1/y = x² – 1Step 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 structureRHS = x + y²This is a SUM, not a productStep 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² factorContradiction: the LHS has a “lonely” x term with no y² factorStep 3 — conclusionRHS cannot be written as g(x) · h(y) — separation failsdy/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 dxStep 3 — integrate∫ (1/y) dy = ∫ cos x dxln|y| = sin x + cStep 4 — apply IC y(0) = 2 (positive, drop modulus)ln 2 = sin 0 + c = cc = ln 2ln y = sin x + ln 2Step 5 — exponentiatey = 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 dtStep 3 — integrate∫ (1/P) dP = ∫ 0.4 dtln P = 0.4t + c (P > 0, drop modulus)Step 4 — apply IC P(0) = 50ln 50 = 0 + c ⟹ c = ln 50ln P = 0.4t + ln 50Step 5 — solve and evaluate at t = 10P = e^(0.4t + ln 50) = 50 e^(0.4t)P(10) = 50 e^(0.4·10) = 50 e^4 ≈ 50 × 54.598 = 2729.9P(10) = 50e⁴ ≈ 2730 bacteriaclassic 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 — separate1/(y(3-y)) dy = dxStep 3 — partial fractions on the y-side1/(y(3-y)) = A/y + B/(3-y)1 = A(3-y) + Byy=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 + cStep 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 rearrangey/(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
Look for PRODUCT structure on the RHS first. A clean factor split (x-stuff)(y-stuff) means separable. A SUM at the top level usually means not separable.
One constant of integration, not two. ∫… + c₁ = ∫… + c₂ collapses to one constant c = c₂ − c₁.
Drop the modulus on ln|y| when the IC tells you y‘s sign. If y(0) = 2 (positive) and the solution is continuous, y stays positive.
“Absorb the sign” into the constant: ec > 0 always, but writing A = ±ec covers all signs in one symbol.
Implicit answer is often fine. Don’t force rearrangement to y = f(x) unless the question demands it — implicit form saves time and reduces algebra errors.
⚠ Common mistakes
Applying separation to a SUM: dy/dx = x + y is NOT separable. Don’t write (1/y) dy = (x/y + 1) dx — that still mixes x and y.
Writing TWO constants of integration: only ONE +c at the end, not one on each side. They merge.
Applying IC BEFORE integrating: the IC determines c, which appears only after integration. Substituting (x₀, y₀) into the separated form is meaningless.
Forgetting the modulus on ln: ∫ (1/y) dy = ln|y|, not ln y. Drop the modulus only after the IC fixes the sign.
Algebra error in partial fractions: when 1/h(y) is a rational function (like 1/(y(3−y))), check your A and B carefully — substituting back is the safest verification.
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.