The simple harmonic motion equation is $x(t) = A \cos(\omega t + \phi)$, which calculates the position $x$ of an oscillating object at any time $t$ based on its amplitude $A$, angular frequency $\omega$, and phase angle $\phi$. It models physical systems where a restoring force acts proportional to displacement from equilibrium, such as springs and simple pendulums. Understanding this differential expression gives you the backbone for analyzing wave mechanics, mechanical vibration, and structural resonance across classical mechanics.

What is the differential equation for simple harmonic motion?
The fundamental differential equation for simple harmonic motion is $\frac{d^2x}{dt^2} + \omega^2 x = 0$, derived directly from Newton's Second Law and Hooke's Law.
When an object moves away from its equilibrium position, a restoring force acts in the opposite direction. According to Hooke's Law, this force equals $F = -kx$, where $k$ is the spring constant and $x$ is displacement. Setting this equal to Newton's Second Law ($F = ma$) yields $ma = -kx$, or $m \frac{d^2x}{dt^2} + kx = 0$.
Dividing by mass gives the standard second-order differential form where the angular frequency squared is defined as $\omega^2 = \frac{k}{m}$.
As of August 2026, university physics curricula like those archived on Physics LibreTexts continue to emphasize this exact differential setup because its solutions form sine and cosine functions. Solving this second-order linear differential equation produces the sinusoidal position equation $x(t) = A \cos(\omega t + \phi)$.
If you are working through differential derivations for class, using an AI-powered solver like ThinkAssist allows you to snap a photo of your physics problem and receive step-by-step explanations instantly.
What do the variables in $x(t) = A \cos(\omega t + \phi)$ represent?
Every variable in $x(t) = A \cos(\omega t + \phi)$ defines a specific spatial or temporal characteristic of periodic oscillation.
To solve physics problems correctly, you must isolate what each variable measures:
- $x(t)$ (Displacement): The position of the object relative to its equilibrium state at time $t$, measured in meters ($m$).
- $A$ (Amplitude): The maximum distance the object moves from equilibrium, measured in meters ($m$).
- $\omega$ (Angular Frequency): The rate of rotation in radians per second ($rad/s$), calculated as $\omega = 2\pi f = \frac{2\pi}{T}$.
- $t$ (Time): The elapsed time in seconds ($s$).
- $\phi$ (Phase Constant): The initial shift angle in radians ($rad$) determined by where the object starts at $t = 0$.
| Position | Time |
|---|---|
| +A | start of period |
| 0 (Equilibrium) | quarter period |
| -A | half period |
| 0 (Equilibrium) | three-quarter period |
| +A | end of period (T) |
The waveform completes one full cycle over the period T.
The table below summarizes the mathematical relationship, SI units, and core definitions of simple harmonic motion variables.
| Variable | Property Name | SI Unit | Key Governing Formula | Physical Meaning |
|---|---|---|---|---|
| $x(t)$ | Displacement | Meters ($m$) | $x(t) = A \cos(\omega t + \phi)$ | Current position relative to equilibrium |
| $A$ | Amplitude | Meters ($m$) | $A = x_{max}$ | Maximum magnitude of displacement |
| $\omega$ | Angular Frequency | Radians per second ($rad/s$) | $\omega = \sqrt{\frac{k}{m}} = 2\pi f$ | Speed of oscillation in angular space |
| $T$ | Period | Seconds ($s$) | $T = \frac{2\pi}{\omega} = \frac{1}{f}$ | Time required to complete one full cycle |
| $f$ | Frequency | Hertz ($Hz$) | $f = \frac{1}{T} = \frac{\omega}{2\pi}$ | Number of full cycles completed per second |
| $\phi$ | Phase Constant | Radians ($rad$) | $\phi = \arccos\left(\frac{x(0)}{A}\right)$ | Initial phase position at time $t = 0$ |
How do velocity and acceleration derive from the position equation?
Velocity is the first time derivative of position, $v(t) = -A\omega \sin(\omega t + \phi)$, while acceleration is the second derivative, $a(t) = -A\omega^2 \cos(\omega t + \phi)$.
Taking the derivative of displacement with respect to time yields the velocity equation. Because the derivative of $\cos(u)$ is $-\sin(u) \cdot u'$, applying the chain rule multiplies the amplitude by angular frequency $\omega$. The maximum velocity occurs when the sine function equals $\pm 1$, giving $v_{max} = A\omega$ at the equilibrium point where displacement is zero.
Differentiating velocity again yields the acceleration equation $a(t) = -A\omega^2 \cos(\omega t + \phi)$. Notice that because $x(t) = A \cos(\omega t + \phi)$, you can substitute position back into the equation to get $a(t) = -\omega^2 x(t)$.
This confirms that acceleration is directly proportional to displacement but opposite in direction. Maximum acceleration occurs at maximum displacement ($x = \pm A$), where $a_{max} = A\omega^2$.
Understanding these mathematical relations helps when reviewing your physics c equation sheet or working through calculus-based mechanics assignments.

How does energy conservation work in simple harmonic motion systems?
In an ideal simple harmonic oscillator, total mechanical energy is conserved and continuously converts between kinetic energy and elastic potential energy.
The total mechanical energy $E$ remains constant at all points during motion if friction and air resistance are zero. Elastic potential energy depends on position:
$$U = \frac{1}{2}kx^2 = \frac{1}{2} k A^2 \cos^2(\omega t + \phi)$$
Kinetic energy depends on velocity:
$$K = \frac{1}{2}mv^2 = \frac{1}{2} m A^2 \omega^2 \sin^2(\omega t + \phi)$$
Because $\omega^2 = \frac{k}{m}$, substituting $m\omega^2 = k$ simplifies kinetic energy to $K = \frac{1}{2} k A^2 \sin^2(\omega t + \phi)$. Adding kinetic energy and potential energy together uses the fundamental Pythagorean identity $\sin^2(\theta) + \cos^2(\theta) = 1$:
$$E = U + K = \frac{1}{2} k A^2 \left(\cos^2(\omega t + \phi) + \sin^2(\omega t + \phi)\right) = \frac{1}{2} k A^2$$
According to historical mechanics lectures documented by HyperPhysics (Georgia State University), total energy is directly proportional to the square of the amplitude. At maximum displacement ($x = \pm A$), velocity is zero, so all energy is potential. At the equilibrium point ($x = 0$), potential energy is zero, and all energy is kinetic.
How do mass-spring systems compare to simple pendulums?
Mass-spring systems rely on stiffness and mass to set oscillation speed, whereas simple pendulums depend entirely on gravitational acceleration and length.
While both systems obey simple harmonic dynamics, their restoring mechanisms stem from different physical properties.
Mass-spring systems
For an ideal spring following Hooke's Law, angular frequency is $\omega = \sqrt{\frac{k}{m}}$.
The period $T$ for a mass-spring system is given by:
$$T = 2\pi \sqrt{\frac{m}{k}}$$
Increasing mass slows the oscillation down, increasing the period. Increasing spring stiffness $k$ speeds up the oscillation, shortening the period. Amplitude has zero effect on the period of an ideal spring.
Simple pendulums
For a simple pendulum of length $L$ in a gravitational field $g$, angular frequency is $\omega = \sqrt{\frac{g}{L}}$.
The period equation for a simple pendulum is:
$$T = 2\pi \sqrt{\frac{L}{g}}$$
As detailed in educational guides from OpenStax College Physics, this equation only holds true under the small-angle approximation where $\sin\theta \approx \theta$ (typically angles under 15 degrees or ~0.26 radians). Mass does not appear anywhere in the pendulum equation because gravity accelerates all masses equally.
When reviewing for exams, using the ThinkAssist homework solver helps you verify variable substitutions for pendulum and spring questions. It automatically detects physics topics and provides breakdown steps for complex practice prompts like those found on an ap physics 1 frq.
How do you solve for the phase angle ($\phi$) using initial conditions?
You calculate the phase angle $\phi$ by evaluating the position and velocity equations at time $t = 0$ using known initial conditions.
If an object starts at its maximum positive displacement at $t = 0$ ($x(0) = A$), substituting $t = 0$ gives $A = A \cos(\phi)$. This yields $\cos(\phi) = 1$, meaning $\phi = 0$. In this scenario, the position equation is simply $x(t) = A \cos(\omega t)$.
If the object starts at equilibrium moving in the positive direction ($x(0) = 0$ and $v(0) > 0$), setting $0 = A \cos(\phi)$ gives $\phi = -\frac{\pi}{2}$ radians (or $-\frac{\pi}{2}$ when written as a sine wave $x(t) = A \sin(\omega t)$).
When given both an initial position $x_0$ and initial velocity $v_0$ at $t = 0$:
- Write initial position: $x_0 = A \cos(\phi)$
- Write initial velocity: $v_0 = -A\omega \sin(\phi)$
- Divide $v_0$ by $x_0\omega$: $\frac{v_0}{x_0\omega} = \frac{-A\omega \sin(\phi)}{A\omega \cos(\phi)} = -\tan(\phi)$
- Isolate phase angle: $\phi = \arctan\left(-\frac{v_0}{\omega x_0}\right)$
Finding phase angle is a common trip wire for students working with vector components or magnitude physics problems.

What is the difference between simple, damped, and driven harmonic motion?
Simple harmonic motion assumes zero energy loss, whereas damped motion adds resistive drag and driven motion adds an external periodic force.
Real-world physical systems rarely oscillate forever due to friction, air resistance, and mechanical impedance.
- Simple Harmonic Motion (SHM): Frictionless ideal state. The amplitude remains constant over time because total mechanical energy is conserved indefinitely.
- Damped Harmonic Motion: Energy dissipates through resistive drag forces ($F_d = -bv$). The differential equation becomes $m\frac{d^2x}{dt^2} + b\frac{dx}{dt} + kx = 0$. Depending on damping coefficient $b$, motion can be underdamped (oscillates with decaying amplitude), critically damped (returns to equilibrium fastest without oscillating), or overdamped (returns to equilibrium slowly).
- Driven (Forced) Harmonic Motion: An external driving force $F(t) = F_0 \cos(\omega_d t)$ supplies energy to the system. When the driving frequency $\omega_d$ matches the natural frequency $\omega_0 = \sqrt{k/m}$, the system experiences resonance, resulting in dramatic spikes in oscillation amplitude.
As of 2026, engineering standards for bridge design and skyscraper stability rely on these exact damped and driven differential equations to prevent structural failure caused by wind or seismic resonance.
Frequently Asked Questions
Why is cosine used instead of sine in the simple harmonic motion equation?
Cosine is standard because $\cos(0) = 1$, which aligns naturally with starting an experiment by pulling a mass back to maximum amplitude $A$ at time $t = 0$. However, using sine $x(t) = A \sin(\omega t + \phi')$ is mathematically identical; it simply changes the phase angle constant by $\frac{\pi}{2}$ radians.
What is the relationship between frequency and angular frequency?
Angular frequency $\omega$ measures rotation speed in radians per second ($rad/s$), while frequency $f$ measures completed cycles per second in Hertz ($Hz$). They relate through the equation $\omega = 2\pi f$.
Does amplitude affect the period of simple harmonic motion?
No, amplitude does not affect the period of an ideal simple harmonic oscillator. Whether you pull a spring back 1 centimeter or 10 centimeters, the period $T$ stays the same because restoring force increases proportionally with displacement, accelerating the mass faster over larger distances.
How do you find maximum acceleration in simple harmonic motion?
Maximum acceleration occurs at the turning points ($x = \pm A$) where displacement is largest. You calculate it using the formula $a_{max} = A \omega^2$.
What happens to a pendulum's period if gravity changes?
A pendulum's period is inversely proportional to the square root of gravity ($T = 2\pi \sqrt{\frac{L}{g}}$). If gravitational acceleration decreases (such as moving from Earth to the Moon), the pendulum's period increases, meaning it swings slower.
What is the small-angle approximation for pendulums?
The small-angle approximation states that for small angles in radians ($\theta \le 15^\circ$ or ~0.26 rad), $\sin\theta \approx \theta$. This linearizes the restoring force equation, allowing a pendulum to be modeled accurately as simple harmonic motion.
How can the ThinkAssist app help me solve physics homework problems?
ThinkAssist allows you to snap a photo of any physics question or differential equation setup to get immediate step-by-step solutions. Its automatic subject detection guides you through variable identification, unit conversion, and math calculations 24/7.
