Dove's LibraryDove's Library

7.3 - Representing and Analyzing SHM

Mathematical Representation of SHM

Simple harmonic motion can be described mathematically with sine or cosine functions. Displacement from equilibrium as a function of time follows one of:
x(t)=Acos⁡(2πft)orx(t)=Asin⁡(2πft)x(t) = A\cos(2\pi ft) \qquad \text{or} \qquad x(t) = A\sin(2\pi ft)
where x(t)x(t) is displacement at time tt in meters, AA is amplitude (maximum displacement) in meters, ff is frequency in Hz, and tt is time in seconds. Time (tt) is the independent variable, displacement (xx) is the dependent variable.

Choosing Between Sine and Cosine

The choice depends on where the object is at t=0t = 0.
Use cosine when starting at maximum displacement (x=Ax = A at t=0t=0), since x(0)=Acos⁡(0)=A(1)=Ax(0) = A\cos(0) = A(1) = A, representing an object pulled to maximum displacement and released. Most problems use cosine.
Use sine when starting at equilibrium (x=0x = 0 at t=0t=0), since x(0)=Asin⁡(0)=A(0)=0x(0) = A\sin(0) = A(0) = 0, representing an object passing through equilibrium at the starting instant.

The Three Functions of SHM

A complete description needs three related functions.
Displacement: x(t)=Acos⁡(2πft)x(t) = A\cos(2\pi ft)
Velocity: v(t)=−2πfAsin⁡(2πft)v(t) = -2\pi fA\sin(2\pi ft), or with angular frequency (ω=2πf\omega = 2\pi f), v(t)=−ωAsin⁡(2πft)v(t) = -\omega A\sin(2\pi ft)
Acceleration: a(t)=−4π2f2Acos⁡(2πft)a(t) = -4\pi^2f^2A\cos(2\pi ft), or with angular frequency, a(t)=−ω2Acos⁡(2πft)a(t) = -\omega^2 A\cos(2\pi ft)

Maximum Values

Quantity
Maximum Value
Displacement
xmax=Ax_{\text{max}} = A
Velocity
vmax=ωA=2πfAv_{\text{max}} = \omega A = 2\pi fA
Acceleration
amax=ω2A=4π2f2Aa_{\text{max}} = \omega^2 A = 4\pi^2f^2A

Graphical Representation

7.3 - Representing and Analyzing SHM
When displacement is at maximum (x=±Ax = \pm A), velocity is zero and acceleration is at its maximum magnitude (a=∓ω2Aa = \mp\omega^2A). When displacement is zero (at equilibrium), velocity is at its maximum magnitude (v=±ωAv = \pm\omega A) and acceleration is zero. In terms of phase, velocity leads displacement by 90° (π/2\pi/2 radians), and acceleration is 180° (π\pi radians) out of phase with displacement, meaning acceleration always points opposite to displacement.
Here’s one full cycle as a table, for an object released from rest at x=+Ax = +A (the cosine case, matching the graphs above):
Time
Where the object is
Displacement xx
Velocity vv
Acceleration aa
00
turning point (positive end)
+A+A (max)
00
−amax-a_{\text{max}}
T/4T/4
equilibrium, moving in the −x-x direction
00
−vmax-v_{\text{max}}
00
T/2T/2
turning point (negative end)
−A-A (min)
00
+amax+a_{\text{max}}
3T/43T/4
equilibrium, moving in the +x+x direction
00
+vmax+v_{\text{max}}
00
TT
back at the start
+A+A (max)
00
−amax-a_{\text{max}}
Opposite signs: xx and aa always have opposite signs, and aa is zero exactly where xx is zero. The acceleration always points toward equilibrium.
Extremes and zeros line up: where xx is at a maximum or minimum, vv is zero (the object is turning around). Where xx is zero, the speed is at its maximum.
Speeding up or slowing down: moving toward equilibrium, vv and aa point the same way, so the object speeds up. Moving away from equilibrium, they point opposite ways, so it slows down.
Reading slopes: the velocity at any instant is the slope of the xx vs. tt graph, so the velocity is zero at the peaks and valleys (where the graph is flat) and largest at the zero crossings (where it’s steepest). In the same way, the acceleration is the slope of the vv vs. tt graph.

Important Properties

Amplitude doesn’t affect period at all, changing how far you pull the mass changes how far it travels, but not the frequency or period, a larger amplitude travels farther at the same frequency, and a smaller amplitude travels less far, also at the same frequency.
Why: for a spring, doubling the amplitude doubles the restoring force at every matching point in the cycle (since F=−kxF = -kx), which doubles the acceleration, which doubles the speed. The object has twice as far to go, but it moves twice as fast the whole way, so each cycle takes the same time. You can also see it in the equations: Ts=2πmkT_s = 2\pi\sqrt{\frac{m}{k}} and Tp=2πℓgT_p = 2\pi\sqrt{\frac{\ell}{g}} have no AA in them. (For a pendulum, this holds only while the angle stays small.)
On a graph, a bigger amplitude stretches the curve vertically, but the peaks and zero crossings stay at the same times:
7.3 - Representing and Analyzing SHM
The graphs’ key features, maxima, minima, and zero-crossings, help you identify where kinetic energy is maximum, where potential energy is maximum, and where the object changes direction.

Worked Example: Analyzing an SHM Function

An object’s motion follows d(t)=6cos⁡(2πt)d(t) = 6\cos(2\pi t), with dd in meters and tt in seconds. Find the maximum displacement, frequency, period, displacement at t=4t = 4 s, and the first positive time when displacement is zero.
Maximum displacement: the amplitude is the coefficient in front of cosine, A=6A = 6 m.
Frequency: comparing d(t)=6cos⁡(2πt)d(t) = 6\cos(2\pi t) to the general form d(t)=Acos⁡(2πft)d(t) = A\cos(2\pi ft), we see 2πf=2π  ⟹  f=12\pi f = 2\pi \implies f = 1 Hz.
Period: T=1f=11=1T = \frac{1}{f} = \frac{1}{1} = 1 s.
Displacement at t=4t = 4 s:
d(4)=6cos⁡(2π⋅4)=6cos⁡(8π)d(4) = 6\cos(2\pi \cdot 4) = 6\cos(8\pi)
Making sure the calculator is in radian mode, cos⁡(8π)=1\cos(8\pi) = 1, so d(4)=6(1)=6d(4) = 6(1) = 6 m. This makes sense, since the period is 1 second, at t=4t = 4 s the object has completed exactly 4 full cycles and returned right back to its starting position.
First positive time when d=0d = 0: setting 0=6cos⁡(2πt)0 = 6\cos(2\pi t), dividing by 6, 0=cos⁡(2πt)0 = \cos(2\pi t). Taking the inverse cosine, cos⁡−1(0)=π2\cos^{-1}(0) = \frac{\pi}{2}, so π2=2πt  ⟹  t=π/22π=14=0.25\frac{\pi}{2} = 2\pi t \implies t = \frac{\pi/2}{2\pi} = \frac{1}{4} = 0.25 s. Physically, starting at maximum displacement, the object reaches equilibrium after a quarter of a period.

Worked Example: Creating an SHM Equation

A mass oscillates with amplitude A=0.15A = 0.15 m and frequency f=3.0f = 3.0 Hz, starting at maximum positive displacement at t=0t=0. Write the displacement equation.
Since it starts at maximum displacement, use cosine:
x(t)=Acos⁡(2πft)=0.15cos⁡(2π⋅3.0⋅t)=0.15cos⁡(6πt)x(t) = A\cos(2\pi ft) = 0.15\cos(2\pi \cdot 3.0 \cdot t) = 0.15\cos(6\pi t)

Worked Example: Finding Maximum Velocity

A simple harmonic oscillator follows x(t)=0.20cos⁡(4πt)x(t) = 0.20\cos(4\pi t). Find the maximum velocity.
From the equation, A=0.20A = 0.20 m and ω=4π\omega = 4\pi rad/s (the coefficient of tt inside the cosine).
vmax=ωA=(4π)(0.20)=0.8π≈2.51 m/sv_{\text{max}} = \omega A = (4\pi)(0.20) = 0.8\pi \approx 2.51 \text{ m/s}

Worked Example: Phase and Negative Amplitude

An oscillator follows x(t)=−3cos⁡(πt)x(t) = -3\cos(\pi t). Find the displacement at t=0t = 0, and explain what the negative sign means.
At t=0t=0: x(0)=−3cos⁡(0)=−3(1)=−3x(0) = -3\cos(0) = -3(1) = -3 m.
The negative sign shows the object starts on the negative side of equilibrium (below or to the left, depending on orientation). Without the negative sign, it would start at +A+A, but with it, it starts at −A-A. The object still oscillates with amplitude 3 m, it just begins at the opposite extreme compared to a positive cosine function.

Worked Example: Reading SHM Graphs

A 0.50 kg cart on a horizontal spring oscillates on a frictionless track. Its position, velocity, and acceleration graphs are below, with three instants marked P, Q, and R. (a) Find the amplitude, period, and frequency. (b) Write the equation for x(t)x(t). (c) Find the maximum speed and maximum acceleration, and check them against the graphs. (d) Describe the motion at P, Q, and R. (e) Find the spring constant.
7.3 - Representing and Analyzing SHM
(a) From the top graph, the cart goes from +0.20+0.20 m to −0.20-0.20 m, so A=0.20A = 0.20 m. One full cycle (from x=0x = 0 heading in the +x+x direction, out to +A+A, back through equilibrium to −A-A, and back to x=0x = 0 heading in the +x+x direction again) takes 2.0 s, so T=2.0T = 2.0 s and f=1T=12.0 s=0.50f = \frac{1}{T} = \frac{1}{2.0\text{ s}} = 0.50 Hz.
(b) At t=0t = 0 the cart is at equilibrium and moving in the +x+x direction (the graph rises), so use sine. With xx in meters and tt in seconds:
x(t)=Asin⁡(2πft)=0.20sin⁡(2π⋅0.50 t)=0.20sin⁡(πt)x(t) = A\sin(2\pi ft) = 0.20\sin(2\pi \cdot 0.50\, t) = 0.20\sin(\pi t)
(c) Use vmax=2πfAv_{\text{max}} = 2\pi fA and amax=4π2f2Aa_{\text{max}} = 4\pi^2f^2A from the Maximum Values table:
vmax=2πfA=2π(0.50 Hz)(0.20 m)≈0.63 m/samax=4π2f2A=4π2(0.50 Hz)2(0.20 m)≈2.0 m/s2v_{\text{max}} = 2\pi fA = 2\pi(0.50\text{ Hz})(0.20\text{ m}) \approx 0.63\text{ m/s} \qquad a_{\text{max}} = 4\pi^2f^2A = 4\pi^2(0.50\text{ Hz})^2(0.20\text{ m}) \approx 2.0\text{ m/s}^2
The velocity graph peaks just above 0.6 m/s and the acceleration graph just under 2.0 m/s², so both match.
(d) At P (t=0.50t = 0.50 s), the cart is at the positive turning point, x=+0.20x = +0.20 m. It’s momentarily at rest (v=0v = 0), and the acceleration has its largest magnitude, about −2.0-2.0 m/s², pointing back toward equilibrium.
At Q (t=1.00t = 1.00 s), the cart is passing through equilibrium (x=0x = 0) in the −x-x direction at its maximum speed, v≈−0.63v \approx -0.63 m/s. The net force is zero there, so a=0a = 0.
At R (t=1.25t = 1.25 s), the cart is at about x=−0.14x = -0.14 m and still moving in the −x-x direction (v≈−0.44v \approx -0.44 m/s), but the acceleration is positive (about +1.4+1.4 m/s²). Velocity and acceleration point opposite ways, so the cart is slowing down as it heads toward the negative turning point, which it reaches at t=1.50t = 1.50 s.
(e) Solve Ts=2πmkT_s = 2\pi\sqrt{\frac{m}{k}} for kk:
k=4π2mT2=4π2(0.50 kg)(2.0 s)2≈4.9 N/mk = \frac{4\pi^2m}{T^2} = \frac{4\pi^2(0.50\text{ kg})}{(2.0\text{ s})^2} \approx 4.9\text{ N/m}
Check with Newton’s second law at P: amax=kAm=(4.9 N/m)(0.20 m)0.50 kg≈2.0a_{\text{max}} = \frac{kA}{m} = \frac{(4.9\text{ N/m})(0.20\text{ m})}{0.50\text{ kg}} \approx 2.0 m/s², the same as the graph.

Worked Example: Doubling the Amplitude

A cart on a spring is pulled 0.10 m from equilibrium and released, and it oscillates with a period of 0.80 s. It’s stopped, pulled out to 0.20 m, and released again. Find the period, maximum speed, and maximum acceleration in each case. (These are the two curves in the graph under Important Properties.)
Period: the period doesn’t depend on amplitude, so it’s 0.80 s both times, and f=10.80 s=1.25f = \frac{1}{0.80\text{ s}} = 1.25 Hz.
A=0.10 m:vmax=2π(1.25 Hz)(0.10 m)≈0.79 m/samax=4π2(1.25 Hz)2(0.10 m)≈6.2 m/s2A = 0.10\text{ m}: \quad v_{\text{max}} = 2\pi(1.25\text{ Hz})(0.10\text{ m}) \approx 0.79\text{ m/s} \qquad a_{\text{max}} = 4\pi^2(1.25\text{ Hz})^2(0.10\text{ m}) \approx 6.2\text{ m/s}^2A=0.20 m:vmax=2π(1.25 Hz)(0.20 m)≈1.6 m/samax=4π2(1.25 Hz)2(0.20 m)≈12 m/s2A = 0.20\text{ m}: \quad v_{\text{max}} = 2\pi(1.25\text{ Hz})(0.20\text{ m}) \approx 1.6\text{ m/s} \qquad a_{\text{max}} = 4\pi^2(1.25\text{ Hz})^2(0.20\text{ m}) \approx 12\text{ m/s}^2
Doubling the amplitude doubled the maximum speed and the maximum acceleration, but not the period. The cart covers twice the distance at twice the speed, so the timing stays the same.

Connecting Angular Frequency

Since ω=2πf\omega = 2\pi f, the equations can also be written more compactly as:
x(t)=Acos⁡(ωt)v(t)=−ωAsin⁡(ωt)a(t)=−ω2Acos⁡(ωt)x(t) = A\cos(\omega t) \qquad v(t) = -\omega A\sin(\omega t) \qquad a(t) = -\omega^2 A\cos(\omega t)

Common Mistakes

Using degrees instead of radians: the argument inside sine and cosine in SHM equations is always in radians, always check your calculator is in radian mode.
Thinking amplitude affects frequency: amplitude only affects how far the object travels, period and frequency depend purely on system properties (mass, spring constant, or length), doubling amplitude never doubles the period.
Confusing sine and cosine starting conditions: cosine starts at maximum displacement, sine starts at equilibrium, always check the initial condition before choosing.
Getting the phase relationships wrong: velocity is not in phase with displacement, and acceleration is not in phase with velocity, when xx is at its maximum, vv is zero, and when xx is zero, vv is at its maximum.
Forgetting the negative signs in velocity and acceleration: the velocity function is v=−ωAsin⁡(ωt)v = -\omega A\sin(\omega t) and the acceleration function is a=−ω2Acos⁡(ωt)a = -\omega^2 A\cos(\omega t), these negatives reflect the restoring nature of the motion.
Miscalculating maximum values: vmax=ωAv_{\text{max}} = \omega A, not just AA, and amax=ω2Aa_{\text{max}} = \omega^2 A, not ωA\omega A, the angular frequency factors in through the derivatives.
Misreading amplitude from a negative function: in x(t)=−5cos⁡(ωt)x(t) = -5\cos(\omega t), the amplitude is still 5 m, take the absolute value, the negative sign just indicates the starting position.
Misinterpreting inverse cosine: cos⁡−1(0)=π2\cos^{-1}(0) = \frac{\pi}{2} (90° in radians), not 0, cos⁡−1(1)=0\cos^{-1}(1) = 0, and cos⁡−1(−1)=π\cos^{-1}(-1) = \pi, know your unit circle values.
Not recognizing completed cycles: if T=2T = 2 s, then at t=10t = 10 s, the object has completed exactly 5 full cycles and returned to its starting position, a useful sanity check.
Confusing angular frequency here with rotational angular velocity: in SHM, ω=2πf\omega = 2\pi f is angular frequency, in rotational motion, ω\omega is angular velocity, same units, but different physical meanings depending on the context.

AP® is a registered trademark of the College Board, which is not affiliated with Dove's Library and was not involved in the production of, and does not endorse, this website.

Providing free, high-quality AP notes to help students succeed, earn college credit, and reach their educational goals, ensuring everyone has access to the resources they need.

© 2026 Standard Learning Group, Inc., which operates Dove's Library. All rights reserved.