Skip to main content

Solving differential equations by separation of variables (WACE Year 12 Mathematics Specialist Unit 4)

Syllabus dot point

“Solve separable first-order differential equations and apply an initial condition to find the particular solution”

7 min read

Quick answer

If a first-order equation can be written dydx=g(x) h(y)\tfrac{dy}{dx} = g(x)\,h(y), separate it to 1h(y) dy=g(x) dx\tfrac{1}{h(y)}\,dy = g(x)\,dx and integrate both sides. This gives a general solution with one constant; an initial condition then pins down the particular solution.

Jump to a section
  1. What this dot point is asking
  2. What a first-order differential equation is
  3. Recognising separability
  4. Why treating the derivative as a fraction is valid
  5. Integrating both sides
  6. Which integration technique each side needs
  7. Applying an initial condition
  8. Watching for lost solutions
  9. Exam-style questions

What this dot point is asking

SCSA wants you to recognise a separable equation, carry out the separation and integration carefully, and apply a given condition to find the constant.

What a first-order differential equation is

A first-order differential equation relates a function to its first derivative, expressing the rate of change of a quantity in terms of the quantity itself and the independent variable. Solving it means finding the function whose derivative matches the equation, which reverses the differentiation and therefore brings in a constant of integration. Because of that constant, a single differential equation has a whole family of solutions, one for each starting value; the extra piece of information that selects one member of the family is the initial condition. Separation of variables is the standard technique for the important subclass of first-order equations that factor into a product of a function of xx and a function of yy.

Recognising separability

An equation is separable when the right side factors into a part depending only on xx times a part depending only on yy. Then all the yy-dependence can be moved to one side with dydy and all the xx-dependence to the other with dxdx.

Separation and integration

dydx=g(x) h(y)  ⟹  ∫1h(y) dy=∫g(x) dx.\frac{dy}{dx} = g(x)\,h(y) \;\Longrightarrow\; \int \frac{1}{h(y)}\,dy = \int g(x)\,dx.

Treating dydx\tfrac{dy}{dx} as a ratio of differentials is a valid shortcut here; the underlying justification is the chain rule.

Why treating the derivative as a fraction is valid

Writing dydx=g(x)h(y)\dfrac{dy}{dx} = g(x)h(y) as 1h(y) dy=g(x) dx\dfrac{1}{h(y)}\,dy = g(x)\,dx looks like splitting a fraction, but the rigorous justification is the chain rule. Dividing by h(y)h(y) gives 1h(y)dydx=g(x)\dfrac{1}{h(y)}\dfrac{dy}{dx} = g(x), and integrating both sides with respect to xx gives ∫1h(y)dydx dx=∫g(x) dx\displaystyle\int \dfrac{1}{h(y)}\dfrac{dy}{dx}\,dx = \displaystyle\int g(x)\,dx. The left integral, by the substitution rule with yy as the new variable, is exactly ∫1h(y) dy\displaystyle\int \dfrac{1}{h(y)}\,dy. So the differential manipulation is a shorthand for a substitution, which is why it always produces the correct answer.

Integrating both sides

Integrate each side with respect to its own variable. A single arbitrary constant suffices (combine the two constants of integration into one). The result is often an implicit relation between xx and yy; rearrange for yy explicitly only if the algebra permits.

Which integration technique each side needs

The two integrals after separation can each demand any of the Unit 4 techniques, so a separable equation often combines skills. The right side, a function of xx, may need a substitution or a trigonometric identity. The left side, ∫1h(y) dy\displaystyle\int \dfrac{1}{h(y)}\,dy, is frequently the harder one: when h(y)h(y) is linear it gives a logarithm, but when h(y)h(y) is a product such as P(1−P/M)P(1 - P/M) in the logistic equation, it requires a partial-fraction decomposition before integrating. Recognising in advance which technique each side calls for keeps the working organised and avoids getting stuck halfway through a multi-step solution.

Applying an initial condition

General versus particular solution

The integrated equation with its constant CC is the general solution, a whole family of curves. Substituting a given point (x0,y0)(x_0, y_0) solves for CC and selects the one particular solution through that point.

Watching for lost solutions

Dividing by h(y)h(y) assumes h(y)≠0h(y) \neq 0. Any value of yy making h(y)=0h(y) = 0 is a constant equilibrium solution that the separation step can hide; note it separately.

Worked example

Solve dydx=xy\dfrac{dy}{dx} = xy with y=2y = 2 when x=0x = 0.

Step 1: Separate the variables

We rearrange so that all terms involving yy are on the left and all terms involving xx are on the right, which allows each side to be integrated independently. Dividing by yy is valid when y≠0y \ne 0; note that y=0y = 0 is a separate equilibrium solution that the division step would lose.

1y dy=x dx.\frac{1}{y}\,dy = x\,dx.

Step 2: Integrate both sides

Each side now depends on only one variable, so we integrate directly and absorb the two constants of integration into a single arbitrary constant CC.

ln⁡∣y∣=x22+C.\ln|y| = \frac{x^2}{2} + C.

Step 3: Solve for yy in explicit form

Exponentiating both sides removes the logarithm. Writing A=±eCA = \pm e^{C} captures all non-zero solutions in a single expression.

y=A ex2/2.y = A\,e^{x^2/2}.

Step 4: Apply the initial condition

Substituting the known point y=2y = 2 at x=0x = 0 determines the constant AA for this particular solution.

2=A e0=A,so A=2.2 = A\,e^{0} = A, \quad \text{so } A = 2.

Final answer: y=2 ex2/2y = 2\,e^{x^2/2}.

Common traps
Failing to separate fully
Every yy must be on the dydy side and every xx on the dxdx side before integrating.
Two separate constants
Use a single combined constant; do not carry one on each side.
Losing the equilibrium solution
Dividing by h(y)h(y) can drop the solution where h(y)=0h(y) = 0; check for it.

Exam-style questions

Questions in the style of SCSA 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.

WACE 2022-style7 marks
Calculator-assumed. A tank's water height hh (cm) satisfies dhdt=−2h\dfrac{dh}{dt} = -2\sqrt{h}, with h=100h = 100 when t=0t = 0. (a) Solve for hh as a function of tt. (b) Find the time at which the tank is empty.
Show worked answer →

A separable model with a square root.

(a) Separate: h−1/2 dh=−2 dth^{-1/2}\,dh = -2\,dt. Integrate: 2h1/2=−2t+C2h^{1/2} = -2t + C. At t=0t = 0, h=100h = 100: 2100=C2\sqrt{100} = C, so C=20C = 20. Thus 2h=20−2t2\sqrt{h} = 20 - 2t, giving h=10−t\sqrt{h} = 10 - t and h=(10−t)2h = (10 - t)^2 for 0≤t≤100 \le t \le 10.

(b) The tank is empty when h=0h = 0: (10−t)2=0(10 - t)^2 = 0, so t=10t = 10 seconds.

Markers reward the separation, integrating h−1/2h^{-1/2} to 2h1/22h^{1/2}, applying the initial condition, and the empty time t=10t = 10.

WACE 2021-style5 marks
Calculator-free. Solve dydx=cos⁡xy\dfrac{dy}{dx} = \dfrac{\cos x}{y} given that y=2y = 2 when x=0x = 0.
Show worked answer →

A trig-on-the-right separable equation.

Separate: y dy=cos⁡x dxy\,dy = \cos x\,dx. Integrate both sides: y22=sin⁡x+C\dfrac{y^2}{2} = \sin x + C, so y2=2sin⁡x+2Cy^2 = 2\sin x + 2C. Write 2C=K2C = K: y2=2sin⁡x+Ky^2 = 2\sin x + K.

Apply y=2y = 2 at x=0x = 0: 4=2(0)+K4 = 2(0) + K, so K=4K = 4. Thus y2=2sin⁡x+4y^2 = 2\sin x + 4, and since y=2>0y = 2 > 0, y=2sin⁡x+4y = \sqrt{2\sin x + 4}.

Markers reward the separation, integrating both sides, applying the condition, and the positive square root for yy.

Practise this

Sources & how we know this

ExamExplained