Skip to main content
ExamExplained
NSW · Maths Extension 1
Maths Extension 1 study scene
§-Syllabus dot point
NSWMaths Extension 1Syllabus dot point

How do we solve a first-order differential equation when the variables separate?

Solve separable first-order differential equations of the form dydx=f(x)g(y)\frac{dy}{dx} = f(x) g(y) by separating variables and integrating both sides

A focused answer to the HSC Maths Extension 1 dot point on separable differential equations. The separation-of-variables method, integration on both sides, applying initial conditions, and standard models including Newton's law of cooling, with worked examples.

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

What this dot point is asking

NESA wants you to solve a first-order differential equation of the form dydx=f(x)g(y)\frac{dy}{dx} = f(x) g(y) by separating the variables, integrating each side, and applying any given initial condition to find the constant of integration.

The conceptual leap is that dydx\frac{dy}{dx}, though it is really a single limit, can be manipulated like a fraction here: you gather all the yy-stuff with dydy on one side and all the xx-stuff with dxdx on the other, then integrate each side with respect to its own variable. This works precisely because the right-hand side factorises into a part in xx times a part in yy - which is what "separable" means.

The answer

The separation method

For an equation dydx=f(x)g(y)\frac{dy}{dx} = f(x) g(y):

  1. Rewrite as dyg(y)=f(x)dx\frac{dy}{g(y)} = f(x) \, dx.
  2. Integrate both sides: dyg(y)=f(x)dx+C\int \frac{dy}{g(y)} = \int f(x) \, dx + C.
  3. Solve for yy in terms of xx (or leave in implicit form if cleaner).
  4. Apply any initial condition y(x0)=y0y(x_0) = y_0 to determine CC.

If g(y0)=0g(y_0) = 0 for some value y0y_0, then y=y0y = y_0 is a constant solution (an equilibrium of the equation). This must be checked separately, because the separation step divides by g(y)g(y) and so silently throws it away.

Reading the equation geometrically, stage by stage

A first-order ODE assigns a gradient to every point of the plane, and a solution is a curve that follows those gradients. Seeing this picture makes the algebra meaningful: separating and integrating is just finding the curves that thread through the gradient field. The figures below use dydx=xy\dfrac{dy}{dx} = -\dfrac{x}{y}, whose solutions turn out to be circles.

Stage 1, the slope field. The equation gives a slope at every point: at (x,y)(x, y) the gradient is xy-\dfrac{x}{y}. Drawing a short segment of that slope at a grid of points produces the slope field, which already hints at a circular pattern.

Stage 1: the equation gives a slope everywhereFor dy by dx equals minus x over y, every point of the plane is given a small line segment of that slope. The segments form a circular pattern around the origin.xydy/dx = -x/y1

Stage 2, separate and integrate. Gather the variables: ydy=xdxy\,dy = -x\,dx. Integrating both sides gives 12y2=12x2+C\tfrac12 y^2 = -\tfrac12 x^2 + C, which tidies to x2+y2=Cx^2 + y^2 = C. The algebra has produced the equation of the curves the slope field was tracing.

Stage 2: separate the variables, then integrateMove all y terms to the left and all x terms to the right: y dy equals minus x dx. Integrating both sides gives one half y squared equals minus one half x squared plus a constant.y dy = -x dx∫ both sides½y² = -½x² + C ⇒ x² + y² = C2

Stage 3, the general solution. x2+y2=Cx^2 + y^2 = C is a family of concentric circles, one for each value of the constant C>0C > 0. Every member of the family is a solution; the slope-field segments are tangent to these circles, which is the visual meaning of "the curve follows the gradients".

Stage 3: the general solution is a family of curvesThe integrated equation x squared plus y squared equals C is a family of concentric circles, one for each value of the constant C. The slope-field segments are tangent to these circles.xyx² + y² = C3

Stage 4, apply the initial condition. A condition such as y=2y = 2 when x=0x = 0 fixes the constant: 0+4=C0 + 4 = C, so C=4C = 4. That selects the single circle x2+y2=4x^2 + y^2 = 4 from the family - the particular solution through the given point.

Stage 4: the initial condition picks one curveAn initial condition such as y equals 2 when x equals 0 fixes the constant, here C equals 4, selecting the single circle of radius 2 from the family as the particular solution.xy(0, 2)x² + y² = 44

When separation is possible

A first-order ODE separates if and only if you can write dydx=f(x)g(y)\frac{dy}{dx} = f(x) g(y) for some functions ff and gg. Examples that separate:

  • dydx=xy\frac{dy}{dx} = x y.
  • dydx=exsiny\frac{dy}{dx} = e^x \sin y.
  • dydx=y+1x1\frac{dy}{dx} = \frac{y + 1}{x - 1}.

Examples that do not separate:

  • dydx=x+y\frac{dy}{dx} = x + y (a sum, not a product).
  • dydx=yx+y\frac{dy}{dx} = \frac{y}{x + y} (cannot be factored cleanly).

Extension 1 problems are always separable; non-separable equations belong to Extension 2.

The constant of integration

Always include a constant after integration. It is cleaner to combine the constants from both sides into one CC on the right.

If the question gives an initial condition, substitute to find CC. If not, leave the answer in terms of CC. A favourite simplification is to relabel a messy constant: after exponentiating lny=x3+C\ln|y| = x^3 + C, the factor eCe^C becomes a single new constant AA, and you should say so explicitly.

Newton's law of cooling

A body cools toward an ambient temperature TaT_a at a rate proportional to the temperature difference:

dTdt=k(TTa),\frac{dT}{dt} = -k (T - T_a),

where k>0k > 0.

Separate: dTTTa=kdt\frac{dT}{T - T_a} = -k \, dt.

Integrate: lnTTa=kt+C\ln |T - T_a| = -k t + C.

So TTa=AektT - T_a = A e^{-k t} for some constant AA, giving

T(t)=Ta+(T0Ta)ekt.T(t) = T_a + (T_0 - T_a) e^{-k t}.

The temperature approaches TaT_a as tt \to \infty. Note that T=TaT = T_a is the equilibrium (constant) solution, the case A=0A = 0: a body already at room temperature stays there.

Implicit versus explicit solutions

Sometimes the integrated equation cannot be solved cleanly for yy. In that case, leave it implicit. For example,

dydx=xy    ydy=xdx    y2+x2=C.\frac{dy}{dx} = -\frac{x}{y} \implies y \, dy = -x \, dx \implies y^2 + x^2 = C.

This is the family of circles x2+y2=Cx^2 + y^2 = C, the implicit solution - and the one drawn in the stage figures above.

How exam questions ask about separable ODEs

  • "Solve the differential equation ..." (with an initial condition). Separate, integrate, apply the condition to find the constant, and give yy explicitly (choosing the correct sign of any root from the initial condition).
  • "Find the general solution." Same, but stop at the family with +C+C; no initial condition is given.
  • "Show that y=y = \ldots satisfies / is a solution." You can verify by differentiating, but a "solve" instruction wants the separation method shown.
  • "A body cools / a population grows ..." A modelling problem: set up the proportionality as a differential equation, separate and solve, then use the data points to find the constants kk and AA.
  • "Find the constant solution / equilibrium." Set dydx=0\frac{dy}{dx} = 0, i.e. solve g(y)=0g(y) = 0; this is the solution the separation step hides.
  • "Leave your answer in implicit form." Do not force an explicit yy; the integrated equation is the answer.

Exam-style practice questions

Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

2023 HSC Q124 marksSolve the differential equation dydx=xy\frac{dy}{dx} = \frac{x}{y} with y(0)=2y(0) = 2.
Show worked answer →

Separate variables: ydy=xdxy \, dy = x \, dx.

Integrate both sides: y22=x22+C\frac{y^2}{2} = \frac{x^2}{2} + C, so y2=x2+Cy^2 = x^2 + C' (writing CC' for 2C2 C).

Apply y(0)=2y(0) = 2: 4=0+C4 = 0 + C', so C=4C' = 4.

y2=x2+4y^2 = x^2 + 4, so y=x2+4y = \sqrt{x^2 + 4} (positive root because y(0)=2>0y(0) = 2 > 0 and continuity).

Markers reward the separation, the integration on both sides, applying the initial condition to find the constant, and choosing the correct sign for the square root.

ExamExplained