Bernoulli's Equation/x^2 dy = (2 x y + y^2) dx

Theorem
The first order ODE:
 * $(1): \quad x^2 \rd y = \paren {2 x y + y^2} \rd x$

has the general solution:
 * $y = - \dfrac {x^2} {x + C}$

Proof
Rearranging $(1)$:


 * $(2): \quad \dfrac {\d y} {\d x} - \dfrac 2 x y = \dfrac {y^2} {x^2}$

It can be seen that $(2)$ is in the form:
 * $\dfrac {\d y} {\d x} + \map P x y = \map Q x y^n$

where:
 * $\map P x = -\dfrac 2 x$
 * $\map Q x = \dfrac 1 {x^2}$
 * $n = 2$

and so is an example of Bernoulli's equation.

By Solution to Bernoulli's Equation it has the general solution:
 * $(3): \quad \displaystyle \frac {\map \mu x} {y^{n - 1} } = \paren {1 - n} \int \map Q x \, \map \mu x \rd x + C$

where:
 * $\map \mu x = e^{\paren {1 - n} \int \map P x \rd x}$

Thus $\map \mu x$ is evaluated:

and so substituting into $(3)$: