The total oscillator energy is fixed by k and amplitude. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.

highlighted = computed this step

Amplitude sets the total energy

With spring constant 2 newtons per metre and amplitude 4 metres, the checked total energy is 16 joules.

E=12kA2=12242=16 JE={1\over 2}kA^{2}={1\over 2}\cdot 2\cdot 4^{2}=16\ \mathrm{J}
Amplitude energy ledgerThe total energy is computed from k and A.k=2 N/mA=4 mx=4 mE=16 JU=16 JK=0 J

At the endpoint, the energy is stored in the spring

At position 4 metres, spring energy is 16 joules and kinetic energy is zero.

U=16 J,K=0U=16\ \mathrm{J},\quad K=0
Endpoint energyThe split still sums to the checked total.k=2 N/mA=4 mx=4 mE=16 JU=16 JK=0 J