Solve ODE $2yy''=y^2+y'^2$. 
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}$.
 A: 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.
A: Your answer is correct so far (If you use $p=p(x)$). When you divide by $1-p^2$, remember you have the two solutions $p=\pm 1$, which lead to $y=e^{\pm x}$. Then the equation $\frac{1+p}{1-p}=e^{x+c_1}$ is equivalent as $p=\frac{-1+e^{x+c_1}}{1+e^{x+c_1}}$. Recall that $p=z'=y'/y$. Hence
$$\frac{y'}{y}=-1+\frac{2e^{x+c_1}}{1+e^{x+c_1}}.$$
Integrating this on both sides (with a substitution $u=1+e^{x+c_1}$) gives
$$\ln|y|=-x+2\ln (1+e^{x+c_1})+c_2.$$
This gives
$$y=c_3\frac{(1+e^{x+c_1})^2}{e^{x}}$$
By some transformation of constants, we can get the same result as the book.
A: First:
I think you can refine your solution. You wrote
$$p^2+2p'=1$$
then
$${dp\over1-p^2}={1 \over 2} dx$$
which gives $\dfrac{1+p}{1-p}=C_1e^x$ and then
$$\dfrac{y'}{y}=z'=p=\dfrac{C_1e^x-1}{C_1e^x+1}$$
this simply concludes $$\boxed{y=C_2e^x(C_1+e^{-x})^2}$$

Alternative:
$$\left(\dfrac{y'}{2y}\right)'=\dfrac{2yy''-2y'^2}{4y^2}=\dfrac14-\left(\dfrac{y'}{2y}\right)^2$$
then let $\dfrac{y'}{2y}=u$.
A: Setting $$v(y)=\frac{d y(x)}{dx}$$ we get
$$y\frac{d v(y)}{dy}v(y)=y^2+v(y)^2$$
substituting
$$\frac{du(y)}{dy}=2v(y)\frac{d v(y)}{dy}$$
and we have
$$\frac{u(y)}{dy}-\frac{u(y)}{y}=2y$$
with $$\mu(y)=\frac{1}{y^2}$$ we have
$$\frac{1}{y^2}\frac{u(y)}{dy}-2\frac{u(y)}{y^3}=\frac{2}{y}$$
$$\frac{d}{dy}\left(\frac{u(y)}{y^2}\right)=\frac{2}{y}$$
integrating
$$\frac{u(y)}{y^2}=2\log(y)+C_1$$
and we get
$$v(y)=\pm(-\sqrt{2y\log(y(x))+C_1})$$
and finelly we obtain
$$\sqrt{2\log(y(x))+C_1}=-x+C_2$$
