Does this technique for solving an ODE generalize? 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?
 A: Oh yes! I hope you don't mind getting a little physical, though! You see, $$(u')^2+u^2=1$$ is a statement about conservation of energy and represents a first integral of motion. Not only that, it carries more information, since replacing $1$ by some $E>0$ gives $$\left(\frac{u'}{\sqrt{E}}\right)^2+\left(\frac{u}{\sqrt{E}}\right)^2=1,$$
characterizing all trajectories in phase space as circles. Energy is a constant along these trajectories - representing level sets of $f(u',u)=(u')^2+u$ in phase space. The solution can be written as $u(t)=\sqrt{E}\cos{(t+\phi)}$, with the phase again depending on some concrete initial value. Also, the second order equation is usually called an equation of motion.
Now, applying this to your problem, we can use a trick from classical mechanics. First a brief outline: energy is usually made up of two parts, the kinetic energy $$\frac{1}{2}(u')^2$$
and the potential energy which is a general function $V(u)$ of $u$, called the potential:
$$\frac{1}{2}(u')^2+V(u)=E.$$
The significance of the second power of the first derivative is that differentiation generates second order equations of motion, requiring two initial values, and our world is quirky like in that it wants exactly 2 initial values $u(0)$ and $u'(0)$. 
Now we can solve the problem differently. Consider the following: 
$$\frac{1}{2}(u')^2=E-V(u) \\ \Rightarrow u' = \pm \sqrt{2(E-V(u))},$$ and now separation of variables gives $$\frac{du}{\sqrt{2(E-V(u))}}=\pm dt, $$
which we can integrate and (hopefully) invert to give $u(t)$, otherwise the solution is given implicitly as $t=F(u)$.
We could apply this to your cubic problem. Now omitting the $1/2$ in the kinetic term, $V(u)=-4u^3+g_2u$ and $E=-g_3$, however this leads to an elliptic integral. MathWorld's reference (under (48)) gives $$z=\int_{\wp(z)}^{\infty}1/\sqrt{4u^3-g_2u-g_3}$$ as an integral representation of the Weierstrass P function. It likewise gives $\wp(t)$ as the solution to your starting 2nd order equation.
What can we do with these level sets? First of all, points where $u'=0$ are called turning points. We can draw $V(u)$ and everything below the line $V=E$ is going to be "traced" by the solution, represented as a material particle, like on a roller coaster. Obviously it cannot reverse its motion anywhere, since that would mean that $u'$ must go from positive to negative values, and it cannot do so without crossing $u'=0$ due to continuity. So they represent end-points of motion, where some material particle has to either stop forever (reaching some local maximum asymptotically, having barely enough energy to do so, and not enough to go past it) or reverse its motion. If $V(u)=u^2$, then we see that the particle will oscillate between $u=\pm\sqrt{E}$. Here I've drawn the effective Kepler potential $-k/r+M^2/2r^2$, along with some negative energy, where you can see two turning points, representing bounded planetary motion:

The point of all these is that we can integrate $\frac{du}{\sqrt{2(E-V(u))}}$ from one turning point to the next, giving us half the period of motion. And all this is barely scratching the surface, as it has immense theoretical significance. I hope this gave you a slightly new perspective on things and that it helped!
A: 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).  
A: I'm not sure if this will help you much, but here are my thoughts:
What you found in your first case is an integral curve. 
Let's suppose your ODE corresponds to a physical system, where $u$ tells you the position of the particle. Suppose we had a function which was invariant along the path of your particle, i.e. $f(u(t)) = c$ for some fixed $c \in \mathbb{R}$. We call these things integral curves. In your example, this is more apparent if you let $v = u'$, and rewrite your ode as 
$$ u' = v$$
$$v'= -u$$
From this point of view, the function $f(u,v) = u^2 + v^2$ is an integral curve, since, when you differentiate (as you did), it's 0, hence giving us that it's constant. 
In general, finding these guys helps reduce the dimension of the problem. Sometimes, we have a lot of these guys, so much that they foliate the space! Going back to your first example, notice that every solution of your initial problem lies in a curve of the form $u^2 + v^2 = c$. You noted that $u =1 $ was a solution, but surely you see that such a thing is not possible, and perhaps you meant $u=0$, which is in fact a solution, and corresponds to the curve $u^2 + v^2 = 0$.
It is these things which allow you to solve the 2-body problem in 3-dimensions, for example. 
