Unit 6: Oscillations
What makes motion “simple harmonic”?
An object oscillates when it moves back and forth about a stable equilibrium position. Many systems oscillate (a mass on a spring, a swinging pendulum, a guitar string), but not all oscillations share the same math. In AP Physics C: Mechanics, the most important model is simple harmonic motion (SHM), because it is common, solvable exactly, and shows up everywhere else in physics.
The core idea: a linear restoring influence
SHM occurs when the restoring influence (force in translation or torque in rotation) points toward equilibrium and is proportional to the displacement from equilibrium.
For a 1D mass moving along an axis, SHM is characterized by Hooke’s law:
F_x=-kx
Here k is the positive spring (force) constant; larger k means a stiffer spring. The minus sign encodes that the spring force and the displacement always point in opposite directions.
If the restoring force is not proportional to displacement (for example, strong friction or a nonlinear force such as one depending on x^2), the motion may still be periodic, but it is not SHM.
Sample Problem (Hooke’s law)
A 12 cm-long spring has a force constant k=400\,\text{N/m}. How much force is required to stretch the spring to a length of 14 cm?
Solution. The displacement is x=14-12=2\,\text{cm}=0.020\,\text{m}. The spring force is
F=-kx=-(400)(0.020)=-8\,\text{N}
That is the restoring force (toward equilibrium). To hold the spring stretched at that length, you must apply an external force of magnitude 8\,\text{N} opposite the restoring force.
Why SHM matters in mechanics
SHM is foundational because many real systems are approximately SHM for small displacements (even when the exact force law is more complicated, as with a pendulum). It also forces you to synthesize forces, energy, calculus, and graphs, which is exactly what AP Physics C tests.
Key quantities and notation
In SHM, a few parameters describe the entire motion:
- Amplitude A: maximum displacement from equilibrium.
- Period T: time for one full cycle.
- Frequency f: cycles per second (Hz).
- Angular frequency \omega: the constant that appears in the calculus.
- Phase: where you are in the cycle.
The standard relationships are
f=\frac{1}{T}
\omega=2\pi f=\frac{2\pi}{T}
A common confusion is treating \omega as “angular speed” in the circular-motion sense. The connection exists (via the reference circle model below), but in SHM \omega is set by system parameters like k and m (or g and L for a pendulum at small angles).
The “reference circle” mental model (why sinusoids appear)
If a point moves around a circle at constant angular speed \omega, its projection on a diameter varies sinusoidally. That projection obeys the same mathematics as SHM. This model is useful for remembering qualitative phase facts (velocity is quarter-cycle shifted from position; acceleration points toward equilibrium), but on AP Physics C you still need to derive the SHM differential equation from forces or torques.
Exam Focus
Typical question patterns include identifying SHM by checking whether F (or \tau) is proportional to displacement (or angle), relating T, f, and \omega, and using phase reasoning to locate where speed or acceleration is max/min. Common mistakes include measuring displacement from the wrong zero (it must be from equilibrium), losing the restoring negative sign, and mixing up f and \omega (especially forgetting the factor of 2\pi).
Deriving and solving the SHM differential equation
SHM is ultimately a calculus story: Newton’s second law produces a second-order differential equation whose solutions are sines and cosines.
From Newton’s second law to the SHM equation (spring-mass)
For a horizontal mass on a frictionless spring, Hooke’s law gives F_x=-kx, and Newton’s second law gives
\sum F_x=m\frac{d^2x}{dt^2}
Combining them:
m\frac{d^2x}{dt^2}=-kx
Rearrange:
\frac{d^2x}{dt^2}+\frac{k}{m}x=0
Define
\omega=\sqrt{\frac{k}{m}}
so the governing equation becomes
\frac{d^2x}{dt^2}+\omega^2x=0
Solving the differential equation (what the solution means)
Any function whose second derivative is proportional to the negative of itself is sinusoidal. The general solution can be written as
x(t)=A\cos(\omega t+\phi)
or equivalently
x(t)=A\sin(\omega t+\phi)
The amplitude A and phase constant \phi come from initial conditions, while \omega comes from the physical parameters of the system.
A powerful takeaway: for ideal SHM, the period does not depend on amplitude. Since \omega=2\pi/T,
T=\frac{2\pi}{\omega}
For a spring-mass oscillator,
T=2\pi\sqrt{\frac{m}{k}}
Using initial conditions to find A and \phi
Starting from
x(t)=A\cos(\omega t+\phi)
differentiate to get velocity:
v(t)=-A\omega\sin(\omega t+\phi)
At t=0:
x(0)=A\cos(\phi)
v(0)=-A\omega\sin(\phi)
A common shortcut is to square and add to eliminate \phi:
x(0)^2+\left(\frac{v(0)}{\omega}\right)^2=A^2
so
A=\sqrt{x(0)^2+\left(\frac{v(0)}{\omega}\right)^2}
Then use the sign information in x(0) and v(0) to choose the correct quadrant for \phi.
Worked example: solving for the motion
A mass m=0.50\,\text{kg} is attached to a spring with k=200\,\text{N/m}. At t=0, the mass is at x(0)=0.040\,\text{m} and moving right with v(0)=0.60\,\text{m/s}. Find A and \omega.
Compute
\omega=\sqrt{\frac{k}{m}}=\sqrt{\frac{200}{0.50}}=\sqrt{400}=20\,\text{rad/s}
Then
A=\sqrt{(0.040)^2+\left(\frac{0.60}{20}\right)^2}=\sqrt{0.0016+0.0009}=\sqrt{0.0025}=0.050\,\text{m}
So the amplitude is 5.0\,\text{cm}.
Exam Focus
Typical question patterns include deriving \frac{d^2x}{dt^2}+\omega^2x=0 from forces/torques, computing \omega and T from system parameters, and using x(0) and v(0) to find A (and sometimes \phi). Common mistakes include using \omega=k/m instead of \omega=\sqrt{k/m}, forgetting to measure displacement from equilibrium (especially in vertical springs), and choosing the wrong quadrant for \phi by ignoring signs.
Kinematics of SHM: position, velocity, acceleration, cycles, and graphs
Once you have x(t), SHM kinematics is differentiation plus physical interpretation. AP Physics C expects you to move fluently among position, velocity, acceleration, and graphs.
Cycles, period, frequency, and hertz
A cycle is one full round trip through the motion, for example from x=A to x=-A and back to x=A. The **period** T is the time for one cycle. The **frequency** f is the number of cycles per second; 1\,\text{Hz} means one cycle per second. They are inverses:
f=\frac{1}{T}
Sample Problem (period and frequency from partial motion)
A block oscillating on the end of a spring moves from its position of maximum spring stretch to maximum spring compression in 0.25\,\text{s}. Determine the period and frequency.
Solution. Going from one end to the other is half a cycle, so
T=2(0.25\,\text{s})=0.50\,\text{s}
and
f=\frac{1}{T}=\frac{1}{0.50}=2.0\,\text{Hz}
Sinusoidal description and phase
A common experimental picture is attaching a pen to an oscillating block and pulling paper under it: the trace is sinusoidal. Mathematically, the position can be written as
y(t)=A\sin(\omega t)
This particular form assumes y=0 at t=0. To allow the oscillator to start anywhere, use an initial phase:
y(t)=A\sin(\omega t+\phi_0)
The quantity \omega t+\phi_0 is called the **phase** (phase angle). At t=0,
y(0)=A\sin(\phi_0)
so a convenient way to compute the phase constant is
\phi_0=\sin^{-1}\left(\frac{y(0)}{A}\right)
with the important warning that you still must choose the correct branch (quadrant) using physical context.
Sample Problem (using phase to find position later)
A simple harmonic oscillator has amplitude A=3.0\,\text{cm} and frequency f=4.0\,\text{Hz}. At time t=0, its position is y=3.0\,\text{cm}. Where is it at time t=0.30\,\text{s}?
Solution. First,
\omega=2\pi f=2\pi(4.0)=8\pi\,\text{s}^{-1}
At t=0,
3.0=3.0\sin(\phi_0)
so \sin(\phi_0)=1 and a consistent choice is
\phi_0=\frac{\pi}{2}
Then
y(0.30)=3.0\sin\left((8\pi)(0.30)+\frac{\pi}{2}\right)\,\text{cm}
Numerically this gives
y(0.30)\approx 0.93\,\text{cm}
Instantaneous velocity and acceleration
If
y(t)=A\sin(\omega t+\phi_0)
then differentiation gives
v(t)=\frac{dy}{dt}=A\omega\cos(\omega t+\phi_0)
and
a(t)=\frac{d^2y}{dt^2}=-A\omega^2\sin(\omega t+\phi_0)
If instead you use the cosine form x(t)=A\cos(\omega t+\phi), you obtain equivalent physics with shifted phase:
v(t)=-A\omega\sin(\omega t+\phi)
a(t)=-A\omega^2\cos(\omega t+\phi)
In every form, the key physical relationship is
a(t)=-\omega^2x(t)
Phase relationships (how the motion “lines up”)
Velocity is shifted by a quarter cycle relative to position, and acceleration is exactly opposite the displacement. You can avoid memorizing by reasoning: at turning points |x|=A the object is momentarily at rest, so v=0, and at equilibrium x=0 the net force is zero, so a=0.
Maximum values and a high-utility identity
At turning points, |x|=A:
v=0
and
a_{\max}=\omega^2A
At equilibrium, x=0:
a=0
and
v_{\max}=\omega A
A very AP-friendly relationship is
v^2=\omega^2(A^2-x^2)
which gives speed at a position without solving for time.
Reading SHM graphs like a physicist
On an x vs t graph, the slope is velocity. On a v vs t graph, the slope is acceleration. A common trap is thinking “maximum position means maximum velocity”; in SHM, maximum position means zero velocity and maximum acceleration magnitude.
Worked example: speed at a particular displacement
A mass oscillates with amplitude A=0.12\,\text{m} and angular frequency \omega=5.0\,\text{rad/s}. Find the speed when x=0.05\,\text{m}.
Use
v^2=\omega^2(A^2-x^2)
v^2=(5.0)^2\left((0.12)^2-(0.05)^2\right)=25(0.0144-0.0025)=0.2975
so
v=0.545\,\text{m/s}
There are two such times per cycle (moving right and moving left). This method returns speed magnitude; direction sets the sign.
Exam Focus
Typical question patterns include extracting A, T, and \omega from graphs, inferring qualitative behavior of v(t) and a(t), computing maximum speed/acceleration, and using v^2=\omega^2(A^2-x^2). Common mistakes include confusing amplitude A with instantaneous position x, claiming acceleration is greatest at equilibrium (it is zero there in ideal SHM), and giving a negative value when asked for speed (magnitude).
Energy in SHM
Energy is the second major lens for oscillations (forces/differential equations is the first). In ideal SHM, the oscillator continuously trades kinetic and potential energy while total mechanical energy remains constant.
Spring energy and the “shuttling” picture
A stretched or compressed spring stores elastic potential energy. When released, that elastic potential energy turns into kinetic energy; as the mass passes through equilibrium, spring potential is zero and kinetic is maximum; as it reaches an endpoint, kinetic drops to zero and elastic potential is maximum. This constant back-and-forth energy transfer is what sustains the oscillation in the ideal (no dissipation) model.
For a spring,
U_s=\frac{1}{2}kx^2
and
K=\frac{1}{2}mv^2
Conservation of mechanical energy gives
E=K+U_s=\frac{1}{2}mv^2+\frac{1}{2}kx^2
At turning points, v=0 and x=A, so
E=\frac{1}{2}kA^2
This is why the maximum displacement is called the amplitude A (often written instead of x_{\max}).
Deriving the speed-displacement relationship from energy
Set energy at position x equal to energy at amplitude:
\frac{1}{2}mv^2+\frac{1}{2}kx^2=\frac{1}{2}kA^2
Solve:
v^2=\frac{k}{m}(A^2-x^2)
Using \omega^2=k/m gives
v^2=\omega^2(A^2-x^2)
Energy bar charts (conceptual tool)
A correct energy bar chart for an ideal spring oscillator shows constant total energy. At equilibrium, spring potential is zero and kinetic is maximum; at amplitude, kinetic is zero and spring potential is maximum. A common misconception is importing pendulum intuition and claiming “potential is maximum at equilibrium.” For a spring measured from equilibrium, spring potential is minimum at equilibrium.
Sample Problem (maximum speed from energy)
A block of mass m=0.050\,\text{kg} oscillates on a spring with k=500\,\text{N/m} and amplitude A=4.0\,\text{cm}. Calculate the maximum speed.
Solution. At amplitude, energy is all spring potential:
E=\frac{1}{2}kA^2
At equilibrium, energy is all kinetic:
E=\frac{1}{2}mv_{\max}^2
Set equal:
\frac{1}{2}kA^2=\frac{1}{2}mv_{\max}^2
so
v_{\max}=A\sqrt{\frac{k}{m}}
Numerically,
v_{\max}=0.040\sqrt{\frac{500}{0.050}}=0.040\sqrt{10000}=4.0\,\text{m/s}
Worked example: amplitude from launch speed
A block of mass m=0.80\,\text{kg} attached to a horizontal spring k=50\,\text{N/m} passes through equilibrium with speed v=1.5\,\text{m/s}. Find the amplitude.
At equilibrium, U_s=0, so E=\frac{1}{2}mv^2. At amplitude, K=0, so E=\frac{1}{2}kA^2. Set equal:
\frac{1}{2}mv^2=\frac{1}{2}kA^2
so
A=v\sqrt{\frac{m}{k}}=1.5\sqrt{\frac{0.80}{50}}\approx 0.189\,\text{m}
Thus A\approx 0.19\,\text{m}.
Exam Focus
Typical question patterns include using energy to find speed at a displacement, finding amplitude from a given speed, comparing how energy scales with amplitude (for springs, E\propto A^2), and interpreting energy at equilibrium vs endpoints. Common mistakes include using gravitational potential energy in a horizontal spring where height does not change, using x measured from the wrong reference (it must be from equilibrium), and treating amplitude as proportional to energy rather than to the square root of energy.
Mass–spring systems (horizontal, vertical, and equivalent spring constants)
Springs are the cleanest physical realization of SHM because Hooke’s law is already linear. You are expected to handle horizontal and vertical arrangements and to model combinations of springs via an effective spring constant.
Horizontal spring-mass oscillator
For a mass on a frictionless horizontal spring,
\omega=\sqrt{\frac{k}{m}}
T=2\pi\sqrt{\frac{m}{k}}
Stiffer springs (larger k) oscillate faster (smaller T), while larger mass oscillates slower (larger T).
Vertical spring: gravity shifts equilibrium, not the frequency
Vertical springs are a classic place where defining your coordinate correctly matters.
A mass m hangs from a vertical spring (constant k) and comes to rest after stretching the spring a distance d. At equilibrium, the upward spring force balances the weight:
kd=mg
so
d=\frac{mg}{k}
Now displace the mass downward by an amount y measured **from equilibrium**. The spring is stretched by a total amount d+y, so the spring force magnitude is k(d+y) upward, while weight is mg downward. Using the equilibrium relation kd=mg, the net force becomes proportional to y, meaning the motion about equilibrium has the same form as horizontal SHM.
In the coordinate-from-equilibrium approach used throughout AP Physics C, the result is
\omega=\sqrt{\frac{k}{m}}
and the frequency is
f=\frac{\omega}{2\pi}=\frac{1}{2\pi}\sqrt{\frac{k}{m}}
The key idea is that gravity changes the equilibrium position but cancels out of the small-oscillation dynamics when displacement is measured from equilibrium.
Sample Problem (vertical spring: frequency and stretch range)
A block of mass m=1.5\,\text{kg} is attached to a vertical spring with k=300\,\text{N/m}. After the block comes to rest, it is pulled down 2.0\,\text{cm} and released.
(a) What is the frequency of the resulting oscillations?
(b) What are the minimum and maximum amounts of stretch of the spring during the oscillations?
Solution.
(a) The frequency is
f=\frac{1}{2\pi}\sqrt{\frac{k}{m}}=\frac{1}{2\pi}\sqrt{\frac{300}{1.5}}=\frac{1}{2\pi}\sqrt{200}\approx 2.25\,\text{Hz}
(b) The equilibrium stretch is
d=\frac{mg}{k}=\frac{(1.5)(9.8)}{300}=0.049\,\text{m}\approx 4.9\,\text{cm}
With amplitude A=2.0\,\text{cm} about equilibrium, the maximum stretch occurs at the lowest point:
d_{\max}=d+A\approx 4.9\,\text{cm}+2.0\,\text{cm}=6.9\,\text{cm}
and the minimum stretch occurs at the highest point:
d_{\min}=d-A\approx 4.9\,\text{cm}-2.0\,\text{cm}=2.9\,\text{cm}
(Using a rounded equilibrium stretch of 5\,\text{cm} gives the common textbook values of 7\,\text{cm} and 3\,\text{cm}.)
Springs in parallel and series (effective spring constant)
If multiple ideal springs act along the same coordinate, you can replace them with a single equivalent spring constant k_{eq}.
Parallel springs. The displacements are the same and forces add:
k_{eq}=k_1+k_2
Series springs. The force is the same through each and stretches add:
\frac{1}{k_{eq}}=\frac{1}{k_1}+\frac{1}{k_2}
Adding springs in series makes the system less stiff.
Worked example: period with two springs in parallel
A mass m is attached to two springs in parallel with constants k_1 and k_2. The equivalent spring constant is k_{eq}=k_1+k_2, so
T=2\pi\sqrt{\frac{m}{k_{eq}}}=2\pi\sqrt{\frac{m}{k_1+k_2}}
Exam Focus
Typical question patterns include finding equilibrium stretch first in vertical spring problems, computing equivalent spring constants for series/parallel combinations, and then using k or k_{eq} to find \omega, T, or energy relationships. Common mistakes include measuring displacement from the spring’s natural length instead of equilibrium in vertical systems, mixing up the series vs parallel formulas, and forgetting to replace k with k_{eq} before computing \omega.
Pendulums and the small-angle approximation
Pendulums share many features with spring oscillators, but the restoring influence is not exactly linear for all angles. For small oscillations, however, the motion becomes approximately SHM.
Simple pendulum model and restoring influence
A simple pendulum is a point mass m on a massless string or rod of length L, swinging in a vertical plane about a frictionless pivot. The displacement is measured by the angular displacement \theta from the vertical.
The tangential component of gravity provides the restoring force:
F_t=-mg\sin(\theta)
So at the endpoints of the motion (where \theta=\pm\theta_{\max}), the restoring force and tangential acceleration have their greatest magnitudes, the speed is zero, and potential energy is maximized. As the bob passes through equilibrium, displacement is zero and speed (and kinetic energy) are maximized.
The exact rotational equation of motion
The torque about the pivot is
\tau=-mgL\sin(\theta)
For a point mass at distance L,
I=mL^2
Rotational dynamics gives
\sum\tau=I\alpha
with
\alpha=\frac{d^2\theta}{dt^2}
Thus,
-mgL\sin(\theta)=mL^2\frac{d^2\theta}{dt^2}
which simplifies to
\frac{d^2\theta}{dt^2}+\frac{g}{L}\sin(\theta)=0
Because of the \sin(\theta) term, this is not exactly SHM.
Small-angle approximation (how SHM emerges)
For small angles in radians,
\sin(\theta)\approx\theta
Then the equation becomes
\frac{d^2\theta}{dt^2}+\frac{g}{L}\theta=0
So the pendulum behaves like SHM with
\omega=\sqrt{\frac{g}{L}}
and
T=2\pi\sqrt{\frac{L}{g}}
Equivalently, the frequency is
f=\frac{1}{2\pi}\sqrt{\frac{g}{L}}
In the small-angle regime, the period does not depend on mass and is approximately independent of amplitude.
Energy view of the pendulum (useful for speeds)
Even if you use small-angle SHM for the period, conservation of energy is often best for speeds.
If the bob rises a vertical height h above its lowest point, then
mgh=\frac{1}{2}mv^2
so
v=\sqrt{2gh}
Geometry gives the exact height-angle relationship:
h=L(1-\cos(\theta))
Worked example: period and maximum speed
A simple pendulum has length L=1.20\,\text{m} and is released from rest at angle \theta_0=0.20\,\text{rad}.
1) Period (small-angle SHM):
T=2\pi\sqrt{\frac{L}{g}}=2\pi\sqrt{\frac{1.20}{9.8}}\approx 2.20\,\text{s}
2) Maximum speed (at bottom) from energy:
h=L(1-\cos(\theta_0))=1.20(1-\cos(0.20))\approx 0.024\,\text{m}
v_{\max}=\sqrt{2gh}=\sqrt{2(9.8)(0.024)}\approx 0.686\,\text{m/s}
This is a common modeling mix: dynamics for period, energy for speed.
Exam Focus
Typical question patterns include deriving the small-angle equation and identifying \omega and T, using energy to compute speed at the bottom given a release angle or height, and comparing periods for different lengths. Common mistakes include using degrees in the small-angle approximation (must be radians), claiming period depends on mass (it does not in the ideal model), and using \sin(\theta)\approx\theta for clearly non-small angles without being told to approximate.
Physical (compound) pendulums
A physical pendulum is any rigid body that swings about a pivot under gravity. The mass distribution matters, so you must use rotational inertia about the pivot.
Deriving the small-oscillation equation
Let d be the distance from the pivot to the center of mass and I_p be the moment of inertia about the pivot. The restoring torque is
\tau=-mgd\sin(\theta)
Rotational dynamics gives
-mgd\sin(\theta)=I_p\frac{d^2\theta}{dt^2}
or
\frac{d^2\theta}{dt^2}+\frac{mgd}{I_p}\sin(\theta)=0
For small angles, \sin(\theta)\approx\theta, so
\frac{d^2\theta}{dt^2}+\frac{mgd}{I_p}\theta=0
Thus
\omega=\sqrt{\frac{mgd}{I_p}}
and
T=2\pi\sqrt{\frac{I_p}{mgd}}
Finding I_p (parallel-axis theorem)
If you are given I_{cm}, use the parallel-axis theorem:
I_p=I_{cm}+md^2
A frequent mistake is to use I_{cm} even though the object rotates about the pivot.
Worked example: uniform rod pivoted at one end
A uniform rod of length L and mass m is pivoted about one end and oscillates with small amplitude.
For a rod about its center:
I_{cm}=\frac{1}{12}mL^2
The center of mass is at
d=\frac{L}{2}
So
I_p=I_{cm}+md^2=\frac{1}{12}mL^2+m\left(\frac{L}{2}\right)^2=\frac{1}{3}mL^2
Then
T=2\pi\sqrt{\frac{I_p}{mgd}}=2\pi\sqrt{\frac{\frac{1}{3}mL^2}{mg\frac{L}{2}}}=2\pi\sqrt{\frac{2L}{3g}}
Exam Focus
Typical question patterns include deriving \omega or T for a rigid body using \tau=I\alpha, computing I_p with the parallel-axis theorem, and comparing periods for different pivot points (which changes both I_p and d). Common mistakes include using I_{cm} instead of I_p, forgetting the small-angle approximation step, and using the wrong center-of-mass distance (for a rod pivoted at an end, d=L/2, not L).
Modeling oscillations effectively (how to choose the right approach on AP problems)
Oscillation questions often look different on the surface, but most reduce to the same modeling decisions. Success comes from recognizing “stable equilibrium plus a linear restoring influence” and then choosing the most efficient method.
Step 1: Identify the coordinate and the equilibrium
Define displacement from equilibrium.
- For springs: set x=0 at equilibrium (not necessarily at natural length, especially in vertical setups).
- For simple pendulums: set \theta=0 at the bottom.
- For physical pendulums: set \theta=0 at the stable equilibrium orientation.
Skipping this step causes sign errors and unnecessary constants (like uncanceled mg) to pollute your equations.
Step 2: Decide whether you need forces/torques or energy
Use forces/torques to get \omega, T, or the equation of motion (these come from the differential equation). Use **energy** to get speed at a position, amplitude from speed, or energy comparisons without solving for time. Hybrid solutions (dynamics for \omega, energy for v) are very common.
Step 3: Check conditions for SHM (especially pendulums)
For pendulums, SHM requires the small-angle approximation. If a problem says “small oscillations” or gives a small angle in radians (like 0.10\,\text{rad}), you are meant to linearize. If the angle is large and no approximation is stated, be cautious: the motion is not exactly SHM and the period is not exactly 2\pi\sqrt{L/g}.
Step 4: Interpret parameters physically (sanity checks)
For conceptual comparisons:
- Spring-mass: T increases with \sqrt{m} and decreases with \sqrt{k}.
- Simple pendulum: T increases with \sqrt{L} and decreases with \sqrt{g}.
- Physical pendulum: T increases with \sqrt{I_p} and decreases with \sqrt{d}.
Worked example: choosing equilibrium correctly (vertical spring)
A mass hangs from a vertical spring and is pulled down an additional distance \Delta and released. A common incorrect approach is to write an SHM equation in the stretch-from-natural-length variable and then wonder why constants appear.
The clean approach is:
1) Find equilibrium stretch:
y_{eq}=\frac{mg}{k}
2) Define displacement from equilibrium:
x=y-y_{eq}
3) The net force becomes purely restoring:
F=-kx
If your equation of motion contains a constant term, that is a strong warning that your origin is not at equilibrium.
Exam Focus
Typical question patterns include multi-part free-response problems that ask for a derivation of \omega and then an energy-based speed, questions that hinge on defining displacement from equilibrium correctly (vertical springs and physical pendulums), and parameter-change conceptual comparisons of periods. Common mistakes include treating any back-and-forth motion as SHM without checking proportionality, using SHM formulas with displacement measured from the wrong reference point, and applying small-angle approximations without ensuring angles are in radians or that the approximation is justified.