Solve ODE: $$2yy''=y^2+y'^2$$
My attempt: let $y=e^{z(x)}\Rightarrow y'=yz'(x),\; y''=y(z'^2+z'')$
$$2y^2(z'^2+z'')=y^2+y^2z'^2,\;\text{divide by } y^2\\
2(z'^2+z'')=1+z'^2\\
z'^2+2z''=1,\;\text{let }z'=p(x)\\
p^2+2p'=1\\
p^2-1=-2p'\\
{1-p^2\over p'}=2\\
{dp\over1-p^2}={1 \over 2} dz\\
{1\over 2}\ln\big|{1+p\over 1-p}\big|={1\over 2}z+\ln|C|,\text{as }C\text{ is arbitary constant, then let }С=\sqrt{С_1} \\
{1+p\over1-p}=C_1e^z$$
Here I got stuck, cause whatever I do I can't get the correct answer as in my textbook. In my textbook there is the answer: $y=C_1(1\pm \cosh(x+C_2));\; y=Ce^{\pm x}$.
Capturing the derivative terms using $\frac d{dx}(y^ay'^b)=y^{a-1}y'^{b-1}(ay'^2+byy'')$
You have that $$ \left(\frac{y'^2}{y}\right)'=\frac{2yy'y''-y'^3}{y^2}=y' \implies \frac{y'^2}{y}=y+2C $$ which gives an alternative approach.
For $C=0$ one gets the simple equations $y'=\pm y$ with the obvious exponential solutions.
For $C\ne 0$ complete the square $$ C^2=(y+C)^2-y'^2 $$ suggesting the substitution $y(x)+C = \pm C\cosh(u(x))$ leading to $u'(x)=\pm 1$ giving the other family of solutions.
Solve the autonomous ODE using the trial $y'=v(y)$
For non-constant solutions, one can try to parametrize the state vector $(y,y')$ by $y$ with some postulated differentiable function $y'=v(y)$. Then $y''=v'(y)y'=v'(y)v(y)$. Insert into the equation $$ 2yvv'=y^2+v^2. $$ Set $u(y)=v(y)^2$ to get the linear ODE $$ yu'(y)=u(y)+y^2. $$ The integrating factor is $y^{-2}$ so that $$ \left(\frac{u}{y}\right)'=1\implies u(y)=y(y+2C) $$ which is again the same equation as above.