CAS header

 

Find this content useful?
Think it should stay ad-free?

Separation of variables

Separation of variables

There exists a class of first order differentiable equations, ones of the form $\frac{dy}{dx} = f(x)g(y)$ that can be separated using multiplication and division operations only and then solved by directly integrating them.

The process is as follows $$ \frac{dy}{dx} = f(x)g(y) \Leftrightarrow \int \frac{1}{g(y)} dy = \int f(x)dx $$

Note that many first order differential equations cannot be solved using this method and two very similar equations could be separable and non-separable. For example the equation $$ \frac{dy}{dx} = xy + x $$ is separable, however, the equation $$ \frac{dy}{dx} = xy + x^2 $$ is not separable

Separation of variables 1

Solve the differential equation below given that $x=0$ when $y = 4$ $$ \frac{dy}{dx} = (1+x)(1+y) $$
solution - press button to display
$$ \begin{align} \frac{dy}{dx} &= (1+x)(1+y) \\ \int \frac{1}{1+y}dx &= \int (1+x)dx \\ \ln(1+y) &= \frac{1}{2}x^2 + x + c \\ 1+y &= Ae^{\frac{1}{2}x^2 +x} \\ y &= Ae^{\frac{1}{2}x^2 +x}-1 \end{align} $$ Applying the initial conditions gives $$ 4 = Ae^0 - 1 \Rightarrow A = 5 $$ The solution is therefore: $$ y = 5e^{\frac{1}{2}x^2 +x}-1 $$

Separation of variables 2

Find the general solution of the differential equation $$ \frac{dy}{dx} = xy\sin(x) $$
solution - press button to display

Separation of variable yields $$ \int \frac{1}{y}dy = \int x\sin(x)dx $$ This now requires integration by parts on the right hand side.  Proceeding with $u = x,\; v'= \sin(x)$ yields 

$$ \ln(y) = -x\cos(x) + sin(x) + c $$

Making $y$ the subject gives a general equation of $$ y = Ae^{-x\cos(x) + \sin(x)} $$

Separation of variables 3

Find the general solution of the differential equation $$ (4y+2)\frac{dy}{dx} = xy^2 - x. $$ Leave your answer in the form $p(x) = q(y)$
solution - press button to display
The solution of this differential equation will involve partial fractions. $$ \begin{align} (4y+2)\frac{dy}{dx} &= xy^2 - x \\ \int\frac{4y+2}{y^2-1}dy&= \int x dx \\ \end{align} $$

The fraction on the left hand side decomposes as $$ \frac{4y+2}{y^2-1} = \frac{3}{y-1} + \frac{1}{y+1} $$

Our integrals therefore reduce to

$$ \int \frac{3}{y-1} + \frac{1}{y+1} dy = \frac{1}{2}x^2 + c $$

Integrating the left hand side yields

$$ 3\ln(y-1) + \ln(y+1) = \frac{1}{2}x^2 + c $$