Sub topic 3
The equation of motion and its solution x = A sin(ωt + φ)
This chapter assumes you can apply Newton's second law along a line and differentiate sine and cosine. It also assumes you know that x = x(t) means position measured from the equilibrium point. The previous chapter showed that a simple harmonic motion (SHM) has a restoring force F = −kx. Here that force becomes a differential equation, and we solve it.
From force law to differential equation
Take a body of mass m with net force F = −kx along the line of motion. Newton's second law, with acceleration a = d²x/dt², gives
m d²x/dt² = −kx
Divide by m and define ω² = k/m:
d²x/dt² + ω²x = 0
This is the SHM equation. Any system whose equation reduces to this form is a simple harmonic oscillator, whatever the physical setup. The same reduction works for rotation (I d²θ/dt² = −Cθ gives ω² = C/I). Only the meaning of ω² changes.
The equation says that the acceleration is proportional to the displacement and opposite to it. The proportionality constant is ω², so ω² must be positive. If you get a plus sign, the motion is not SHM (it is exponential growth or decay instead).
Why a sine solves it
We need a function whose second derivative is the original function times −ω². Sine and cosine have this property. Try x = A sin(ωt + φ):
- dx/dt = Aω cos(ωt + φ)
- d²x/dt² = −Aω² sin(ωt + φ) = −ω²x
The equation holds for any constants A and φ. Two constants appear because the equation is second order. Two initial conditions are needed to fix them, usually the position x₀ and velocity v₀ at t = 0.
The solution has three quantities with distinct jobs:
| Quantity | Symbol | Set by | Meaning |
|---|---|---|---|
| Angular frequency | ω | The system (√(k/m) for a spring) | How fast the phase advances |
| Amplitude | A | Initial conditions (energy supplied) | Maximum displacement |
| Phase constant | φ | Initial conditions | Where in the cycle t = 0 falls |
The period is T = 2π/ω and the frequency is f = ω/2π. Neither depends on A or φ. This is the defining property of SHM: a larger swing takes the same time.
Equivalent forms of the solution
The same motion can be written as a sum:
x = a sin ωt + b cosωt
This is the same as A sin(ωt + φ) when a = A cos φ and b = A sin φ. Hence
- A = √(a² + b²)
- tan φ = b/a
This form is the quickest way to find the amplitude when a problem gives a sum of sine and cosine at the same ω. For example, x = 3 sin 2t + 4 cos 2t is an SHM with amplitude 5 and ω = 2 rad/s.
The cosine form x = A cos(ωt + φ′) describes the same family of motions with φ′ = φ − π/2. Choosing sine or cosine only changes the value of the phase constant. JEE answers are often stated in whichever form suits the starting condition.
Fixing A and φ from initial conditions
At t = 0 the solution gives x₀ = A sin φ and v₀ = Aω cos φ. Square and add after dividing the second by ω:
A = √(x₀² + (v₀/ω)²)
φ comes from sin φ = x₀/A and cos φ = v₀/(Aω). The quadrant matters, so use both signs rather than tan φ alone. In code, atan2(ω·x₀, v₀) does this.
The common starting conditions are:
| Starting condition at t = 0 | x₀, v₀ | φ (sine form) | Solution |
|---|---|---|---|
| At equilibrium, moving in +x | 0, +Aω | 0 | A sin ωt |
| At equilibrium, moving in −x | 0, −Aω | π | −A sin ωt |
| At positive extreme, at rest | +A, 0 | π/2 | A cos ωt |
| At negative extreme, at rest | −A, 0 | 3π/2 (or −π/2) | −A cos ωt |
Checking the solution numerically
The following program integrates the equation of motion step by step (velocity Verlet) without using the sine solution. It then compares the result with the formula built from A and φ.
import math
m, k = 0.5, 200.0
omega = math.sqrt(k / m) # 20 rad/s
x0, v0 = 0.04, 1.2 # initial position (m) and velocity (m/s)
A = math.hypot(x0, v0 / omega)
phi = math.atan2(omega * x0, v0) # keeps the correct quadrant
dt = 1e-5
steps = 50000 # integrate to t = 0.5 s
x, v = x0, v0
a = -omega**2 * x
for _ in range(steps):
v += 0.5 * a * dt
x += v * dt
a = -omega**2 * x
v += 0.5 * a * dt
t = steps * dt
x_exact = A * math.sin(omega * t + phi)
print(A, phi)
print(x, x_exact)
print(math.isclose(x, x_exact, abs_tol=1e-6))The integrator uses only a = −ω²x, yet it reproduces the sinusoid. The solution is therefore a consequence of the equation, not an extra assumption.
Testing whether a motion is SHM
Work through these steps for an unfamiliar system:
- Choose the equilibrium position, where the net force is zero.
- Displace the system by a small x from equilibrium and write the net force or torque in terms of x.
- Rearrange to the form x'' = −(positive constant) x.
- The constant is ω², and the period is T = 2π/ω.
If the equation comes out as x'' = −ω²(x − xeq), the oscillation is still SHM, but it is centred on xeq and not on x = 0. A vertical spring is the standard case. Gravity shifts the centre, but it does not change ω.
Common errors
- Confusing ω with f. In x = A sin(ωt + φ), ω is in rad/s. A frequency of 5 Hz means ω = 10π rad/s, not 5.
- Using degrees. The argument ωt + φ must be evaluated in radians.
- Treating A as a property of the system. ω comes from m and k. A comes from how the oscillator was started.
- Using x = A sin ωt when the motion starts at an extreme. That form fixes x₀ = 0. If the body is released from rest at x = A, then φ = π/2.
- Using tan φ without checking the quadrant. tan φ = ωx₀/v₀ gives the same value for φ and φ + π. Check the signs of x₀ and v₀.
- Mixing the time origin. Time-to-reach questions (for example, from equilibrium to A/2) are easiest with x = A sin ωt, so that sin ωt = 1/2 gives t = π/(6ω) = T/12.
Why the solution is unique
Because the equation is linear and second order, any solution is fixed completely by x₀ and v₀. Two different SHM solutions of the same system differ only in A and φ. The general solution also forms a two-dimensional family, which is why a sum a sin ωt + b cos ωt with two free constants always covers every case.
Exercise
A body of mass 0.5 kg is attached to a spring of constant 200 N/m. At t = 0 it is released from rest at x = 0.1 m. Write x(t) in the form A sin(ωt + φ). How long does it take to first reach x = 0.05 m?
Show answer
ω = √(k/m) = √(200/0.5) = 20 rad/s. Released from rest at the positive extreme, so A = 0.1 m and φ = π/2, giving x = 0.1 sin(20t + π/2) = 0.1 cos 20t. Set 0.1 cos 20t = 0.05, so cos 20t = 1/2 and 20t = π/3. Then t = π/60 ≈ 0.052 s.
Exercise
A particle moves as x = 3 sin 2t + 4 cos 2t, with x in metres and t in seconds. Find the amplitude, the period, and the maximum speed.
Show answer
A = √(3² + 4²) = 5 m. ω = 2 rad/s, so T = 2π/ω = π s ≈ 3.14 s. The maximum speed is Aω = 5 × 2 = 10 m/s.