
# 2.4: Separable Differential Equations

A differential equation is called separable if it can be written as

$f(y)\,dy = g(x)\,dx.$

### Steps To Solve a Separable Differential Equation

To solve a separable differential equation

1. Get all the $$y$$'s on the left hand side of the equation and all of the $$x$$'s on the right hand side.
2. Integrate both sides.
3. Plug in the boundary conditions (e.g. given initial values) to find the constant of integration (C).
4. Solve for $$y$$.

Example 1

Solve $$\dfrac{dy}{dx} = y(3 - x)$$ with $$y(0 )= 5$$.

Solution

\begin{align} \dfrac{dy}{y} &= (3 - x) dx \\ \implies \int \dfrac{dy}{y} &= \int (3-x) dx \\ \implies \ln\; y &= 3x - \dfrac{x^2}{2} + C \\ \implies \ln 5 &= 0 + 0 + C \\ \implies C &= \ln\; 5 \\ \implies y &= e^{3x-\frac{x^2}{2}} + \ln \; 5 \\ \implies y &= e^{3x-\frac{x^2}{2}} \; e^{\ln \; 5} \\ &= 5e^{3x-\frac{x^2}{2}}. \end{align}

Exercise

1. $$\dfrac{dy}{dx} = \dfrac{x}{y}$$ with $$y(0) = 1$$
2. $$\dfrac{dy}{dx} = x(x+1)$$ with $$y(1) = 1$$
3. $$2xy + \dfrac{dy}{dx} = x$$  with $$y(0) = 2$$

### Contributors

• Integrated by Justin Marshall.