On this page
When a block on a spring or a pendulum starts moving, its future is written entirely by where it starts and how fast it is pushed. If you know the initial position and initial velocity, you can predict its position at any later time. But turning those two starting numbers into a complete simple harmonic motion (SHM) equation means finding the amplitude and the phase angle—and avoiding a common trap with the inverse tangent function.
How do you find amplitude from initial position and velocity?
The general equation for position in simple harmonic motion is x(t) = A cos(ωt + φ). To write it, you need the amplitude (A), the angular frequency (ω), and the phase angle (φ).
The angular frequency ω depends only on the system itself, such as √(k/m) for a spring. The amplitude and phase angle depend on how the motion began. At time t = 0, the position is x₀ = A cos(φ) and the velocity is v₀ = −Aω sin(φ).
By squaring the position equation and the velocity equation divided by ω, then adding them together, the sine and cosine terms vanish. According to OpenStax University Physics, this gives the amplitude as A = √(x₀² + (v₀/ω)²).
This formula makes physical sense. It is a statement of the conservation of energy. The first term under the root comes from the initial potential energy, and the second comes from the initial kinetic energy. Together, they define the maximum displacement the object will reach.
How do you find the phase angle in SHM?
The phase angle φ tells you where the object was in its cycle at t = 0. To find it, divide the initial velocity equation by the initial position equation. The amplitude A cancels out, leaving tan φ = −v₀ / (ω x₀).
This means φ = arctan(−v₀ / (ω x₀)). However, plugging this into a calculator often gives the wrong answer.
Why does the quadrant of the phase angle matter?
The inverse tangent function on a calculator only returns angles between −90° and +90° (or −π/2 and π/2 radians). But a phase angle can be anywhere in a full 360° circle. Two completely different starting states can give the same value for −v₀ / (ω x₀).
For example, if you pull a block to the right and push it left, the ratio is positive. If you push it to the left and pull it right, the ratio is also positive. The calculator gives the same angle for both, but the physical motion is on opposite sides of the equilibrium point.
To pick the right quadrant, look at the signs of your initial conditions:
x₀ is positive: The cosine of φ is positive, so φ must be in the first or fourth quadrant (the right half of the circle).
x₀ is negative: The cosine of φ is negative, so φ must be in the second or third quadrant (the left half of the circle).
−v₀ is positive: The sine of φ is positive, so φ is in the first or second quadrant (the top half of the circle).
−v₀ is negative: The sine of φ is negative, so φ is in the third or fourth quadrant (the bottom half of the circle).
A simple sketch of a phasor diagram, plotting x₀ on the horizontal axis and −v₀/ω on the vertical axis, shows you instantly which quadrant the angle belongs in. If your calculator gives an angle in the wrong quadrant, add 180° (or π radians) to find the true phase angle.
What are the shortcuts for common initial conditions?
You do not always need to use the full tangent formula. Many physics problems start the clock at a special point in the motion, which makes the phase angle instantly known.
Released from rest at the positive extreme: If you pull a mass to x₀ = A and let go without pushing, v₀ = 0. The amplitude formula gives A = √(A² + 0) = A. The phase angle formula gives tan φ = 0. Since x₀ is positive, φ = 0. The equation simplifies to x(t) = A cos(ωt).
Released from rest at the negative extreme: If you push a mass to x₀ = −A and let it go, v₀ = 0. The angle has tan φ = 0, but because x₀ is negative, φ = 180° (or π). The equation becomes x(t) = A cos(ωt + π), which is exactly the same as x(t) = −A cos(ωt).
Passing through equilibrium with positive velocity: If you start the clock the moment the mass crosses x₀ = 0 while moving right, the position is zero but v₀ is positive. The amplitude is A = √(0 + (v₀/ω)²) = v₀/ω. The tangent formula gives division by zero, which means the angle is ±90° (or ±π/2). Because −v₀ is negative, the angle is −90° (or −π/2). The equation is x(t) = A cos(ωt − π/2), which simplifies to the familiar sine wave, x(t) = A sin(ωt).
A worked example: Writing the SHM equation
Imagine a spring with an angular frequency of ω = 2 rad/s. At t = 0, the block is at x₀ = −3 cm (to the left of equilibrium) and is moving to the left with a velocity of v₀ = −8 cm/s.
Find the amplitude:
A = √((−3)² + (−8/2)²) A = √(9 + 16) = 5 cm.
Find the phase angle:
tan φ = −(−8) / (2 × −3) = 8 / −6 = −1.333. A calculator gives arctan(−1.333) ≈ −53.1° (or −0.927 rad).
Check the quadrant:
The initial position x₀ = −3 is negative. Our angle must be in the second or third quadrant, but −53.1° is in the fourth quadrant. We must add 180° (or π radians). φ = −53.1° + 180° = 126.9° (or 2.214 rad).
Write the equation:
x(t) = 5 cos(2t + 2.214).
If you are looking at other oscillatory systems, the exact same math applies, whether you are finding a simple pendulum string tension at any angle or modeling a hypothetical SHM through a tunnel across the Earth. Once you have the full equation, you can differentiate it to find the velocity and acceleration vectors at any time.
If you are stuck on problems where the signs seem to betray you, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. It will help you build a plan to find the correct quadrant, so you never get caught out by the calculator trap again.



