# What is the general solution of the differential equation ?  (6xy - 3y^2+2y) dx + 2(x-y)dy = 0

Oct 29, 2017

${e}^{3 x} \left(2 x y - {y}^{2}\right) = C$

#### Explanation:

$\left(6 x y - 3 {y}^{2} + 2 y\right) \mathrm{dx} + 2 \left(x - y\right) \mathrm{dy} = 0 \ldots . . \left[A\right]$

Suppose we have:

$M \left(x , y\right) \mathrm{dx} = N \left(x , y\right) \mathrm{dy}$

Then the DE is exact if ${M}_{y} - {N}_{x} = 0$

$M = 6 x y - 3 {y}^{2} + 2 y \implies {M}_{y} = 6 x - 6 y + 2$
$N = 2 \left(x - y\right) \implies {N}_{x} = 2$

${M}_{y} - {N}_{x} \ne 0 \implies$ Not an exact DE

So, we seek an Integrating Factor $\mu \left(u\right)$ such that

${\left(\mu M\right)}_{y} = {\left(\mu N\right)}_{x}$

So, we compute::

$\frac{{M}_{y} - {N}_{x}}{N} = \frac{6 x - 6 y + 2 - 2}{2 \left(x - y\right)} = 3$

So the Integrating Factor is given by:

$\mu \left(x\right) = {e}^{\int \setminus 3 \setminus \mathrm{dx}}$
$\setminus \setminus \setminus \setminus \setminus \setminus \setminus = {e}^{3 x}$

So when we multiply the DE [A] by the IF we now get an exact equation:

$\left(6 x y - 3 {y}^{2} + 2 y\right) {e}^{3 x} \mathrm{dx} + 2 \left(x - y\right) {e}^{3 x} \mathrm{dy} = 0$

And so if we redefine the function $M$ and $N$:

$M = \left(6 x y - 3 {y}^{2} + 2 y\right) {e}^{3 x}$
$N = 2 \left(x - y\right) {e}^{3 x}$

Then, our solution is given by:

${f}_{x} = M$ and ${f}_{y} = N$ and

If we consider ${f}_{y} = N$, then:

$f = \int \setminus 2 \left(x - y\right) {e}^{3 x} \setminus \mathrm{dy} + g \left(x\right)$, where we treat $x$ as constant
$\setminus \setminus = 2 {e}^{3 x} \setminus \int x - y \setminus \mathrm{dy} + g \left(x\right)$
$\setminus \setminus = 2 {e}^{3 x} \left(x y - \frac{1}{2} {y}^{2}\right) + g \left(x\right)$
$\setminus \setminus = {e}^{3 x} \left(2 x y - {y}^{2}\right) + g \left(x\right)$

And now we consider ${f}_{x} = M$ and we differentiate the last result to get:

${f}_{x} = \left({e}^{3 x}\right) \left(2 y\right) + \left(3 {e}^{3 x}\right) \left(2 x y - {y}^{2}\right) + g ' \left(x\right)$
$\setminus \setminus \setminus = \left(2 y + 6 x y - 3 {y}^{2} + g ' \left(x\right)\right) {e}^{3 x}$

As ${f}_{x} = M$ then we have:

$6 x y - 3 {y}^{2} + 2 y = 2 y + 6 x y - 3 {y}^{2} + g ' \left(x\right)$
$\therefore g ' \left(x\right) = 0 \implies g \left(x\right) = K$

${e}^{3 x} \left(2 x y - {y}^{2}\right) = C$