Second Order ODE/x^2 y'' = 2 x y' + (y')^2

Theorem
The second order ODE:
 * $(1): \quad x^2 y'' = 2 x y' + \left({y'}\right)^2$

has the solution:
 * $y = - \dfrac {x^2} 2 - C_1 x - C_1^2 \ln \left({x + C_1}\right) + C_2$

Proof
The proof proceeds by using Solution of Second Order Differential Equation with Missing Dependent Variable.

Substitute $p$ for $y'$ in $(1)$:

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

where:
 * $P \left({x}\right) = -\dfrac 2 x$
 * $Q \left({x}\right) = \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 {\mu \left({x}\right)} {p^{n - 1} } = \left({1 - n}\right) \int Q \left({x}\right) \mu \left({x}\right) \, \mathrm d x + C$

where:
 * $\mu \left({x}\right) = e^{\left({1 - n}\right) \int P \left({x}\right) \, \mathrm d x}$

Thus $\mu \left({x}\right)$ is evaluated:

and so substituting into $(3)$: