Skip to content

Separable differential equations, step by step

5 min read

Short answer

If dydx=g(x) h(y)\dfrac{dy}{dx}=g(x)\,h(y), move all yy terms to one side and all xx terms to the other, dyh(y)=g(x) dx\dfrac{dy}{h(y)}=g(x)\,dx, then integrate both sides. Add one constant CC, solve for yy if you can, and use the initial condition to fix CC.

Steps1Write dy/dx = g(x) h(y)2Separate: dy / h(y) = g(x) dx3Integrate both sides, add C4Solve for y if possible5Use y(x₀) = y₀ to find C; checkany h(y) = 0 solutionsConstant solutions where h(y) = 0 can disappear when you divide.
Separation works only when the right side factors into an x part and a y part.

Why it works

Writing 1h(y)dydx=g(x)\dfrac{1}{h(y)}\dfrac{dy}{dx}=g(x) and integrating with respect to xx, the substitution rule turns the left side into ∫dyh(y)\int\dfrac{dy}{h(y)}. So the separation trick is just integration by substitution in disguise.

Lost solutions

Dividing by h(y)h(y) assumes h(y)≠0h(y)\ne0. Any constant y0y_0 with h(y0)=0h(y_0)=0 is also a solution, and it may not be included in the general formula. Check them separately.

Worked example

Solve dydx=xy\dfrac{dy}{dx}=xy with y(0)=2y(0)=2.

Separate: dyy=x dx\dfrac{dy}{y}=x\,dx. Integrate: ln⁡∣y∣=x22+C\ln|y|=\tfrac{x^2}2+C, so y=Aex2/2y=Ae^{x^2/2}. With y(0)=2y(0)=2, A=2A=2: y=2ex2/2y=2e^{x^2/2}.

Try it yourself

Solve dydx=xy\dfrac{dy}{dx}=\dfrac{x}{y} with y(0)=3y(0)=3 (take y>0y>0).

Show the answer

y dy=x dx⇒y22=x22+Cy\,dy=x\,dx\Rightarrow\tfrac{y^2}2=\tfrac{x^2}2+C, so y2=x2+9y^2=x^2+9 using y(0)=3y(0)=3, and y=x2+9y=\sqrt{x^2+9}.

Keep going with practice

Vidi's differential equation lessons start here and add one technique per lesson.