How to solve $ xyy'' − 2x(y')^2 + yy' = 0$ How can I solve the given IVP 
$$ xyy'' − 2x(y')^2 + yy' = 0 $$
$$y(1) = 1, \\
y''(1) = 2.$$
Using substitution $u = \ln{x}$ is given as hint.
Yes this is a homework problem but I have no clue to solve it. I wish had some and tell you about it. I appreciate any help, even a little bit.
 A: The "how on Earth did you spot that?!" solution:
Consider the derivative of $xy^n y'$. Why? Because I thought the original equation looked a bit like a product rule, what with the $yy''$ and the $y'^2$, which look like $(yy')'$. This doesn't quite work by itself, but
$$ (xy^n y')' = y^n y' + nxy^{n-1}y'^2 + xy^n y'', $$
and if we set this equal to zero and cancel off a $y^{n-1}$, we find
$$ yy'+nxy'^2+xyy''=0, $$
and taking $n=-2$ gives us the original equation. Hence,
$$ \left( \frac{xy'}{y^2} \right)' = 0 \\
 \frac{xy'}{y^2} = A \\
\frac{y'}{y^2} = \frac{A}{x}, $$
after one integration. Integrating again,
$$ -\frac{1}{y} = A\log{x}+B, $$
and you can go on from here to find the values of $A$ and $B$ (note that if $x=1$, $-1/1 = B$, so $B=-1$, for example).
A: (I think this is probably different enough, at least at the beginning, to warrant a separate answer.)
We're going to look for an integrating factor Euler-style: that is, if we write the equation as
$$ 0=xyd(y')+yy' dx-2xy'dy, $$
where we define the operator $d$ to be linear and satisfy $d(uv)=v \, du+ u \, dv$ (don't do this in public, but it looks like "multiplying the equation by $dx$" from one of the $dy/dx$s: $dy = y' \, dx$).
Then the first two terms are $y \, d(xy')$, so we seek and integrating factor $z$ so that
$$ 0= d(zxy') = z \, d(xy') + z' xy' \, dx = z\left(d(xy') + \frac{z'}{z} xy' \, dx \right). $$
In other words, we have at present
$$ 0 = y \left( d(xy') + \frac{-2y'}{y} xy' \, dx \right). $$
Dividing the above equations by $z$ and $y$ and equating coefficients, we conclude that such a $z$ has to satisfy
$$ \frac{z'}{z} = -2\frac{y'}{y}. $$
Integrating,
$$ \log{(z/A)} = -2\log{y} = \log{y^{-2}}, $$
so $z=Ay^{-2}$. The constant is obviously irrelevant, and we end up with
$$ 0 = d\left(\frac{xy'}{y^2}\right) = \left(\frac{xy'}{y^2}\right)' \, dx, $$
and then proceed as in my other answer.
A: If you are supposed to use the hint $u=\log(x)$, then consider $y\big(u(x)\big)$ and compute its successive derivatives $$\frac{dy}{dx}=\frac{dy}{du}\times \frac{du}{dx}$$ $$\frac{d^2y}{dx^2}=\frac{dy}{du}\times\frac{d^2u}{dx^2}+\frac{d^2y}{du^2}\times\Big(\frac{du}{dx}\Big)^2$$ Back to $u=\log(x)$, $\frac{du}{dx}=\frac 1x$, $\frac{d^2u}{dx^2}=-\frac {1}{x^2}$ and replace in the original equation.
You should arrive at $$2\Big(\frac{dy}{du}\Big)^2=y\,\frac{d^2y}{du^2}.$$ Now, almost obviously, the trick is to set $y=\frac 1z$ from where the equation reduces to $$\frac{d^2z}{du^2}=0$$ which looks quite nice and easy to solve.
A: Letting $y(x)=e^{z(x)}$ the ODE becomes
$$x z''(x)+z'(x)-x z'(x)^2=0$$
Dividing by $x z'(x)$ gives
$$z''(x)/z'(x) +1/x-z'(x)=0$$
This can be integrated twice to get $z(x)$ as follows.
Writing
$$\frac{d}{dx} \left(\log(z'(x)) +\log(x) - z(x)\right)=0$$
we can immediately integrate to obtain
$$ \log(z'(x)) +\log(x) - z(x)=A$$
With a constant $A$. 
Exponentiating and rearranging gives
$$z'(x) e^{-z(x)}= e^{A}/x $$
This can be written as
$$\frac{d}{dx} \left( - e^{-z(x)}-e^{A}\log(x)\right)=0$$
Integrating gives with another constant $B$
$$- e^{-z(x)}-e^{A}\log(x) = B$$
Hence
$$z(x) = c_{2}-\log \left(c_{1}-\log (x)\right)$$
with two constants $c_1$ and $c_2$.
Exponentiating we get
$$y(x) = \frac{e^{c_2}}{c_1-\log(x)}$$
Adapting the constants to the initial conditions we find finally
$$y(x) = \frac{1}{1-\frac{1}{4} \left(1+\sqrt{17}\right) \log (x)}$$
This function is defined for $x>0$ and diverges at $x \simeq 2.18317$.
