Solve the ODE $y'' = (y')^2$ I am asked in a past question paper to solve the following ODE: $$ y'' = (y')^{2}$$
To solve this, I began by equating $$y' = u$$
Differentiating both sides $w.r.t.x$ $$ \frac{d^{2}y}{dx^{2}} = \frac{du}{dx}$$
And therefore substituting back to out original equation I got:
$$  \frac{du}{dx} = u^{2}$$
Rearranging $$\frac{du}{u^{2}} = dx$$
Integrating $w.r.t.x$ I got
$$ \frac{-1}{u} = x+C$$ and substituting back $u$
$$ \frac{-dx}{dy} = x+C$$
$$ =x + \frac{dx}{dy} = C$$
$$=\frac{-dx}{x+c} = dy$$
$$ \log(\frac{1}{x+c}) = y$$
$$ -(x+c) = e^{y}$$
Is my answer and method correct?
EDIT As pointed out by @MtGlasser
We can re-write the D.E as $$ \frac{y''}{y'} = y'$$
Which is of the form :
$$(ln(y'))' = y'$$
Integrating on both sides we get
$$ ln (y') = y + c$$
And taking exponent on both sides and re-arranging we get
$$ e^{-1}e^{-y} dy = dx$$
Integrating we get the asnwer $$ e^{-(y+1)} - C = x$$

You could even do it faster switching variables
$$y'' = (y')^{2} \implies -\frac {x''}{[x']^3}=\frac {1}{[x']^2}\implies x''=-x'$$
Reduction of order
$$p'=-p \implies p=x'=c_1\,e^{-y}\implies x=-c_1 \,e^{-y}+c_2\implies y=\cdots$$
