### 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

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)$

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.

1. $\frac{dy}{dx}=\frac{{x}^{2}}{{y}^{2}}$ ,
2. $\frac{dy}{dx}=4{x}^{2}+2{y}^{2}$ ,
3. $y\frac{dy}{dx}+3x=7$
1. $\frac{dy}{dx}={x}^{2}\left(\frac{1}{{y}^{2}}\right)$ ,
2. cannot be written in the stated form,
3. Reformulating gives $\frac{dy}{dx}=\left(7-3x\right)×\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

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

$\frac{dy}{dx}=f\left(x\right)g\left(y\right)$
may be found from separating the variables and integrating:
$\int \frac{1}{g\left(y\right)}\phantom{\rule{0.3em}{0ex}}dy=\int f\left(x\right)\phantom{\rule{0.3em}{0ex}}dx$