A spring and an electric circuit seem like different problems. But displacement in one and charge in the other obey the same kind of second-order equation. The characteristic-root and particular-solution methods let us predict whether they oscillate, settle down, or keep responding to an outside input.
Building the mass–spring model
Hang a mass m>0 from a vertical spring. Let l be the spring's natural length and L its extra stretch once the mass is hanging at rest. Measure the moving mass's displacement y(t) from that equilibrium position, with downward positive.
These are three different lengths: the natural length is l, the equilibrium length is l+L, and the moving spring's length is l+L+y. The total stretch relative to the natural length is therefore L+y, not just y.
Measure displacement from the resting mass, not from the spring’s natural end. The spring force depends on the total stretch L+y.
At rest, the upward spring force balances the weight. With gravitational acceleration g and spring constant k>0, Hooke's law gives
mg−kL=0,k=Lmg.
That lets us find the stiffness from a measured static stretch. In SI units, m is in kilograms, L in meters, and k in newtons per meter.
Forces during motion
Once the mass moves, include all four forces with the same sign convention:
Force
Signed value
What determines its direction?
Weight
mg
Always downward
Spring
−k(L+y)
Opposes stretch or compression relative to natural length
Viscous damping
−γy′
Opposes velocity
Applied force
F(t)
Positive downward, negative upward
The damping coefficient γ≥0, read “gamma,” has units Ns/m. The value γ=0 represents the undamped idealization. Notice that y<0 does not necessarily mean the spring is compressed: it is still stretched if L+y>0.
Newton's second law says mass times acceleration equals net force:
my′′=mg−k(L+y)−γy′+F(t)=(mg−kL)−ky−γy′+F(t).
The static balance makes mg−kL=0. Rearranging gives
my′′+γy′+ky=F(t).
Gravity has not stopped acting. Measuring displacement from equilibrium has already accounted for its constant contribution.
To determine a motion, specify initial displacement and velocity:
y(0)=y0,y′(0)=v0.
For example, pulling the mass downward gives y0>0, an upward initial velocity gives v0<0, and “released from rest” means v0=0. With constant m>0, k>0, γ≥0 and continuous F on an interval containing 0, the linear existence-and-uniqueness theorem gives exactly one solution on that interval.
This is a model, not an exact description of every spring. It neglects the spring's mass and assumes a linear force–stretch relation and velocity-proportional drag. Those approximations are useful within the relevant small-deformation and low-speed regimes.
Example: turning measurements into an IVP
A 2kg mass stretches a spring by 4.9cm. A dashpot exerts 8N of resistance at a speed of 0.5m/s. The mass is pulled 5cm below equilibrium and released, with no external forcing. Use g=9.8m/s2.
Convert the lengths to meters before computing:
k=0.0492(9.8)=400N/m,γ=0.58=16Ns/m.
The dashpot's calibration speed is not the initial velocity. The mass is released from rest, so the IVP is
2y′′+16y′+400y=0,y(0)=0.05,y′(0)=0.
Dividing by the mass gives the equivalent normalized equation
y′′+8y′+200y=0.
The physical damping coefficient is still γ=16; 8=γ/m is the normalized coefficient. We will solve this IVP after distinguishing the damping cases.
Free motion without damping
Free means F(t)=0: no applied forcing beyond the forces already built into the model. Undamped means γ=0. Together these give
my′′+ky=0,mr2+k=0.
The characteristic roots are r=±ik/m. Define the natural angular frequency
ω0=mk.
The solution is simple harmonic motion:
y(t)=C1cos(ω0t)+C2sin(ω0t).
For a nonzero motion, the amplitude is C12+C22 and the period is
T=ω02π=2πkm.
Angular frequency is in radians per second; frequency in cycles per second is 1/T=ω0/(2π). A heavier mass oscillates more slowly, while a stiffer spring oscillates faster. Initial conditions set amplitude and phase, not the natural frequency.
Example: an upward initial velocity
Let m=0.5kg and k=8N/m. Start 0.1m below equilibrium, moving upward at 0.4m/s. Then
21y′′+8y=0,y(0)=0.1,y′(0)=−0.4.
Here ω0=4rad/s. Write y=C1cos4t+C2sin4t. The initial conditions give
C1=0.1,4C2=−0.4,
so
y(t)=0.1cos4t−0.1sin4tm.
The period is π/2s≈1.57s, and the amplitude is 0.12m. It is larger than the initial displacement because the mass also starts with kinetic energy.
Energy and damping
For displacement measured from equilibrium, the mechanical energy, up to an irrelevant constant, is
E(t)=kinetic21m(y′)2+potential21ky2.
To see how it changes, multiply the equation of motion by velocity y′:
my′′y′+kyy′=−γ(y′)2+F(t)y′.
The two terms on the left are derivatives of the two energy terms. Therefore
E′=−γ(y′)2+F(t)y′.
This gives a useful check on any solution:
With no damping or forcing, E′=0. Kinetic and potential energy exchange, but their sum stays constant.
With damping and no forcing, E′=−γ(y′)2≤0. Energy is nonincreasing; its derivative is zero at an instant when the velocity is zero.
The applied force contributes power F(t)y′. It can add or remove energy, depending on whether force and velocity have the same sign.
For the preceding example,
E(0)=21(0.5)(−0.4)2+21(8)(0.1)2=0.08J.
Undamped motion exchanges kinetic and potential energy while the total stays constant.
y(t)
No autoplay. Use Play or the keyboard-accessible slider to inspect the motion. Playback is slowed or accelerated for inspection.
The bars show the selected instant, in fractions of the initial stored energy.
The three damping regimes
For free motion with γ>0, the characteristic equation and discriminant are
mr2+γr+k=0,Δ=γ2−4mk.
The roots are
r=2m−γ±Δ.
Their form tells us whether the mass swings back and forth.
Overdamped: Δ>0. There are two distinct real roots r1,r2, and
y=C1er1t+C2er2t.
Both roots are negative because γ2−4mk<γ. The motion decays without a sinusoidal oscillation.
Underdamped: Δ<0. Write the roots as λ±iμ, where
λ=−2mγ,μ=2m4mk−γ2=mk−4m2γ2.
Then
y=e−γt/(2m)(C1cosμt+C2sinμt).
The sinusoidal factor produces oscillations; the exponential shrinks their amplitude. The angular frequency μ is smaller than ω0. The whole motion is not periodic, because its amplitude changes.
Critically damped: Δ=0. The repeated root gives
y=(C1+C2t)e−γt/(2m).
The extra factor t does not prevent decay: the negative exponential wins as t→∞.
All three positively damped free motions tend to equilibrium for every initial displacement and velocity. The threshold separating oscillatory from nonoscillatory motion is
γc=2mk.
For the same mass, stiffness, and release from rest, critical damping gives a faster nonoscillatory return than overdamping. This is useful in shock absorbers, door closers, and measuring needles. It is not a claim that every choice of initial velocity gives monotone motion: even real-root solutions can cross equilibrium.
The same release from rest with damping 0.4, 2, and 5: oscillatory decay, critical return, and slower overdamped return.
γ=0.4γ=2γ=5
No autoplay. Use Play or the keyboard-accessible slider to inspect the motion. Playback is slowed or accelerated for inspection.
Line styles distinguish comparison curves as well as color. The complete curves remain visible while the cursor moves.
Solving the calibrated spring example
Our earlier equation was y′′+8y′+200y=0. Its discriminant is 82−4(200)=−736, so its roots are
r=−4±i184.
With μ=184, write y=e−4t(C1cosμt+C2sinμt). At t=0,
C1=0.05,−4C1+μC2=0.
Thus
y(t)=e−4t(0.05cos(184t)+1840.2sin(184t)).
The sine coefficient is approximately 0.0147, but the exact fraction satisfies the initial velocity exactly. The amplitude envelope shrinks by a factor e−4 each second. This does not mean y(1)=e−4y(0): the oscillatory factor also changes.
Small damping still matters over long times
Consider
y′′+0.125y′+y=0,y(0)=2,y′(0)=0.
The roots are −1/16±i255/16. Set μ=255/16. The initial conditions give C1=2 and −C1/16+μC2=0, so
y(t)=e−t/16(2cos16255t+2552sin16255t).
Without damping, the same initial conditions give 2cost. The damped frequency is about 0.998, nearly 1, so the curves initially rise and fall at almost the same rate. Their long-term behavior is completely different: only the damped solution tends to zero.
The sine–cosine combination has amplitude 32/255, so an exact bound is
∣y(t)∣≤25532e−t/16.
For instance, this envelope guarantees ∣y(t)∣<0.1 once
t>16ln(255320)≈47.96.
The actual solution enters that band permanently a little earlier, at about 47.51. The envelope gives a safe bound without locating the last crossing.
Small damping compared with no damping, exact exponential bounds, and the inward position–velocity spiral.
y(t)2cost−25532e−t/1625532e−t/16
No autoplay. Use Play or the keyboard-accessible slider to inspect the motion. Playback is slowed or accelerated for inspection.
Line styles distinguish comparison curves as well as color. The complete curves remain visible while the cursor moves.
Plotting the pair (y(t),y′(t)) instead of displacement against time gives the inward spiral shown below the time plot. Each point records both position and velocity at the same instant; both tend to zero. That is all we need from this picture here.
Within the underdamped regime, increasing γ at fixed m,k makes the envelope decay faster but lowers the oscillation frequency. Faster decay and faster oscillation are different things.
Periodic forcing and steady-state motion
Now apply a periodic force
F(t)=F0cos(ωt),
where F0>0 is the force amplitude and ω>0 is the forcing angular frequency. This frequency comes from the input; it need not equal the system's natural frequency.
For
my′′+γy′+ky=F0cos(ωt),
try a particular solution yp=Acos(ωt)+Bsin(ωt). If γ>0, the homogeneous modes decay, so a pure sine or cosine cannot overlap them. The trial works without an extra factor of t.
Example: separating the transient from the forced response
Solve
y′′+y′+1.25y=3cost,y(0)=2,y′(0)=3.
Substitute yp=Acost+Bsint and match coefficients:
{41A+B=3,−A+41B=0.
The second equation gives B=4A, so A=12/17 and B=48/17. Therefore
yp=1712cost+1748sint.
Its amplitude is (12/17)2+(48/17)2=12/17. The characteristic roots of the homogeneous equation are −1/2±i, giving
yc=e−t/2(C1cost+C2sint).
Apply the initial conditions to the full sumy=yc+yp:
The transient adjusts the solution to the starting conditions, then decays. The steady-state response keeps oscillating at the forcing frequency. “Steady” does not mean constant, and the sinusoid still crosses zero. The convergence statement is y(t)−yp(t)→0, not that y(t) tends to a fixed number.
Total motion approaches the periodic steady state as the transient disappears.
y(t)yp(t)yc(t)
No autoplay. Use Play or the keyboard-accessible slider to inspect the motion. Playback is slowed or accelerated for inspection.
Line styles distinguish comparison curves as well as color. The complete curves remain visible while the cursor moves.
Large response with light damping
Compare the previous model with
y′′+0.125y′+y=3cost,y(0)=2,y′(0)=0.
The forcing is unchanged, but damping is smaller and the stiffness coefficient is now 1 rather than 1.25. The same trial gives
0.125B=3,−0.125A=0,
so yp=24sint. Its displacement amplitude is 24: eight times the static displacement F0/k=3. Comparing with a static displacement keeps the units consistent; force and displacement themselves are not the same kind of quantity.
The transient still decays as e−t/16, so the response remains bounded and approaches 24sint. For the plotted IVP, the full solution is
The coefficient follows from y′(0)=−2/16+μC2+24=0. Here the forcing frequency equals the undamped natural frequency. The large response is often described as near resonance, but positive damping prevents the unbounded growth of the next example. The exact damped amplitude-peak frequency need not equal ω0.
Light damping allows a large bounded response. Force divided by stiffness is plotted for a dimensionally consistent comparison.
y(t)yp(t)F(t)/k=3cost
No autoplay. Use Play or the keyboard-accessible slider to inspect the motion. Playback is slowed or accelerated for inspection.
Line styles distinguish comparison curves as well as color. The complete curves remain visible while the cursor moves.
Undamped resonance
Set γ=0 and force the system at its natural frequency, ω=ω0=k/m. Then
my′′+ky=F0cos(ω0t).
Both cos(ω0t) and sin(ω0t) are homogeneous solutions. The ordinary sinusoidal trial produces zero, not the forcing. This does not make undetermined coefficients unusable: multiply the trial by t:
yp=Atcos(ω0t)+Btsin(ω0t).
Using k=mω02, substitution simplifies to
myp′′+kyp=2mω0(Bcos(ω0t)−Asin(ω0t)).
Matching the input gives A=0 and B=F0/(2mω0). Thus
The homogeneous terms stay bounded, but the forced term has an envelope growing linearly in time. No initial conditions can cancel that long-term growth.
For example,
y′′+y=21cost,y(0)=0,y′(0)=0
has solution y=tsint/4, bounded at each time by the lines y=±t/4.
Undamped resonant motion grows between the two straight envelope lines.
y(t)−t/4t/4
No autoplay. Use Play or the keyboard-accessible slider to inspect the motion. Playback is slowed or accelerated for inspection.
Line styles distinguish comparison curves as well as color. The complete curves remain visible while the cursor moves.
The displacement is not monotonically increasing: it keeps crossing equilibrium while its excursions grow. Resonance builds up energy over time; the instantaneous input power need not be positive at every moment.
This explains why a periodic input near a natural frequency can matter in a vibrating glass, marching on a bridge, or earthquake-resistant design. Resonance is also useful in musical instruments and radio tuning. Real systems have damping and limits to the linear model, so an ideal unbounded solution is not a prediction of literally infinite physical motion.
The Tacoma Narrows Bridge collapse is a different warning: its wind-driven oscillation involved aeroelastic flutter, not simply a prescribed periodic force matching a linear oscillator's natural frequency.
Series RLC circuits
A series circuit contains a resistor, an inductor, and a capacitor in one loop. Let Q(t) be the signed charge on the chosen capacitor plate and choose the current direction so that
I(t)=Q′(t).
The symbols and units are:
Quantity
Symbol
SI unit
Charge
Q
coulomb, C
Current
I
ampere, A
Applied voltage
E(t)
volt, V
Resistance
R≥0
ohm, Ω
Inductance
L>0
henry, H
Capacitance
C>0
farad, F
Here L means inductance, not the spring's static extension. Likewise, capacitance C is different from the unit symbol C for coulombs.
One loop carries the same current through each element. The arrow fixes a reference direction; a negative current flows the other way.
From voltage drops to an ODE
The three components have voltage drops
VR=RI,VC=CQ,VL=LI′.
The resistor dissipates energy as heat. The capacitor stores energy in an electric field between its plates. The inductor stores energy in a magnetic field and opposes changes in current.
Kirchhoff's voltage law says the drops around the loop add to the applied voltage:
LI′+RI+CQ=E(t).
Use I=Q′ to obtain the charge equation:
LQ′′+RQ′+C1Q=E(t),Q(t0)=Q0,Q′(t0)=I0.
Every term has units of volts. For continuous E and constant L,C>0, R≥0, initial charge and current determine the solution uniquely.
If we prefer an equation for current and E is continuously differentiable, differentiate once:
LI′′+RI′+C1I=E′(t).
The initial derivative of current is not an extra independent choice. The original charge equation requires
I′(t0)=LE(t0)−RI0−Q0/C.
Keeping this condition prevents the differentiated equation from introducing a solution inconsistent with the original circuit.
For a constant battery E(t)=E0 and R>0, the current eventually tends to zero and Q(t)→CE0. The charge settles at the value whose capacitor voltage balances the battery. Without resistance, the transient need not decay.
The mechanical–electrical correspondence
Compare the charge equation with my′′+γy′+ky=F(t):
Mass–spring system
Series circuit
Displacement y
Charge Q
Velocity y′
Current I=Q′
Mass m
Inductance L
Damping γ
Resistance R
Stiffness k
Inverse capacitance 1/C
Applied force F
Applied voltage E
Kinetic energy m(y′)2/2
Magnetic energy LI2/2
Potential energy ky2/2
Electric energy Q2/(2C)
Dissipated power γ(y′)2
Joule-heating power RI2
These are corresponding mathematical roles, not equal physical quantities. The inductor resists a change in current, much as mass resists a change in velocity; the capacitor supplies the restoring term.
Natural frequency, damping, and energy
For the unforced circuit, the characteristic equation is
Lr2+Rr+C1=0.
The natural angular frequency, discriminant, and critical resistance follow directly:
ω0=LC1,Δ=R2−C4L,Rc=2CL.
R=0: undamped natural oscillation.
0<R<Rc: underdamped oscillation, often called ringing.
R=Rc: critical damping, with a repeated real root.
R>Rc: overdamping, with two negative real roots.
These classifications describe the natural response or transient, not every possible externally driven motion. For underdamping, the roots are
r=−2LR±iμ,μ=LC1−4L2R2.
The stored energy is
U=21LI2+2CQ2.
Multiply the voltage equation by I=Q′ to find its derivative:
U′=−RI2+E(t)I.
The source supplies power EI, while RI2 is the nonnegative power converted to heat. No applied voltage does not mean no stored energy.
Why an ideal LC circuit oscillates
With no resistor and no applied voltage, take Q(0)=Q0 and I(0)=0. The solution is
Q(t)=Q0cos(ω0t),I(t)=−ω0Q0sin(ω0t).
Let T=2π/ω0. The energy moves between two places during each cycle:
Time
Charge
Current
Where is the stored energy?
0
Q0
0
Capacitor's electric field
T/4
0
−ω0Q0
Inductor's magnetic field
T/2
−Q0
0
Capacitor, with reversed polarity
3T/4
0
ω0Q0
Inductor's magnetic field
T
Q0
0
Back to the initial state
When the capacitor's charge reaches zero, current is still flowing. The inductor's stored energy keeps the current going, charging the capacitor with the opposite polarity. With no resistance, none of the stored energy is converted to heat, so the cycle repeats.
Example: charge in microcoulombs, current in milliamperes
Let
L=1H,C=0.25×10−6F,Q(0)=10−6C,I(0)=0.
Then
Q′′+4×106Q=0,ω0=2000rad/s.
With t in seconds,
Q(t)=10−6cos(2000t)C,I(t)=−2×10−3sin(2000t)A.
The period is π/1000s≈3.14ms. The current amplitude is 2mA, and the total stored energy is
U(0)=2(0.25×10−6)(10−6)2=2×10−6J.
Charge and current exchange electric and magnetic energy with no heat loss.
Q/(1μC)I/(2mA)
No autoplay. Use Play or the keyboard-accessible slider to inspect the motion. Playback is slowed or accelerated for inspection.
The bars show the selected instant, in fractions of the initial stored energy.
The plot uses milliseconds horizontally, charge in microcoulombs, and current divided by 2mA vertically. That normalization makes the quarter-cycle shift visible without confusing a charge with a current.
Adding resistance
Example: an overdamped discharge
Let
L=0.2H,R=300Ω,C=10−5F,E(t)=0,
with Q(0)=10−6C and I(0)=0. The charge equation is
0.2Q′′+300Q′+105Q=0,
or, after dividing by 0.2,
Q′′+1500Q′+5×105Q=0.
The roots are −500 and −1000. Also, Rc=20.2/10−5≈282.84Ω, so R>Rc confirms overdamping.
Write Q=C1e−500t+C2e−1000t. The initial conditions give
C1+C2=10−6,−500C1−1000C2=0,
so C1=2×10−6 and C2=−10−6. Thus, with t in seconds,
For these initial conditions, the charge decreases to zero without reversing sign. The negative current means the chosen plate is discharging. Its maximum magnitude is 0.25mA, reached at t=(ln2)/500s≈1.386ms; differentiating I locates this point.
Choosing critical resistance
If L=0.2H and C=0.8×10−6F, choose
R=Rc=20.8×10−60.2=1000Ω.
This puts the circuit at the boundary between oscillatory and nonoscillatory natural responses. As with the spring, claims about a fastest return should keep the initial conditions and other parameters fixed.
Example: ringing and heat
Return to L=1H and C=0.25μF, but now use R=400Ω. Since Rc=4000Ω, the circuit is underdamped. With the same initial charge 10−6C and zero initial current,
Q′′+400Q′+4×106Q=0.
The roots have a fixed negative real part:
r=−200±iμ,μ=3960000.
Applying the initial conditions to Q=e−200t(C1cosμt+C2sinμt) gives C1=10−6 and μC2=200C1. Therefore
Q(t)=10−6e−200t(cosμt+μ200sinμt).
The amplitude envelope falls by a factor e−1 every 1/200s=5ms. The charge and current oscillate while tending to zero. The energy is not simply disappearing: it becomes heat in the resistor.
With no external source, let the accumulated heat since time zero be
H(t)=∫0tRI(s)2ds.
The energy balance says
U(t)+H(t)=U(0).
Charge and current decay as stored energy becomes heat in the resistor.
No autoplay. Use Play or the keyboard-accessible slider to inspect the motion. Playback is slowed or accelerated for inspection.
Electric energy + magnetic energy + accumulated heat stays equal to the initial stored energy. Red dotted curves bound the normalized charge, not the current.
The stored electric and magnetic energies shrink as heat accumulates. The amplitude decay rate is not the instantaneous energy decay rate: the latter depends on the current through U′=−RI2.
The same distinction connects both systems: free motion describes how stored energy evolves, while forced motion also depends on energy exchanged with an outside source. Once the equation and initial conditions are right, the solution methods are the same.