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 lefthand 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
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}}.$
Task!
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
 Solve the equation $\frac{d}{dx}\left(y{x}^{2}\right)={x}^{3}.$
 Solve the equation $\frac{d}{dx}\left(y{\text{e}}^{x}\right)={\text{e}}^{2x}$ given the condition $y\left(0\right)=2.$
 Solve the equation ${\text{e}}^{2x}\frac{dy}{dx}+2{\text{e}}^{2x}y={x}^{2}$ .
 Show that the equation ${x}^{2}\frac{dy}{dx}+2xy={x}^{3}$ is exact and obtain its solution.

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.
 $y=\frac{{x}^{2}}{4}+\frac{C}{{x}^{2}}$ .
 $y=\frac{1}{2}{\text{e}}^{x}+\frac{3}{2}{\text{e}}^{x}$ .
 $y=\left(\frac{1}{3}{x}^{3}+C\right){\text{e}}^{2x}$ .
 $y=\frac{1}{4}{x}^{2}+\frac{C}{{x}^{2}}$ .
 $y=\frac{1}{5}{x}^{2}+\frac{C}{{x}^{3}}$ .