This question had been bothering me for a while since I teach the intro differential equations courses occasionally, so I finally looked up the reference Anatoly gave and figured out the details. I'll drop them here in case anyone else can get use out of them.

Starting with the second-order equation

$y'' + Py' + Qy = 0$

we can make the change of variables $w = y \cdot e^{\int P/2}$. This change of variables is pretty clever; if you work it out, it happens to eliminate the first derivative term and gives us a new second-order equation of the form

$w'' + Q_0w = 0$.

If you calculate it out, you can find that $Q_0 = Q - \frac14P^2 - \frac12P'$. Nothing fancy here, just what happens when you do the change of variables. This $Q_0$ is the **invariant** of the second-order equation that is mentioned in the question.

Any two second-order equations that have the same invariant can easily be transformed into one another by a change of variables; simply change variables once to get to the standard form $w'' + Q_0w = 0$ and then change variables back into the other one.

More difficult is that all changes of variables preserve this invariant; proving it for changes of variables y = G x is an easy computation with a bunch of cancellation, but I'm not sure if we need to do more than that to finish the proof.

From the point of view of someone teaching introductory differential equations, you are normally dealing with second-order equations $y'' + Py' + Qy = 0$ where $P$ and $Q$ are real numbers. In this case, the invariant $Q_0$ is just $-\frac14$ times the discriminant of the auxiliary equation. So the theorem says that any two equations with the same auxiliary equation discriminant can be transformed into each other.

For example,

$y'' + 6y' + 10y = 0$

has $Q_0 \equiv 1$, so

it must be able to turn into

$w'' + 1w = 0$

via a change of variables. Indeed, if you let

$w = y e^{3x}$

then you get the equation $w'' + w = 0$, and the solution is

$y \cdot e^{3x} = c_1 \cos x + c_2 \sin x$

$y = c_1 e^{-3x} \cos x + c_2 e^{-3x}\sin x$.

Another example:

$y'' + 6y' + 9y = 0$

has $Q_0 \equiv 0$,

so it must be able to turn into simply

$w'' = 0$

via a change of variables. The change of variables only depends on $P$, and yes, $w = y e^{3x}$ is a pretty good change of variables. Via this route we end up with

$y \cdot e^{3x} = c_1 + c_2 x$

$y = c_1 e^{-3x} + c_2 x e^{-3x}$

which is of course correct.

So, in our intro differential equations classes, the invariant is just the familiar fact that if we complete the square of the auxiliary equation, we can see the correct change of variables that will leave us with a bunch of $\cos$, $\sin$, $\cosh$, and $\sinh$ in addition to our exponentials from $P/2$.