Physics I: Mechanics › Oscillations & gravitation › SHM position

x(t) = A cos(ωt + φ)Say it: “x as a function of t equals A times the cosine of omega t plus phi”

SHM position

One equation for every back-and-forth motion — amplitude, speed of oscillation, and starting point, all in a single line.

Notation on this page: A is the amplitude (max distance from equilibrium), ω the angular frequency in rad/s, φ the phase constant (where the cycle starts at t = 0).

Before this lesson: Hooke's law

Where it comes from

Imagine a peg on a turntable spinning at a steady rate, and watch its shadow on the wall beside it — the view edge-on. The peg goes around uniformly, but the shadow shuttles back and forth. This is the reference circle: simple harmonic motion is uniform circular motion seen from the side.

Before reading on: the peg moves at constant speed around the circle. Does its shadow move at constant speed along the wall? Think about the shadow near the edge vs. near the centre before you read the verdict.

No — and that unevenness is the whole story. Near the circle's edge the peg moves almost along your line of sight, so the shadow barely crawls; near the centre the peg moves sideways at full speed, so the shadow flies. The shadow's position is the projection of circular motion onto a diameter:

x = A cos θthe shadow's position = radius × cosine of the peg's angle

The peg's angle grows steadily: θ(t) = ωt + φ, where ω is how fast the turntable spins (rad/s) and φ is the peg's angle when you start the clock. Substitute, and the shadow's motion is:

x(t) = A cos(ωt + φ)Say it: “x of t equals A cosine omega t plus phi”

Every mass on a spring, every pendulum, every vibrating string is some system's “shadow” — which is why one equation covers them all.

Derivation

We derive the position equation from the reference circle, then verify it describes SHM by checking its acceleration — the step that connects this page back to Hooke's law.

θ(t)
=
ωt + φ
Step 1 — the peg's angle. Uniform circular motion: angle grows at the steady rate ω. φ is the angle at t = 0 — where the peg starts.
x
=
A cos θ
Step 2 — project onto the diameter. The shadow's position is the adjacent side of the right triangle: radius A times cos θ.
x(t)
=
A cos(ωt + φ)
Step 3 — substitute. Put the angle into the projection. That is the SHM position equation.
a(t)
=
d²x/dt² = −Aω² cos(ωt + φ) = −ω²x
Step 4 — verify it is SHM. Differentiate twice: v = −Aω sin(ωt+φ), then a = −ω²x. Acceleration is minus a constant times x — exactly the Hooke's-law pattern (F = −kx = ma). ∎

Why differentiate twice? The defining feature of SHM is not the cosine shape — it is the restoring acceleration a = −ω²x. Step 4 proves our cosine satisfies it, which is what earns the name “simple harmonic.”

How to use it

The procedure, every time:

  1. Read off A. The amplitude is the maximum |x| — half the peak-to-peak swing.
  2. Get ω from the timing. ω = 2πf = 2π/T. If you know the period T, you know ω.
  3. Fix φ from the start. x(0) = A cos φ and v(0) = −Aω sin φ. Two favourite cases: released from rest at +A → φ = 0; starting at equilibrium moving +x → φ = −π/2.
  4. Cosine or sine? Doesn't matter — sin(ωt) = cos(ωt − π/2). Pick one, let φ absorb the difference.
  5. Radians, always. ωt + φ must be in radians, or the derivatives (and everything built on them) break.

The two classic starts

released from rest at +A: φ = 0  ⇒  x = A cos ωtstarts at maximum displacement, momentarily at rest
through equilibrium moving +x: φ = −π/2  ⇒  x = A sin ωtstarts centred, at maximum speed
Common mistake: writing ω = f (forgetting the 2π). If T = 0.5 s then f = 2 Hz but ω = 4π ≈ 12.6 rad/s — mixing them up makes every later number wrong by 2π.

Worked examples

Four problems, easiest first. In each one, read every step — the why of each move is the lesson.

Example 1 — read the equation: x = 0.20 cos(4πt) (SI units)

  1. Match the pattern x = A cos(ωt + φ): A = 0.20 m, ω = 4π rad/s, φ = 0.
  2. Period and frequency. T = 2π/ω = 2π/(4π) = 0.50 s; f = 1/T = 2.0 Hz.
  3. Max speed and acceleration. vmax = Aω = 0.20 × 4π = 0.8π ≈ 2.51 m/s; amax = Aω² = 0.20 × 16π² ≈ 31.6 m/s².
  4. Sanity check. φ = 0 means it starts at +A at rest — x(0) = 0.20 cos(0) = 0.20 m ✓
Common mistake: reading ω = 4 (“the number in front of t”). The number in front of t is 4π ≈ 12.6 — π is part of the coefficient, not decoration.
Your turn — x = 0.05 cos(2πt + π/3). Find T, f, x(0), vmax.

Answer: T = 1.0 s, f = 1.0 Hz, x(0) = 0.025 m, vmax = 0.314 m/s. ω = 2π → T = 2π/2π = 1.0 s. x(0) = 0.05 cos(π/3) = 0.05 × 0.5 = 0.025 m. vmax = Aω = 0.05 × 2π ≈ 0.314 m/s.

Example 2 — phase from the start: mass released at equilibrium, moving in +x

  1. Translate the start. “At equilibrium” → x(0) = 0. “Moving +x” → v(0) > 0.
  2. Use both conditions. x(0) = A cos φ = 0 → φ = ±π/2. v(0) = −Aω sin φ > 0 → sin φ < 0 → φ = −π/2.
  3. Write it. x(t) = A cos(ωt − π/2) = A sin ωt.
  4. Check. x(0) = 0 ✓, v(0) = Aω cos(0) = Aω > 0 ✓ — starts centred at full speed, as required.
Common mistake: using x(0) = 0 alone and picking φ = +π/2 — that starts at equilibrium moving in −x (v(0) = −Aω). Position alone never fixes the phase; you need the velocity's sign too.
Your turn — mass released from rest at x = −A. Find φ.

Answer: φ = π (equivalently −π). x(0) = A cos φ = −A → cos φ = −1 → φ = π. Then x(t) = A cos(ωt + π) = −A cos ωt, and v(0) = 0 ✓.

Example 3 — position at a time: A = 0.10 m, T = 2.0 s, find x(0.25 s)

  1. Get ω. ω = 2π/T = 2π/2.0 = π rad/s.
  2. Write x(t). Released from rest at +A (the default reading): x(t) = 0.10 cos(πt).
  3. Evaluate. x(0.25) = 0.10 cos(0.25π) = 0.10 × (√2/2) ≈ 0.0707 m.
  4. Sanity check. T/8 = 0.25 s is one-eighth of a cycle; the mass has left +A and is heading in — x between 0 and A ✓
Common mistake: computing cos(0.25π) with the calculator in degree mode — cos(45°) happens to equal cos(π/4) here, but cos(0.25) ≠ cos(0.25π) in general. Radians, always.
Your turn — A = 0.12 m, T = 0.50 s, released from rest at +A. Find x(0.125 s).

Answer: 0 m. ω = 2π/0.50 = 4π rad/s; x(0.125) = 0.12 cos(4π × 0.125) = 0.12 cos(π/2) = 0. A quarter period after release, the mass is exactly at equilibrium.

Before reading on: the mass starts at x = A/2 but is heading back toward equilibrium (v < 0). Is the phase +π/3 or −π/3? Decide from the velocity's sign before reading.

Example 4 — judgment call: starts at half amplitude, heading inward

  1. Position condition. x(0) = A cos φ = A/2 → cos φ = 1/2 → φ = ±π/3.
  2. Velocity condition. v(0) = −Aω sin φ < 0 → sin φ > 0 → φ = +π/3.
  3. Write it. x(t) = A cos(ωt + π/3).
  4. Concrete check. A = 0.08 m, T = 1.0 s (ω = 2π): x(0.10) = 0.08 cos(0.2π + π/3) = 0.08 cos(96°) ≈ −0.00836 m — already crossed equilibrium and heading out the other side ✓
Common mistake: stopping at cos φ = 1/2 and guessing the sign of φ. The position gives you two candidates; only the velocity picks the right one. Always use both.
Your turn — starts at x = −A/2, moving in +x. Find φ.

Answer: φ = −2π/3 (equivalently 4π/3). cos φ = −1/2 gives φ = ±2π/3; v(0) > 0 needs sin φ < 0, so φ = −2π/3. Check: x(0) = A cos(−2π/3) = −A/2 ✓.

Memorization tips

  • Chant it: “A-cos-omega-t-plus-phi.” Three slots: how far, how fast, where it starts.
  • The 2π tax: ω = 2πf. Frequency counts cycles; ω counts radians. Never swap them.
  • Cosine starts at the top. With φ = 0 the motion begins at +A — that is why cosine is the default, not sine.
  • Phase needs two facts. x(0) gives cos φ, the direction of motion gives the sign of sin φ. One fact, two candidates; two facts, one phase.
  • The twice-differentiated check: a = −ω²x. If your x(t) doesn't satisfy it, it isn't SHM.
  • Units audit: ωt must be unitless — (rad/s)·s = rad ✓. If ωt has units, ω is wrong.

Final challenge

Five mixed questions — reading equations, phases, and the traps, all in one. Score 5/5 and SHM position is yours.

← Back to the Physics I formula sheet

How to learn a formula here

  1. Read each section in order — every section ends with a short quiz. Take it before moving on; the questions test exactly what you just read.
  2. Work the examples with the answers covered, then uncover one step at a time and compare.
  3. Finish with the final challenge — five mixed questions including the classic traps.
  4. Retake what you miss — every quiz reshuffles each attempt, and every answer explains itself.

Frequently asked questions

Should I use cosine or sine for SHM?

Either — they differ only by a phase shift: sin(ωt) = cos(ωt − π/2). Cosine is the standard because it starts at maximum displacement when t = 0 (with phase zero). The phase constant absorbs whichever you choose.

What does the phase constant do physically?

It sets where in the cycle the motion starts at t = 0. Phase 0 means starting at maximum displacement; −π/2 means starting at equilibrium moving in +x. Same oscillation, different starting snapshot.

Is angular frequency the same as frequency?

No: angular frequency ω = 2πf, measured in rad/s, while frequency f is in Hz (cycles per second). Forgetting the 2π is the most common error — ω is 2π times faster than f numerically.

Can the amplitude A be negative?

By convention A is positive — it is the maximum distance from equilibrium. A minus sign in front is just a phase shift of π: −A cos(ωt) = A cos(ωt + π).

Do I use degrees or radians for ωt + φ?

Radians, always. The derivative relationships v = −Aω sin(ωt+φ) and a = −ω²x only hold in radians — degrees would smuggle in a π/180 factor everywhere.

More from the codex