### 5 Recognising an exact equation

The equation $\frac{d}{dx}\left(yx\right)=3{x}^{2}$ is exact, as we have seen. If we expand the left-hand side of this equation (i.e. differentiate the product) we obtain

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

Hence the equation

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

must be exact, but it is not so obvious that it is exact as in the original form. This leads to the following Key Point:

##### Key Point 3

The equation

$f\left(x\right)\frac{dy}{dx}+y\phantom{\rule{1em}{0ex}}{f}^{\prime }\left(x\right)=g\left(x\right)$
is exact. It can be re-written as
##### Example 4

Solve the equation

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

##### Solution

Comparing this equation with the form in Key Point 3 we see that $f\left(x\right)={x}^{3}$ and $g\left(x\right)=x$ . Hence the equation can be written

$\phantom{\rule{2em}{0ex}}\frac{d}{dx}\left(y{x}^{3}\right)=x$

which has solution

$\phantom{\rule{2em}{0ex}}y{x}^{3}=\int x\phantom{\rule{0.3em}{0ex}}dx=\frac{1}{2}{x}^{2}+C.$

Therefore

$\phantom{\rule{2em}{0ex}}y=\frac{1}{2x}+\frac{C}{{x}^{3}}.$

Solve the equation $sinx\phantom{\rule{0.3em}{0ex}}\frac{dy}{dx}+ycosx=cosx$ .

You should obtain $y=1+C\text{cosec}\phantom{\rule{0.3em}{0ex}}x$ since, here $f\left(x\right)=sinx$ and $g\left(x\right)=cosx$ . Then

$\phantom{\rule{2em}{0ex}}\frac{d}{dx}\left(ysinx\right)=cosx\phantom{\rule{2em}{0ex}}\text{and}\phantom{\rule{2em}{0ex}}ysinx=\int cosx\phantom{\rule{1em}{0ex}}dx=sinx+C$

Finally $y=1+C\phantom{\rule{0.3em}{0ex}}\text{cosec}\phantom{\rule{0.3em}{0ex}}x$ .

##### Exercises
1. Solve the equation $\frac{d}{dx}\left(y{x}^{2}\right)={x}^{3}.$
2. Solve the equation $\frac{d}{dx}\left(y{\text{e}}^{x}\right)={\text{e}}^{2x}$ given the condition $y\left(0\right)=2.$
3. Solve the equation ${\text{e}}^{2x}\frac{dy}{dx}+2{\text{e}}^{2x}y={x}^{2}$ .
4. Show that the equation ${x}^{2}\frac{dy}{dx}+2xy={x}^{3}$ is exact and obtain its solution.
5. Show that the equation ${x}^{2}\frac{dy}{dx}+3xy={x}^{3}$ is not exact.

Multiply the equation by $x$ and show that the resulting equation is exact and obtain its solution.

1. $y=\frac{{x}^{2}}{4}+\frac{C}{{x}^{2}}$ .
2. $y=\frac{1}{2}{\text{e}}^{x}+\frac{3}{2}{\text{e}}^{-x}$ .
3. $y=\left(\frac{1}{3}{x}^{3}+C\right){\text{e}}^{-2x}$ .
4. $y=\frac{1}{4}{x}^{2}+\frac{C}{{x}^{2}}$ .
5. $y=\frac{1}{5}{x}^{2}+\frac{C}{{x}^{3}}$ .