In calculus, a separable differential equation is a first-order differential equation that can be written as
\[ \frac{dy}{dx}=\frac{f(x)}{g(y)} \] which may be written as \[ g(y) dy = f(x) dx \]The variables can be separated so that all terms involving \(y\) appear on one side and all terms involving \(x\) appear on the other. These equations can usually be solved by direct integration.
This tutorial explains the method and provides worked examples followed by practice exercises.
Solve the differential equation:
\[ \frac{dy}{dx}=3x^2 e^{y} \]Solution:
Separate variables: \[ e^{-y}dy=3x^2dx \] Integrate both sides: \[ \int e^{-y}dy=\int 3x^2dx \] \[ - e^{-y}=x^3+C \] Solve for \(y\): \[ e^{-y}=-x^3-C \] \[ -y=\ln(-x^3-C) \] \[ y=-\ln(-x^3-C) \]This is the general solution. You may verify it by differentiating.
Solve the differential equation:
\[ \frac{dy}{dx}=\frac{\sin x}{y\cos y} \]Solution:
Separate variables: \[ y\cos y\,dy=\sin x\,dx \] Integrate: \[ \int y\cos y\,dy=\int \sin x\,dx \] Using integration by parts on the left: \[ y\sin y+\cos y=-\cos x+C \]This solution is implicit; there is no simple explicit formula for \(y(x)\).
Solve the following separable differential equations:
a) \(\displaystyle \frac{dy}{dx}=-9x^2y^2\)
b) \(\displaystyle \frac{dy}{dx}=-2xe^{y}\)
a) \(\displaystyle y=\frac{1}{3x^3+C}\)
b) \(\displaystyle y=-\ln(x^2+C)\)