### 1 Separating the variables in first order ODEs

In this Section we consider differential equations which can be written in the form

$\phantom{\rule{2em}{0ex}}\frac{dy}{dx}=f\left(x\right)g\left(y\right)$

Note that the right-hand side is a product of a function of $x$ , and a function of $y$ . Examples of such equations are

$\phantom{\rule{2em}{0ex}}\frac{dy}{dx}={x}^{2}\phantom{\rule{0.3em}{0ex}}{y}^{3},\phantom{\rule{2em}{0ex}}\frac{dy}{dx}={y}^{2}sinx\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}\frac{dy}{dx}=ylnx$

Not all first order equations can be written in this form. For example, it is not possible to rewrite the equation

$\phantom{\rule{2em}{0ex}}\frac{dy}{dx}={x}^{2}+{y}^{3}$

in the form

$\phantom{\rule{2em}{0ex}}\frac{dy}{dx}=f\left(x\right)g\left(y\right)$

##### Task!

Determine which of the following differential equations can be written in the form

$\phantom{\rule{2em}{0ex}}\frac{dy}{dx}=f\left(x\right)g\left(y\right)$

If possible, rewrite each equation in this form.

- $\frac{dy}{dx}=\frac{{x}^{2}}{{y}^{2}}$ ,
- $\frac{dy}{dx}=4{x}^{2}+2{y}^{2}$ ,
- $y\frac{dy}{dx}+3x=7$

- $\frac{dy}{dx}={x}^{2}\left(\frac{1}{{y}^{2}}\right)$ ,
- cannot be written in the stated form,
- Reformulating gives $\frac{dy}{dx}=\left(7-3x\right)\times \frac{1}{y}$ which is in the required form.

The variables involved in differential equations need not be $x$ and $y$ . Any symbols for variables may be used. Other first order differential equations are

$\phantom{\rule{2em}{0ex}}\frac{dz}{dt}=t{\text{e}}^{z}\phantom{\rule{2em}{0ex}}\frac{d\theta}{dt}=-\theta \phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}\frac{dv}{dr}=v\left(\frac{1}{{r}^{2}}\right)$

Given a differential equation in the form

$\phantom{\rule{2em}{0ex}}\frac{dy}{dx}=f\left(x\right)g\left(y\right)$

we can divide through by $g\left(y\right)$ to obtain

$\phantom{\rule{2em}{0ex}}\frac{1}{g\left(y\right)}\frac{dy}{dx}=f\left(x\right)$

If we now integrate both sides of this equation with respect to $x$ we obtain

$\phantom{\rule{2em}{0ex}}\int \frac{1}{g\left(y\right)}\frac{dy}{dx}\phantom{\rule{0.3em}{0ex}}dx=\int f\left(x\right)\phantom{\rule{0.3em}{0ex}}dx$

that is

$\phantom{\rule{2em}{0ex}}\int \frac{1}{g\left(y\right)}\phantom{\rule{0.3em}{0ex}}dy=\int f\left(x\right)\phantom{\rule{0.3em}{0ex}}dx$

We have
**
separated the variables
**
because the left-hand side contains only the variable
$y$
, and the right-hand side contains only the variable
$x$
. We can now try to integrate each side separately. If we can actually perform the required integrations we will obtain a relationship between
$y$
and
$x$
. Examples of this process are given in the next subsection.

##### Key Point 1

**
Method of Separation of Variables
**

The solution of the equation