US exams AP (Advanced Placement) AP Physics C: Mechanics

Oscillations: Simple Harmonic Motion, Energy and Pendulums

Learn AP Physics C oscillations with calculus: the simple harmonic motion equation, energy, initial conditions, and spring, simple and physical pendulums.

Reviewed by Independent AI model review on 2026-11-17

Watch the worked example

A Mass on a Spring: Simple Harmonic Motion and Energy. Captions are available in the player.
Oscillations: Practice Problems Solved. Captions are available in the player.

Many systems in physics vibrate: a mass on a spring, a pendulum, a plucked string, a molecule. Near a stable equilibrium most of them behave like the same simple system, a simple harmonic oscillator. This lesson shows how to get the motion from the differential equation, how energy changes during the motion, how initial conditions fix the amplitude and phase, and how to analyze simple and physical pendulums.

Key ideas

  • For a restoring force proportional to displacement, F = −kx, Newton's second law gives m d²x/dt² = −kx, or d²x/dt² = −ω²x with ω = √(k ÷ m).
  • The solution is x = A cos(ωt + φ). The amplitude A and the phase φ are fixed by the initial conditions. Equivalently, x = x₀ cos ωt + (v₀ ÷ ω) sin ωt.
  • Velocity and acceleration: v = −Aω sin(ωt + φ) and a = −ω²x. The maximum speed is Aω and the maximum acceleration is Aω².
  • Period and frequency: T = 2π ÷ ω and f = 1 ÷ T = ω ÷ 2π. For a spring, T = 2π√(m ÷ k).
  • Energy: the total energy E = ½kA² = K + U is constant, where U = ½kx² and K = ½mv². So v² = ω²(A² − x²).
  • Simple pendulum (small angles): ω = √(g ÷ L) and T = 2π√(L ÷ g). The period does not depend on the mass.
  • Physical pendulum (any rigid body pivoted at a point): ω = √(Mgd ÷ I), where d is the distance from the pivot to the center of mass and I is the moment of inertia about the pivot.
  • Gravity changes the equilibrium position of a vertical spring but not its period.

The differential equation and its solution

A restoring force that is proportional to displacement gives the equation d²x/dt² = −ω²x. Its solution is a cosine, which repeats every T = 2π/ω. Differentiating gives the velocity, which is a quarter of a period out of step: it is zero at the turning points and largest as the object passes through the center.

Position and velocity of simple harmonic motionGraphs of position and velocity against time for simple harmonic motion. The position is A cos omega t, starting at the maximum. The velocity is minus A omega sin omega t, which is zero at the turning points and largest at the center.tx = A cos(ωt)v = dx/dt = −Aω sin(ωt)TPosition and velocity of simple harmonic motion. The velocity is a quarter period out ofstep with the position: it is largest where x = 0. Not to scale.
The velocity is a quarter period out of step with the position: it is largest where x = 0.

Energy in simple harmonic motion

The potential energy of the spring is a parabola, U = ½kx². The total energy is constant, so the kinetic energy at any position is the gap between the total-energy line and the parabola. This gives the speed at any position without solving for time: v = ω√(A² − x²).

Energy in simple harmonic motionA graph of energy against position for a mass on a spring. The potential energy is a parabola and the total energy is a horizontal line at one half k A squared. The kinetic energy at any position is the gap between the line and the parabola.xenergyU = ½kx²E = ½kA²A−AKThe total energy E = K + U is constant. K is the gap between E and the parabola U.Not to scale.
The total energy is constant. The kinetic energy is the gap between E and the parabola U = ½kx².
A mass on a spring with energy barsAn animation of a block on a spring moving back and forth. Two bars show the potential energy, largest at the turning points, and the kinetic energy, largest at the center, trading off while their sum stays constant. The motion is switched off if your device is set to reduce motion.mPEKEAnimation (slowed down): a mass on a spring. The potential energy PE is largest at the turningpoints and the kinetic energy KE is largest at the center. Their sum E = ½kA² never changes.
Animation: a mass on a spring with energy bars. The potential energy is largest at the turning points and the kinetic energy is largest at the center.

Initial conditions

The amplitude and phase come from the starting position x₀ and starting velocity v₀. From x = x₀ cos ωt + (v₀ ÷ ω) sin ωt you get A = √(x₀² + (v₀ ÷ ω)²). If v₀ = 0, A = x₀.

Initial conditions fix the amplitude and phaseA graph of position against time for a mass on a spring that starts at 0.050 meters moving with a velocity of 0.60 meters per second. The amplitude is larger than the starting position because the mass is already moving.txslope = v₀ = 0.60 m/sA spring-mass system with ω = 20 rad/s starts at x₀ = 0.050 m with v₀ = 0.60 m/s.The initial conditions fix the amplitude and the phase. Not to scale.
The initial position and slope fix the amplitude and phase of the motion.

Pendulums

For a simple pendulum of length L, the restoring torque is −mgL sin θ, which is approximately −mgLθ for small angles. With I = mL², this gives ω = √(g ÷ L). For any rigid body swinging about a pivot, replace L with I/(Md): ω = √(Mgd ÷ I).

A rod pivoted at one end as a pendulumA uniform rod of mass M and length L hanging from a pivot at one end. Its center of mass is a distance d equal to L over 2 from the pivot, and its moment of inertia about the pivot is M L squared over 3.center of massd = L/2Luniform rod, mass Mpivot at one endI = ML²/3A physical pendulum swings with ω = √(Mgd ÷ I) for small angles. Not to scale.
A uniform rod pivoted at one end swings as a physical pendulum with ω = √(Mgd ÷ I).

Worked example 1: position, velocity and acceleration

A particle moves with x = 0.10 cos(4.0t), where x is in meters and t is in seconds. Find (a) the amplitude, period and maximum speed, (b) the maximum acceleration and (c) the position, velocity and acceleration at t = 0.50 s.

(a) A = 0.10 m and ω = 4.0 rad/s, so T = 2π ÷ 4.0 = 1.6 s. The maximum speed is Aω = (0.10)(4.0) = 0.40 m/s.

(b) The maximum acceleration is Aω² = (0.10)(16) = 1.6 m/s².

(c) At t = 0.50 s, the phase is 2.0 rad. x = 0.10 cos 2.0 = −0.042 m. v = −0.40 sin 2.0 = −0.36 m/s. a = −ω²x = −16(−0.042) = +0.67 m/s².

Worked example 2: a mass on a spring

A 0.50 kg mass on a horizontal frictionless spring with k = 200 N/m is pulled 0.050 m from equilibrium and released from rest. Find (a) ω, T and f, (b) the total energy and (c) the speed when x = 0.030 m.

(a) ω = √(k ÷ m) = √(200 ÷ 0.50) = 20 rad/s. T = 2π ÷ 20 = 0.31 s and f = 1 ÷ T = 3.2 Hz.

(b) E = ½kA² = ½(200)(0.050)² = 0.25 J.

(c) v = ω√(A² − x²) = 20√(0.050² − 0.030²) = 20(0.040) = 0.80 m/s.

Worked example 3: a simple and a physical pendulum

(a) Find the period of a simple pendulum of length 1.0 m. (b) A uniform rod of length 1.0 m is pivoted at one end and swings through small angles. Find its period. Use g = 9.8 m/s².

(a) T = 2π√(L ÷ g) = 2π√(1.0 ÷ 9.8) = 2.0 s.

(b) For the rod, I = ML²/3 and d = L/2, so ω = √(Mgd ÷ I) = √(Mg(L/2) ÷ (ML²/3)) = √(3g ÷ 2L) = √(14.7) = 3.83 rad/s. The period is T = 2π ÷ 3.83 = 1.6 s. The rod swings faster than a simple pendulum of the same length.

Worked example 4: initial conditions

The mass in Worked example 2 (ω = 20 rad/s) is at x₀ = 0.050 m and is moving at v₀ = +0.60 m/s at t = 0. Find the amplitude and write x(t).

x = x₀ cos ωt + (v₀ ÷ ω) sin ωt = 0.050 cos 20t + 0.030 sin 20t.

The amplitude is A = √(0.050² + 0.030²) = 0.058 m. So x(t) = 0.050 cos 20t + 0.030 sin 20t (m), which can also be written 0.058 cos(20t − 0.54).

More worked problems

These three exam-style problems are worked out step by step in the video "Oscillations: Practice Problems Solved" at the top of this page. Each solution is written out below, after the three problems. You can try new problems in "Try it yourself" afterward. Use g = 9.8 m/s².

Problem 1: a block on a spring. A 2.0 kg block on a frictionless horizontal spring with k = 50 N/m is released from rest at x = A = 0.30 m. Find (a) ω and T, (b) the maximum speed and the maximum acceleration, and (c) the speed, the kinetic energy and the potential energy at x = 0.15 m.

A block on a horizontal springA 2.0 kilogram block on a frictionless horizontal surface attached to a spring with a constant of 50 newtons per meter. The block is released from rest at an amplitude of 0.30 meters. The diagram is not to scale.2.0 kgA = 0.30 mk = 50 N/mno frictionThe block is released from rest at x = A. Find ω and T, the maximum speed andacceleration, and v, K and U at x = 0.15 m. Not to scale.
Problem 1: use v = ω√(A² − x²) and energy conservation. The diagram is not to scale.

Problem 2: a vertical spring. A 0.40 kg mass hangs at rest from a vertical spring and stretches it 0.049 m. It is pulled 0.040 m further down and released. Find (a) the spring constant, (b) the period and (c) the maximum speed.

A mass hanging on a vertical springA 0.40 kilogram mass hangs from a vertical spring and stretches it 0.049 meters at equilibrium. It is pulled down a further 0.040 meters and released. The diagram is not to scale.0.40 kgstretches 0.049 mA mass hangs at rest, stretching the spring 0.049 m. It is then pulled down0.040 m more and released. Find k, T and the maximum speed. Not to scale.
Problem 2: gravity shifts the equilibrium but does not change the period. The diagram is not to scale.

Problem 3: a hoop pendulum. A hoop of mass M and radius R = 0.50 m is hung from a pivot on its rim and swings in its own plane through small angles. Find (a) its moment of inertia about the pivot, (b) the angular frequency and period, and (c) the length of a simple pendulum with the same period.

A hoop swinging about a pivot on its rimA hoop of mass M and radius 0.50 meters hangs from a pivot on its rim and swings in its own plane. Its center of mass is one radius from the pivot, and its moment of inertia about its center is M R squared. The diagram is not to scale.pivot on the rimcenter of massd = Rhoop: M, R = 0.50 mI about the center = MR²A hoop hangs from a pivot on its rim and swings in its own plane.Find I about the pivot, ω and T. Not to scale.
Problem 3: use the parallel axis theorem for I about the pivot. The diagram is not to scale.

Solutions to the worked problems

Problem 1.

(a) ω = √(k ÷ m) = √(50 ÷ 2.0) = 5.0 rad/s. T = 2π ÷ 5.0 = 1.3 s.

(b) v_max = Aω = (0.30)(5.0) = 1.5 m/s. a_max = Aω² = (0.30)(25) = 7.5 m/s².

(c) v = ω√(A² − x²) = 5.0√(0.30² − 0.15²) = 5.0(0.26) = 1.3 m/s. K = ½(2.0)(1.3)² = 1.69 J, or about 1.7 J, and U = ½(50)(0.15)² = 0.56 J. The total is 2.25 J = ½kA². ✓

Problem 2.

(a) At equilibrium, kx = mg, so k = (0.40)(9.8) ÷ 0.049 = 80 N/m.

(b) ω = √(80 ÷ 0.40) = √200 = 14.1 rad/s, so T = 2π ÷ 14.1 = 0.44 s. Gravity does not change the period.

(c) The amplitude is 0.040 m (the distance from the new equilibrium), so v_max = Aω = (0.040)(14.1) = 0.57 m/s.

Problem 3.

(a) About the center, I = MR². The parallel axis theorem gives I = MR² + MR² = 2MR².

(b) ω = √(Mgd ÷ I) = √(MgR ÷ 2MR²) = √(g ÷ 2R) = √(9.8 ÷ 1.0) = 3.1 rad/s. T = 2π ÷ 3.13 = 2.0 s.

(c) A simple pendulum has T = 2π√(L ÷ g). The same period needs L = 2R = 1.0 m.

Try it yourself

These problems are not worked out in the videos. Use g = 9.8 m/s².

Problem A. A particle has position x = 0.20 sin(3.0t) (m). Find its maximum speed and maximum acceleration.

Problem B. A 0.40 kg mass on a spring with k = 100 N/m oscillates horizontally. Find the period.

Problem C. What length should a simple pendulum have to make a period of 3.0 s?

Check your answers. A: 0.60 m/s and 1.8 m/s². B: 0.40 s. C: 2.2 m.

Common mistakes

  • Using degrees in a calculator. In x = A cos(ωt), the argument is in radians.
  • Confusing ω with f. ω = 2πf, and ω is in rad/s.
  • Thinking the pendulum's period depends on mass. For a simple pendulum it depends only on L and g.
  • Forgetting that gravity does not change the period of a vertical spring. It only shifts the equilibrium.
  • Using the small-angle approximation for large angles. It is accurate only for small angles.

Exam approach

AP Physics C free-response questions often ask you to show that a system is in simple harmonic motion by writing Newton's second law in the form d²x/dt² = −ω²x, and then to find the period. State the restoring force or torque, make the small-angle approximation explicitly, and give units. Check the College Board course page for the current exam format and the equation sheet.

Practice questions

Choose an answer to see whether you are right and why.

1. A particle has position x = 0.10 cos(4.0t) (m). What is its maximum speed?

2. A 0.50 kg mass is attached to a spring with k = 200 N/m. What is the angular frequency of its oscillation?

3. What is the period of a simple pendulum of length 1.0 m on Earth (g = 9.8 m/s²) for small angles?

4. At which position is the speed of a mass on a horizontal spring greatest?

5. The mass on a spring is quadrupled and the spring is not changed. What happens to the period?

6. At the maximum displacement x = A of a mass on a spring, the magnitude of the acceleration is

Make your own study set

Upload your class notes, a PDF or a revision video and CampusBadge builds notes, flashcards and quizzes for you to practise with.

This lesson is a study guide, not the syllabus. Check what is examined in the official AP Physics C: Mechanics syllabus for your exam year.

All AP Physics C: Mechanics lessons

Upload Documents for Study Materials

We'll generate notes, flashcards and quizzes from your document.

Drop your document here

PDF, Word (.docx), or Text files

Processing your document...

Generating study materials

Process YouTube Video

Paste a link to a revision video.

How it works

We'll extract the transcript from the YouTube video and generate study notes, flashcards, and quizzes.

Processing YouTube video...

Extracting transcript and generating study materials

Add New Badge

Create a badge to mark an achievement.

Are you sure?