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

Dec 30, 2016

$y = - \frac{1}{2} {x}^{2} + \frac{A}{x}$

#### Explanation:

We can write the equation $\left(3 {x}^{2} + 2 y\right) \mathrm{dx} + 2 x \mathrm{dy} = 0$ as:

$\setminus \setminus \setminus \setminus \setminus \setminus \setminus 2 x \mathrm{dy} = - \left(3 {x}^{2} + 2 y\right) \mathrm{dx}$
$\therefore 2 x \frac{\mathrm{dy}}{\mathrm{dx}} = - 3 {x}^{2} - 2 y$
$\therefore \frac{\mathrm{dy}}{\mathrm{dx}} + \frac{y}{x} = - \frac{3}{2} x$

This is a First Order DE of the form:

$y ' \left(x\right) + P \left(x\right) y = Q \left(x\right)$

Which we know how to solve using an Integrating Factor given by:

$I F = {e}^{\int P \left(x\right) \setminus \mathrm{dx}}$

And so our Integrating Factor is:

$I F = {e}^{\int \frac{1}{x} \setminus \mathrm{dx}}$
$\setminus \setminus \setminus \setminus = {e}^{\ln | x |}$
$\setminus \setminus \setminus \setminus = x$

If we multiply by this Integrating Factor we will (by its very design) have the perfect differential of a product:

$\setminus \setminus \setminus \setminus \setminus \frac{\mathrm{dy}}{\mathrm{dx}} + \frac{y}{x} = - \frac{3}{2} x$

$\therefore x \frac{\mathrm{dy}}{\mathrm{dx}} + y = - \frac{3}{2} {x}^{2}$

$\therefore \setminus \setminus \frac{d}{\mathrm{dx}} \left(x y\right) = - \frac{3}{2} {x}^{2}$

Which is now a separable DE, and we can separate the variables to get:

$\text{ } x y = \int \setminus - \frac{3}{2} {x}^{2} \setminus \mathrm{dx}$
$\therefore x y = - \frac{1}{2} {x}^{3} + A$
$\therefore y = - \frac{1}{2} {x}^{2} + \frac{A}{x}$

Dec 30, 2016

$y = \frac{C}{x} - {x}^{2} / 2$

#### Explanation:

An alternative approach

The equation is exact. ie there exists a potential function $f \left(x , y\right) = C$ such that $\mathrm{df} = {f}_{x} \mathrm{dx} + {f}_{y} \mathrm{dy} = 0$

to verify this we check the mixed partials

${f}_{x} = 3 {x}^{2} + 2 y \implies {f}_{x y} = 2$

${f}_{y} = 2 x \implies {f}_{y x} = 2 q \quad \star$

${f}_{x y} = {f}_{y x}$ !!!

For reasons that become apparent, we can now choose to integrate either term ... we will integrate ${f}_{x}$ wrt x

${f}_{x} = 3 {x}^{2} + 2 y \implies f = {x}^{3} + 2 x y + \alpha \left(y\right)$

....where $\alpha \left(y\right)$ is the function in y only that may have been lopped off by a differentiation wrt x.

We then look at the other partial that follows by now differentiating this f wrt y:

$f = {x}^{3} + 2 x y + \alpha \left(y\right) \implies {f}_{y} = 2 x + \alpha ' \left(y\right)$

And from $\star$

$\alpha ' \left(y\right) = 0 \implies \alpha \left(y\right) = C$

$\implies f = {x}^{3} + 2 x y + C = t i l \mathrm{de} C$

Final bit of algebra:

$x \left({x}^{2} + 2 y\right) = C$

$2 y = \frac{C}{x} - {x}^{2}$

$y = \frac{C}{x} - {x}^{2} / 2$