Separation of Variables

\begin{align} If\quad \frac{dy}{dx} & = f(x)g(x) \\ \\ Then \quad \int \frac{1}{g(y)}dy & = \int f(x)dx\\ \\ \\ \end{align}

Example

Find the general solution of the differential equation

\( \frac{dy}{dx} = xy^2 \)

\begin{align} \frac{dy}{dx} & = xy^2 \\ \int \frac{1}{y^2} \frac{dy}{dx} \, dx & = \int x \, dx \\ \int \frac{1}{y^2} \, dy & = \int x \, dx \\ -\frac{1}{y} + d & = \frac{1}{2}x^2 + e \quad (where\ d\ and\ e\ are\ constants\ of\ integration) \\ -\frac{1}{y} & = \frac{x^2}{2} + c \quad (where\ c\ = e-d)\\ y & = - \frac{2}{x^2}+k \\ \end{align}

Find the particular solution if \(y = 5\) when \( x = 2 \)

\begin{align} Substituting\ y & =5 \ and\ x=2 \ into\ the\ general\ solution \\ 5 & = -\frac{2}{2^2}+k \\ 5 & = - \frac{1}{2}+k \\ \implies k & = 5\frac{1}{2} \\ \therefore \ y & = -\frac{2}{x^2}+5\frac{1}{2} \end{align}