E(t) does not measure energy, energy per mass unit.
Starting with an ODE coming directly from Newton's 2nd law F=ma with a spring force F=-ku and ma=mu^{\prime\prime} ( a : acceleration, u : displacement), we have mu^{\prime\prime} + ku = 0 Integrating this equation gives a physical energy balance: E(t) = \underbrace{{\half}mv^2}_{\hbox{kinetic energy} } + \underbrace{{\half}ku^2}_{\hbox{potential energy}} = E(0),\quad v=u^{\prime} Note: the balance is not valid if we add other terms to the ODE.