Energy in oscillatory motion

Watch a mass bouncing on a spring and you are watching energy change costume, not disappear. At the extremes of the swing the mass is momentarily still — all its energy is stored in the stretched or compressed spring. At the middle of the swing it is moving fastest — all that stored energy has converted into motion. Add the two forms together at any instant, kinetic plus potential, and the total never changes, however far the oscillator has travelled through its cycle. That constancy is not a coincidence; it is Newton's law of motion for a linear restoring force, rewritten in the language of energy. This article takes the simple harmonic motion (SHM) solution x(t)=Acos⁡(ω0t+ϕ)x(t)=A\cos(\omega_0 t+\phi) you already derived from x¨+ω02x=0\ddot x+\omega_0^2 x=0 and asks a new question of it — where does the energy live at each instant, and how much of it is there in total. The answer, E=12kA2E=\tfrac12 kA^2, is one of the most reused numbers in the whole course: it resurfaces when damping drains energy away, and again when waves carry energy from place to place.

The core insight

In undamped SHM, kinetic energy KK and potential energy UU continuously trade places but their sum E=12kA2=12mω02A2E=\tfrac12 kA^2=\tfrac12 m\omega_0^2A^2 stays constant and depends only on the amplitude.

The core idea

A mass mm on a spring of constant kk moves as x(t)=Acos⁡(ω0t+ϕ)x(t)=A\cos(\omega_0t+\phi), with ω0=k/m\omega_0=\sqrt{k/m} fixed by the physical setup and A,ϕA,\phi fixed by how the motion was started. Differentiating gives the velocity x˙(t)=−Aω0sin⁡(ω0t+ϕ)\dot x(t)=-A\omega_0\sin(\omega_0t+\phi), and from that the kinetic energy is

K(t)=12mx˙2=12mA2ω02sin⁡2(ω0t+ϕ).K(t) = \tfrac12 m\dot x^2 = \tfrac12 mA^2\omega_0^2\sin^2(\omega_0t+\phi).

where: mm is the oscillating mass, AA the amplitude, ω0=k/m\omega_0=\sqrt{k/m} the angular frequency, and ϕ\phi the phase constant fixed by initial conditions. The potential energy stored in the spring comes from U=12kx2U=\tfrac12 kx^2, valid because the restoring force is linear, F=−kx=−dU/dxF=-kx=-dU/dx:

U(t)=12kx2=12kA2cos⁡2(ω0t+ϕ).U(t) = \tfrac12 kx^2 = \tfrac12 kA^2\cos^2(\omega_0t+\phi).

Since k=mω02k=m\omega_0^2, both expressions share the same prefactor 12kA2\tfrac12 kA^2, so KK and UU are just that constant amount split between sin⁡2\sin^2 and cos⁡2\cos^2. Adding them and using sin⁡2θ+cos⁡2θ=1\sin^2\theta+\cos^2\theta=1 removes the time dependence entirely — the two terms are always complementary shares of one fixed total. That total,

E=K(t)+U(t)=12kA2=12mω02A2,E = K(t)+U(t) = \tfrac12 kA^2 = \tfrac12 m\omega_0^2 A^2,

is the headline result: the total mechanical energy of an undamped oscillator is fixed the instant the amplitude is fixed, and it never depends on time, phase, or where in the cycle you happen to look. Two consequences are worth carrying forward. First, E∝A2E\propto A^2 — doubling the amplitude quadruples the energy, the same scaling that reappears later as "intensity is proportional to amplitude squared" for waves. Second, KK and UU each oscillate at twice the frequency of x(t)x(t) itself, because sin⁡2θ\sin^2\theta and cos⁡2θ\cos^2\theta complete two full wobbles for every one cycle of cos⁡θ\cos\theta. KK peaks (equal to EE) at the equilibrium position x=0x=0, where the mass moves fastest; UU peaks (equal to EE) at the turning points x=±Ax=\pm A, where the mass is momentarily at rest.

Figure
Kinetic energy and potential energy trading places over one cycle while their sum stays flat and equal to the total energy
K and U trade places, K plus U stays constant time over one period T energy total energy E constant K(t) U(t) x = 0 x = A x = 0 x = -A x = 0

There is one more useful number hiding in these formulas: the time-averaged kinetic and potential energies over a full cycle. Because sin⁡2θ\sin^2\theta and cos⁡2θ\cos^2\theta each average to 12\tfrac12 over any whole number of periods, ⟨K⟩=⟨U⟩=12E=14kA2\langle K\rangle=\langle U\rangle=\tfrac12E=\tfrac14kA^2. So although KK and UU individually swing all the way from 00 up to EE and back every half-period, on average each carries exactly half of the total energy — a distinction worth keeping straight when a question asks for an average value rather than the value at one particular instant.

Derivation ATotal energy of an oscillator equals half k A squared and never changes with time

The goal of this derivation is to show, starting only from the SHM solution x(t)=Acos⁡(ω0t+ϕ)x(t)=A\cos(\omega_0t+\phi) and the two standard energy formulas K=12mx˙2K=\tfrac12m\dot x^2 and U=12kx2U=\tfrac12kx^2, that the sum K+UK+U collapses to a single constant 12kA2\tfrac12kA^2 with no leftover time dependence — a self-consistency check that Newton's law and energy conservation agree.

Step 1. Differentiate the position to get the velocity: x(t)=Acos⁡(ω0t+ϕ)x(t)=A\cos(\omega_0t+\phi) gives x˙(t)=−Aω0sin⁡(ω0t+ϕ)\dot x(t)=-A\omega_0\sin(\omega_0t+\phi). This is the standard SHM velocity, ninety degrees out of phase with the displacement, and its amplitude is Aω0A\omega_0.

Step 2. Substitute into the kinetic energy formula. K=12mx˙2=12mA2ω02sin⁡2(ω0t+ϕ)K=\tfrac12m\dot x^2=\tfrac12mA^2\omega_0^2\sin^2(\omega_0t+\phi). Since k=mω02k=m\omega_0^2 for this system, rewrite the prefactor as 12mA2ω02=12kA2\tfrac12mA^2\omega_0^2=\tfrac12kA^2, so K=12kA2sin⁡2(ω0t+ϕ)K=\tfrac12kA^2\sin^2(\omega_0t+\phi).

Step 3. Substitute the same x(t)x(t) into the potential energy formula. U=12kx2=12kA2cos⁡2(ω0t+ϕ)U=\tfrac12kx^2=\tfrac12kA^2\cos^2(\omega_0t+\phi), which already carries the identical prefactor 12kA2\tfrac12kA^2 found in Step 2 — a sign that the algebra is on track, since both energies must be built from the same amplitude.

Step 4. Add the two results. K+U=12kA2[sin⁡2(ω0t+ϕ)+cos⁡2(ω0t+ϕ)]K+U=\tfrac12kA^2\left[\sin^2(\omega_0t+\phi)+\cos^2(\omega_0t+\phi)\right]. The bracket is the Pythagorean identity, always equal to 11 regardless of the angle, so the entire time-dependent part cancels and E=K+U=12kA2=12mω02A2E=K+U=\tfrac12kA^2=\tfrac12m\omega_0^2A^2 — a fixed number set only by the amplitude and the spring–mass combination, never by tt or ϕ\phi. Check: at tt such that ω0t+ϕ=0\omega_0t+\phi=0, K=0K=0 and U=12kA2=EU=\tfrac12kA^2=E (a turning point); at ω0t+ϕ=π/2\omega_0t+\phi=\pi/2, K=12kA2=EK=\tfrac12kA^2=E and U=0U=0 (equilibrium). Both extremes equal the same EE, confirming the sum is constant throughout.

Worked example

Problem. A 0.200.20 kg mass on a spring with k=80k=80 N/m oscillates with amplitude A=0.10A=0.10 m. Find (a) the total energy, (b) the speed at x=0.06x=0.06 m, (c) confirm K+U=EK+U=E there, and (d) the position where K=UK=U.

Step 1. Total energy from the amplitude alone: E=12kA2=12(80)(0.10)2=12(80)(0.01)=0.40E=\tfrac12kA^2=\tfrac12(80)(0.10)^2=\tfrac12(80)(0.01)=0.40 J. This number is fixed for the whole motion, regardless of where the mass currently is.

Step 2. At x=0.06x=0.06 m, the potential energy is U=12kx2=12(80)(0.06)2=12(80)(0.0036)=0.144U=\tfrac12kx^2=\tfrac12(80)(0.06)^2=\tfrac12(80)(0.0036)=0.144 J. By conservation, the kinetic energy there must be K=E−U=0.40−0.144=0.256K=E-U=0.40-0.144=0.256 J, and since K=12mv2K=\tfrac12mv^2, v=2K/m=2(0.256)/0.20=2.56=1.6v=\sqrt{2K/m}=\sqrt{2(0.256)/0.20}=\sqrt{2.56}=1.6 m/s.

Step 3. Check: K+U=0.256+0.144=0.40K+U=0.256+0.144=0.40 J =E=E, confirming energy conservation at this arbitrary intermediate point, not just at the extremes.

Step 4. For K=UK=U, each must equal E/2=0.20E/2=0.20 J. Setting U=12kx2=E/2=12(12kA2)U=\tfrac12kx^2=E/2=\tfrac12\left(\tfrac12kA^2\right) gives x2=A2/2x^2=A^2/2, so x=±A/2=±0.10/2≈±0.0707x=\pm A/\sqrt2=\pm0.10/\sqrt2\approx\pm0.0707 m. The mass has speed 1.61.6 m/s at x=0.06x=0.06 m, and K=UK=U at x≈±0.071x\approx\pm0.071 m — always at A/2A/\sqrt2, about 70.7%70.7\% of the amplitude, whatever the values of mm, kk, or AA.

Competitive stretch

Problem. For the same spring-mass system (m=0.20m=0.20 kg, k=80k=80 N/m, A=0.10A=0.10 m), find the maximum speed vmax⁡v_{\max} directly from the energy relation, and check it against vmax⁡=Aω0v_{\max}=A\omega_0.

Step 1. At the equilibrium position all the energy is kinetic, so Kmax⁡=E=0.40K_{\max}=E=0.40 J. From Kmax⁡=12mvmax⁡2K_{\max}=\tfrac12mv_{\max}^2, vmax⁡=2E/m=2(0.40)/0.20=4.0=2.0v_{\max}=\sqrt{2E/m}=\sqrt{2(0.40)/0.20}=\sqrt{4.0}=2.0 m/s.

Step 2. Cross-check using ω0=k/m=80/0.20=400=20\omega_0=\sqrt{k/m}=\sqrt{80/0.20}=\sqrt{400}=20 rad/s, so vmax⁡=Aω0=0.10×20=2.0v_{\max}=A\omega_0=0.10\times20=2.0 m/s. Both routes agree: vmax⁡=2.0v_{\max}=2.0 m/s, confirming that E=12kA2E=\tfrac12kA^2 and E=12mvmax⁡2E=\tfrac12mv_{\max}^2 describe the same total energy from two different vantage points in the cycle.

Common traps

  • Treating KK and UU as each individually constant — only their sum EE is constant; both K(t)K(t) and U(t)U(t) oscillate with time, at twice the frequency of x(t)x(t).
  • Forgetting U=12kx2U=\tfrac12kx^2 is measured from equilibrium, so at x=0x=0 the energy is entirely kinetic, not half-and-half by some assumed symmetry.
  • Double-counting energy — 12kA2\tfrac12kA^2 already equals Kmax⁡=12mvmax⁡2K_{\max}=\tfrac12mv_{\max}^2; they are the same total computed two ways, not two separate energies to add together.
  • Guessing that K=UK=U happens at x=A/2x=A/2; the correct crossing is x=A/2x=A/\sqrt2, found by explicitly solving 12kx2=12(12kA2)\tfrac12kx^2=\tfrac12\left(\tfrac12kA^2\right) rather than assuming the midpoint.

Ask the tutor: if the kinetic-potential trade-off or the A/2A/\sqrt2 crossing point still feels shaky, ask the AI tutor to plot K(t)K(t) and U(t)U(t) together over one full period or to walk through another numerical energy-conservation example.

Why does U equal one half k x squared instead of something involving time directly?

Potential energy is defined through the force, not the clock: for a linear restoring force F=−kx=−dU/dxF=-kx=-dU/dx, integrating gives U=12kx2U=\tfrac12kx^2 as a function of position alone. Time only enters indirectly, through x(t)=Acos⁡(ω0t+ϕ)x(t)=A\cos(\omega_0t+\phi) — substitute that in and you get U(t)U(t). The formula U=12kx2U=\tfrac12kx^2 itself works at any instant, for any oscillator obeying Hooke's law, whether or not you know its phase.

Does the constant total energy mean the oscillator never loses speed or amplitude over many cycles?

Only in the idealised, undamped case treated here. Real oscillators lose a little energy each cycle to friction or air resistance, so EE slowly decreases and the amplitude shrinks — that is damped oscillation, and the rate of energy loss defines the quality factor QQ you meet later. Everything in this article assumes no such loss; E=12kA2E=\tfrac12kA^2 is the energy budget of the ideal, frictionless spring-mass system.

Is the energy result specific to a mass on a spring, or does it apply to any SHM system?

It applies to any system obeying x¨+ω02x=0\ddot x+\omega_0^2x=0 with a well-defined effective spring constant. For a spring-mass system kk is literal; for other SHM systems (like a simple pendulum at small angles) an effective keff=mω02k_{\text{eff}}=m\omega_0^2 plays the same role, and E=12keffA2=12mω02A2E=\tfrac12k_{\text{eff}}A^2=\tfrac12m\omega_0^2A^2 still gives the total energy in terms of amplitude and angular frequency.

Before this

Where this leads