Simple Harmonic Motion and Its Differential Equation

AP Physics C: Mechanics · Unit 7 — Oscillations

The defining condition

A system undergoes simple harmonic motion (SHM) when the net force is a linear restoring force: proportional to the displacement from equilibrium and directed back toward it, $F_{net}=-kx$. Newton's second law then gives a second-order differential equation:

$$m\frac{d^2x}{dt^2}=-kx\qquad\Longleftrightarrow\qquad\frac{d^2x}{dt^2}=-\omega^2x,\qquad \omega^2=\frac{k}{m}$$

In Physics C this equation is the definition. You are expected to start from forces or torques, reach an equation of this shape, and read $\omega$ off the coefficient multiplying the displacement — never to quote a memorized period.

The general solution

$$x(t)=A\cos(\omega t+\varphi)$$$$v(t)=\frac{dx}{dt}=-A\omega\sin(\omega t+\varphi),\qquad a(t)=\frac{d^2x}{dt^2}=-A\omega^2\cos(\omega t+\varphi)=-\omega^2x$$

The angular frequency $\omega=2\pi/T=2\pi f$ is fixed by the system alone. The amplitude $A$ and the phase constant $\varphi$ are fixed by the initial conditions $x(0)=x_0$ and $v(0)=v_0$:

$$A=\sqrt{x_0^{2}+\frac{v_0^{2}}{\omega^{2}}},\qquad \tan\varphi=-\frac{v_0}{\omega x_0}$$

Because $\tan$ repeats every $\pi$, the equation for $\varphi$ has two roots in one cycle; the sign of $v_0$ selects which one is physical.

t T/4T/23T/4T3T/22T x = +A a = −ω²A cung luc do x(t) = A cos(ωt + φ) v(t) = −Aω sin(ωt + φ) a(t) = −Aω² cos(ωt + φ) = −ω²x v som pha T/4
Three graphs, one equation. The solid blue line is $x(t)$, the dashed red line is $v(t)$, the dotted green line is $a(t)$. Read three relationships: (1) $v$ leads $x$ by a quarter of a period — when $x$ is at its maximum $v=0$, and when $x=0$ the value of $|v|$ is at its maximum; (2) $a$ is completely out of phase with $x$, exactly as $a=-\omega^2x$ requires; (3) the two points marked at $t=0$ show that at the extreme position $x=+A$ the acceleration reaches its largest negative value $-\omega^2A$, meaning the restoring force is strongest, not $0$.

Worked example: amplitude and phase from the initial conditions

An object with $m=0.50$ kg is attached to a spring with $k=200$ N/m on a smooth horizontal surface. At $t=0$ the object is at $x_0=+0.030$ m and has velocity $v_0=-0.80$ m/s. Write $x(t)$ in the form $A\cos(\omega t+\varphi)$.

Solution

Step 1 — $\omega$ from the system:

$$\omega=\sqrt{\frac{k}{m}}=\sqrt{\frac{200}{0.50}}=\sqrt{400}=20\ \text{rad/s}$$

Step 2 — amplitude from the initial conditions. Note that $v_0/\omega=-0.80/20=-0.040$ m:

$$A=\sqrt{x_0^{2}+\left(\frac{v_0}{\omega}\right)^{2}}=\sqrt{(0.030)^2+(0.040)^2}=\sqrt{0.0025}=0.050\ \text{m}$$

Step 3 — initial phase. From $x_0=A\cos\varphi$: $\cos\varphi=0.030/0.050=0.60$, giving $\varphi=\pm0.927$ rad.

Choose the sign using the velocity: $v_0=-A\omega\sin\varphi$. Since $v_0<0$, $\sin\varphi>0$, so $\varphi$ must be positive.

$$x(t)=0.050\cos(20t+0.927)\ \text{(m)}$$

Step 4 — quick check by substitution: $x(0)=0.050(0.60)=0.030$ m and $v(0)=-0.050(20)(0.80)=-0.80$ m/s. Both initial conditions match.

Common mistake

The costliest mistake of this problem is taking $\varphi$ straight from the calculator: pressing $\arctan$ or $\arccos$ and writing it down without checking the sign of the velocity. An inverse function returns only one of the two roots, so half of all problems end up exactly $\pi$ out of phase — the graph is flipped upside down while the value of $A$ is still right, so nothing sounds an alarm. A safeguard: after you have $\varphi$, always substitute back into $v(0)=-A\omega\sin\varphi$ and compare the sign with the $v_0$ given; if the signs differ, replace $\varphi$ with $-\varphi$.

Key takeaway

The form $\dfrac{d^2x}{dt^2}=-\omega^2x$ is the definition, and $\omega$ is read from the coefficient. $A$ and $\varphi$ come from the initial conditions, not from the system. Always check the sign of $\varphi$ with $v(0)$.

← Conservation of Angular Momentum · All AP Physics C: Mechanics lessons · Practice AP Physics C: Mechanics questions (free, instant scoring) · The Mass–Spring System and the Simple Pendulum →