# Analytically solving a strange nonlinear second-order ODE

I had to solve the differential equation $$y'^2 = 2 y'' y + y^2.$$ Based on physical intuition (a vague analogy with a harmonic oscillator), I was able to conjure up the solution $$y(x) = A \cos^2(x/2)$$ out of nowhere, where $A$ is arbitrary. This is simply a "harmonic oscillator centered at $A/2$".

However, this gives me no insight into the structure of the equation. In particular it'd be nice to be able to prove that the solutions are periodic, or that they're symmetric about their midpoint $A/2$, or so on. It's not necessary for this particular equation, but I need that kind of insight for more complicated variants of this equation, where I don't know the solution.

Is there a systematic way to solve the above equation, besides my random guess? If so, does it give any new insight about how the solutions to the equation must behave?

There's a standard technique for 2nd-order equations where the independent variable is missing. There's no $x$ in sight, so let $z= dy/dx.$ Then $y'' = dz/dx = (dz/dy)(dy/dx) = (dz/dx)z.$ Plugging that in, your equation is
$$2z\frac{dz}{dy} = z^2-y^2.$$
So $y$ become the new independent variable. This equation is first-order (and I think an integrating factor will make it exact.)
• I think you mean $dz/dy$, not $dz/dx$, at the end of the long inline equation. Commented Aug 14, 2018 at 1:14
Starting with $$y'^2 = 2 y'' y + y^2$$ let $y=z^2$ which makes the equation to be $$-z^3 \left(4 z''+z\right)=0$$ Excluding the case $z=0$, we are then left with the simple $$4z''+z=0\implies z=c_1 \sin \left(\frac{x}{2}\right)+c_2 \cos \left(\frac{x}{2}\right)$$ After squaring and rearrangement, we can write $$y=c_3\cos\left(\frac x 2 + c_4\right)^2$$ Notice that $y=A \cos^2(x)$ is not a solution of the original differential equation while $y=A \cos^2(\frac x2)$ would be.
Maple's solution $$y(t)=\sqrt {{{\it C_2}}^{2}+{{\it C_1}}^{2}}+{\it C_1}\,\sin \left( t \right) +{\it C_2}\,\cos \left( t \right).$$