1.6.2 · D3Oscillations & Waves

Worked examples — SHM differential equation — solution - x = A cos(ωt + φ)

3,102 words14 min readBack to topic

This page is a worked-example machine for the solution $x=A\cos(\omega t+\phi)$. The equation is solved once; the art is in choosing the two constants (amplitude) and (phase) correctly for whatever starting state you are handed. Every possible starting state — sign of position, sign of velocity, starting at the wall, starting at the centre, zero everything — gets its own worked cell below.

Before symbols do any work, recall the two master formulas (both derived in the parent note, never guessed):


The two sign checks (memorise these, use them everywhere)

At our solution and its derivative read: Since and :

The picture above is the phase compass: pin 's sign (left/right) and 's sign (up/down) and the arrow lands in one quadrant. Refer back to it in every example.


The scenario matrix

Every SHM "find " problem is one of these cells. The Example that covers each cell is named. The four nonzero sign combinations of are all present (Cells E, F, G, K).

Cell Starting position Starting velocity Which quadrant is ? Covered by
A (at wall) (released from rest) Ex 1
B (at far wall) Ex 2
C (centre) (moving right) Ex 3
D (centre) (moving left) Ex 4
E Quadrant IV: Ex 5
F Quadrant I: Ex 6
G Quadrant II: Ex 7
K Quadrant III: Ex 8
H and degenerate: no motion Ex 9
I word problem (pendulum) given period + push full pipeline Ex 10
J exam twist (find first time at a position) inverting the cosine Ex 11

For every example we use the same spring unless told otherwise: , , so


Example 1 — Cell A: released from rest at the wall


Example 2 — Cell B: released from rest at the wall


Example 3 — Cell C: centre, moving right


Example 4 — Cell D: centre, moving left


Example 5 — Cell E: positive position, positive velocity (Quadrant IV of )


Example 6 — Cell F: positive position, negative velocity (Quadrant I of )


Example 7 — Cell G: negative position, negative velocity (arctan lands in the wrong quadrant)

The figure plots the same magnitude problem for Cells E, F and G on one time axis: identical amplitude, three different phases sliding the curve left/right. That sliding is .


Example 8 — Cell K: negative position, positive velocity (Quadrant III of )


Example 9 — Cell H: the degenerate case (zero, zero)


Example 10 — Cell I: word problem, a pendulum from period + push


Example 11 — Cell J: the exam twist (invert the cosine to find a time)


Recall One-line recipe for ANY starting snapshot

Compute ; get the magnitude of from (unless , where you use directly); then set the quadrant using: shares the sign of , and is opposite to .

Which cell has ?
Released from rest at (positive position, zero velocity).
Which cell has ?
Released from rest at (negative position, zero velocity).
Centre, moving right — what is ?
(so ).
Centre, moving left — what is ?
(so ).
Negative position, positive velocity — which quadrant is ?
Quadrant III (); subtract from the raw arctan.
When must you add to the raw for ?
When the required sign of (i.e. of ) disagrees with what returned — usually .
When is unusable?
When (division by zero); then use chosen by the sign of .
In the zero-zero degenerate case, what is ?
Undefined and irrelevant — so the phase multiplies nothing.