TITLE: Does this technique for solving an ODE generalize?
QUESTION [6 upvotes]: Apologies for what's probably a silly question to anyone who knows this stuff.

I was looking at a question earlier and realized that $\sin(x)$ and $\cos(x)$ satisfy two different differential equations:
$$u'' + u = 0$$
on the one hand, and 
$$u^2 + (u')^2 = 1$$
on the other.  Wondering if these were in any way connected, I tried differentiating the second equation, giving
$$2 u u' + 2 u' u''= 0;$$
Factoring,
$$2 u' (u + u'') = 0$$
so we have
$$u' = 0 \qquad \text{or} \qquad u + u'' = 0$$
The former equation corresponds to the solution $u = 1$ and the latter corresponds to $\sin$ and $\cos$.

Applying this to the differential equation
$$(u')^2 = 4 u^3 - g_2 u - g_3$$
we obtain
$$u' = 0 \qquad \text{or} \qquad 2 u'' - 12 u^2 + g_2 = 0.$$
Not having any intuition for the subject, I don't know if $2 u'' - 12 u^2 + g_2 = 0$ is in any sense "better" or "worse" than the original equation, though.  I can tell that differentiating both sides again doesn't appear to help.

Question: is this technique part of a bigger picture?  Or is it simply an ad-hoc trick that happens to work in this particular situation but is, for reasons obvious to others but not to me, unlikely to be useful in other situations?

REPLY [2 votes]: The method proposed by Daniel McLaury is the method of "integrating factor". This method is more known in the case of first order ODEs. It consists in multyplying the ODE by a convenient function (not nul) so that the ODE obtained be obviously integrable.
Of course, the main difficulty of the method is to find "a convenient function". It is not always possible, even for first order ODEs, and even more for second order.
In the given example $u''+u=0$ , it is easy to see that the function $u'$ is convenient ( of course, with $u'$ not nul everywhere, which avoids to later consider the case $u'=0$):
$$(u''+u)u'=\frac{1}{2}(u'^2+u^2)'=0$$
This reduces the order two to order one : $u'^2+u^2=c$. 
In fact, the goal of the method is to reduce the order. When an integrating factor can be found, in case of a first order ODE the method leads directly to the solution. In case of second order ODE, the method leads to a first order ODE which remains to be solved (not always possible, of course).