FS26E2: Solving a Forced Harmonic Oscillator by Fourier and Laplace Transforms
In FS26 we saw that a Fourier transform can turn the equation of motion of a forced oscillator into
an algebraic equation in frequency. But there was a significant step left unexplained: how
do we take that algebraic frequency-domain result and recover the complete motion in
time? Furthermore, what changes if we use a Laplace transform instead of a Fourier
transform? Both methods should describe the same physical mass, spring, damper, and
applied force. Their treatment of causality and initial conditions, however, looks quite
different.
We will solve one and the same initial-value problem completely using both transforms. Our
forcing will be a finite rectangular pulse rather than an indefinitely sustained sinusoid. This makes
the physics particularly clear: the force turns on, turns off, and leaves the oscillator to
ring down freely. By the end we will derive the actual position x(t), compare the two
transform routes term by term, and check the result by direct substitution and numerical
integration.
1 The initial-value problem and its physical assumptions
The equation of motion is
where m is mass, b is the linear viscous damping coefficient, and k is spring stiffness. Positive
displacement is toward the applied force. We assume constant coefficients, a linear spring, no dry
friction, and a stationary support.
Figure 1. The same linear mechanical oscillator is solved by both methods. The spring
produces −kx and the damper produces −bẋ; the external force is the excitation.
The numerical values used throughout are
The force is constant for a short time, then vanishes:
with F0 = 10 N and τ = 0.40 s. The initial conditions are
No impulsive force is applied at either switching instant, so displacement and velocity are
continuous through t = 0 and t = τ. The value assigned to the step function at its jump does not
change the solution.
Define the unit step function u(t), equal to zero for t < 0 and one for t > 0. The rectangular force
can be written as the difference of two steps:
Figure 2. The force equals 10N between 0 and τ = 0.40s. It is equivalent to a positive step
at 0 and an equally large negative step at τ.
Natural frequency, damping, and expected behavior
Define the undamped natural frequency and the exponential decay rate:
Their numerical values are ω0 = 5 rad∕s and α = 1 s−1. The dimensionless damping ratio
is
Thus 0 < ζ < 1 and the system is underdamped. Its damped natural frequency is
The mass will oscillate while the factor e−αt causes its free motion to decay. The static deflection
under a permanently maintained 10 N force would be F0∕k = 0.40 m, but a finite pulse can
produce a different transient peak.
2 Two transforms, two views of the same motion
The two-sided Fourier transform, using the convention established in FS26, is
and its inverse is
The transform variable ω is real angular frequency, with units rad∕s. For the pulse-driven damped
oscillator, the displacement is zero before the pulse and decays afterward, so the usual Fourier
integrals exist.
The one-sided Laplace transform is
where s = σ + iω is a complex frequency. Laplace transforms naturally begin at the
initial time and explicitly carry initial displacement and velocity through the derivative
formulas.
Both transforms use complex exponentials, but the Laplace variable can have a real part that
controls growth or decay. For a causal, sufficiently decaying signal, evaluating its Laplace transform
along the imaginary axis gives its Fourier transform:
The point is not to substitute blindly into an arbitrary Laplace formula. The imaginary axis must
lie in the region where the transform is defined, or a suitable boundary-value interpretation must
be used.
3 Fourier route, Step 1: transform the rectangular force
Only times from 0 to τ contribute. Directly from Equation (9),
For nonzero ω, integrate:
To expose its magnitude and phase, factor out e−iωτ∕2:
Using the sine identity eia − e−ia = 2i sin a gives
where sinc(z) = sin z∕z for z≠0 and sinc(0) = 1.
This result has three physically useful parts. The factor F0τ is the force impulse, in N s. The sinc
envelope describes the broad range of frequencies excited by a short pulse. The factor e−iωτ∕2
encodes the fact that the pulse is centered at t = τ∕2, not at the time origin. At ω = 0 the
apparent singularity in Equation (14) is removable, and
4 Fourier route, Step 2: transform the derivatives
Because the zero-initial-condition response is causal and decays as t →∞, its time
history and derivative boundary terms vanish at infinity. Integration by parts therefore
gives
and a second application gives
Here X(ω) is the Fourier transform of the complete causal displacement x(t).
Substitute the transformed derivatives into Equation (1):
Factor out X:
Hence
where
is the mechanical receptance, or displacement transfer function. Its units are m∕N; the input
transform has units N s and X has units m s.
For our example,
This is an explicit frequency-domain solution, but not yet an expression for the motion x(t). We
must still perform an inverse transform or evaluate the corresponding convolution.
Figure 3. Magnitude of the force transform, the mechanical receptance, and their product.
The oscillator emphasizes frequencies near its resonance, while the pulse excites a broad
band. Each graph uses the physical units indicated.
5 Fourier route, Step 3: obtain the causal Green function
The convolution theorem states that multiplication by H(ω) in the frequency domain corresponds
to convolution with its inverse transform h(t):
We therefore need the inverse Fourier transform of H:
An effective way to evaluate this particular integral is by complex residues. First rewrite its
denominator using α = b∕(2m) and ωd2 = k∕m − α2:
with poles
These poles are in the upper half of the complex ω plane for the particular transform convention
e−iωt and inverse e+iωt. That sign is easy to reverse accidentally if one silently switches Fourier
conventions.
For t > 0, the factor eiωt decays on a large semicircle in the upper half-plane. Closing that contour
encloses both poles. Their residues are
The residue theorem gives 2πi times their sum. Dividing by the inverse-transform factor 2π
leaves
Insert the explicit poles:
Since e−ia − eia = −2i sin a, we obtain
For t < 0, close the contour in the lower half-plane. There are no poles there, so h(t) = 0.
Combining both cases,
This is the causal impulse response: it is the displacement following an ideal force impulse of unit
area at t = 0. It has a decaying sinusoidal shape and is zero before the impulse. It also satisfies
h(0+) = 0 and h′(0+) = 1∕m, the displacement/velocity behavior expected for a unit impulse
applied to a mass.
6 Fourier route, Step 4: integrate the impulse response over the pulse
The force is nonzero only for 0 ≤ v < τ. Substituting it into Equation (25) gives
Because h(t − v) = 0 when v > t, the effective integration range is 0 ≤ v ≤ min(t,τ) for t ≥ 0.
Change variables w = t − v to obtain
Define the response to a unit-amplitude step force as
with g(t) = 0 for negative t. Thus the pulse response is just a difference of step responses:
We still need to evaluate the integral defining g. One can either integrate directly or verify by
differentiation that
Divide by mωd, evaluate between 0 and t, and use m(α2 + ω
d2) = k. The result is
This is the first fully explicit time-domain answer. We will now derive the same formula by Laplace
transforms without evaluating a Fourier contour integral.
Figure 4. Causal impulse response h(t) and its accumulated step response g(t). The impulse
response is a decaying sinusoid; the step response approaches the static deflection 1∕k for a
unit force.
7 Laplace route, Step 1: transform the differential equation
Now begin again with the original differential equation, rather than reusing the Fourier result.
Define
For a one-sided Laplace transform, integration by parts gives the derivative formulas
These formulas show one of Laplace’s main advantages for initial-value problems: the initial
displacement and velocity are retained explicitly. For our example both are zero, so transforming
Equation (1) gives
Factor out X(s) and solve:
with
This denominator is the same quadratic seen in the Fourier calculation. The formal substitution
s = iω gives
Thus, where the transforms exist,
where the symbol on the right is the frequency-domain function defined in Equation (23).
8 Laplace route, Step 2: transform the same pulse
Using the piecewise force directly,
Substitute into Equation (45):
This contains the familiar factor 1 −e−sτ. In the Laplace method, it is naturally interpreted using
the second shifting theorem: multiplying a transform by e−sτ delays its causal inverse by
τ.
The factor 1∕s indicates that we can first solve the response to a step force. This is the algebraic
counterpart of the Fourier convolution step in Equation (37).
9 Laplace route, Step 3: complete the square and separate terms
To invert X(s), first consider the unit-step response transform
We want a partial fraction decomposition of the form
Multiply through by s(ms2 + bs + k):
Match coefficients of s2, s, and the constant term:
Solving gives
Therefore
Use b = 2mα and complete the square:
The numerator becomes ms + b = m(s + 2α) = m[(s + α) + α]. Canceling m leads
to
This form has been chosen to match standard inverse Laplace transform pairs term by term. It is
not a lucky guess: every algebraic step follows from coefficient matching and completion of the
square.
10 Laplace route, Step 4: apply inverse-transform pairs
The basic pairs are
Multiply the last pair by α∕ωd to match the third term of Equation (58). Combining all three
inverses yields
Compare this expression with Equation (40) obtained by integrating the inverse Fourier transform:
the two step responses are identical.
Finally, Equation (50) says
Apply the delay theorem
The final result is
which is exactly the Fourier result from Equation (38).
11 Side-by-side methods comparison
The approaches differ in technique rather than in the physical motion they predict. The following
table tracks the corresponding mathematical steps; its entries use the same sign conventions as the
detailed derivations.
Fourier transform | Laplace transform |
|
|
Time interval: entire real line, with causal
x(t) = 0 for t < 0. | Time interval: t ≥ 0, naturally centered
on an initial-value problem. |
| | |
Derivative: ẋ iωX; ẍ −ω2X when
endpoint terms vanish. | Derivative: ẋ sX−x(0+); ẍ s2X−
sx(0+) −ẋ(0+). |
| | |
Pulse: F(ω) = F0(1 − e−iωτ)∕(iω). | Pulse: F(s) = F
0(1 − e−sτ)∕s. |
| | |
Mechanical factor: H(ω) = [k − mω2 +
ibω]−1. | Mechanical factor: H(s) = [ms2 + bs +
k]−1. |
| | |
Inverse: contour residues yield h(t), and
convolution yields x = h ∗ F. | Inverse: partial fractions yield g(t), and
shifting yields the delayed second step. |
| | |
Best
intuition: which temporal frequencies are
excited and amplified? | Best intuition: how does the initial-value
response start and decay in time? |
Figure 5. The algebra is carried out in different variables, but both routes recover the same
causal x(t). In the main calculation all initial conditions are zero.
The transform-domain solutions are two versions of the same identity,
with the notation on the left indicating the Fourier transform of x, rather than a separate physical
function. For this decaying causal response, setting s = iω in the Laplace-domain result recovers
the Fourier-domain result.
12 Write the complete displacement as a piecewise function
For clarity define the dimensionless step-response bracket
Then g(t) = B(t)∕k, and our solution is
With the numerical values F0∕k = 0.4, α = 1, and ωd =
, the time-domain expression is
explicit. For example, during the pulse,
At the switch-off instant t = τ, the second bracket begins at B(0) = 0, so the response is
continuous. Numerically,
Differentiate the step response to obtain g′(t) = h(t) for t > 0. Therefore the pulse-response
velocity is
with the step values at switching instants interpreted by continuity. Because h(0+) = 0, velocity is
continuous at t = τ as well. Its numerical value there is
The mass is moving forward when the force turns off. Thus its displacement continues to grow
briefly even though the forcing has dropped to zero. This is an immediate illustration of inertia:
switching off the force does not instantaneously stop the mass.
Figure 6. Displacement and velocity resulting from the finite pulse. The vertical dashed line
marks switch-off at 0.40s. Displacement and velocity remain continuous; acceleration
changes discontinuously when the applied force changes.
13 Why acceleration jumps when the force switches
Evaluate the equation of motion immediately before and immediately after switch-off. Since
displacement and velocity are continuous,
Therefore
Acceleration is allowed to jump because the applied force jumps. Velocity would jump only if the
force contained an actual impulse (a delta function) of finite area. This difference is important
when interpreting both transform results and when checking numerical integrations across
switching events.
Peak displacement and an energy check
The velocity is still positive when the force is removed. Solving ẋ(t) = 0 for the first maximum
after switch-off gives, numerically,
This exceeds the static deflection F0∕k = 0.40 m because the mass already has kinetic energy when
the force is switched off. Another useful physical check comes directly from the equation of motion.
Multiply it by velocity ẋ:
The first and third terms are total time derivatives, so
Before switch-off, the force can do work on the mass; damping continually removes mechanical
energy. After switch-off, F = 0 and
The post-pulse oscillator therefore loses mechanical energy monotonically, even though its
displacement can continue growing briefly. Increasing displacement does not require
increasing total energy when kinetic energy is being converted into spring potential
energy.
14 What do the poles mean in the two transform planes?
The Laplace transfer function has poles determined by
completing the square gives
For positive damping, these lie in the left half of the complex s plane. Their negative real part
gives the exponential decay e−αt, while their imaginary parts give oscillatory motion at
ωd.
For our Fourier convention, s = iω and therefore ω = −is. Converting the same pole locations
produces
The Fourier-plane poles lie in the upper half-plane. Neither plane is wrong: the locations are
related by a rotation of complex coordinates and by our exponential sign conventions.
Figure 7. The same damped modes appear as left-half-plane poles in s and upper-half-plane
poles in ω for the convention f(ω) = ∫
f(t)e−iωtdt. Locations are schematic, not to scale.
For a causal stable oscillator, the Fourier transform can be interpreted as evaluating the Laplace
transfer function on the imaginary axis. If damping were zero, poles would reach the real ω axis.
Then impulse responses need not be absolutely integrable and the ordinary Fourier-transform
interpretation requires additional care (such as distributions or a limiting damping prescription).
This is one practical reason Laplace analysis is often introduced before the more delicate
undamped frequency-response case.
15 Superposition: one turn-on response minus one turn-off response
There is a simple physical interpretation of the formula we have obtained twice. Imagine leaving
the constant force F0 on forever. The oscillator would perform its step response F0g(t), eventually
approaching the static extension F0∕k.
Now imagine applying an additional force −F0 starting at t = τ. Because the system is linear and
time invariant, this second step produces the response −F0u(t−τ)g(t−τ). Adding the two effects
removes the maintained force after τ. What remains is free damped oscillation with the position
and velocity accumulated during the pulse.
Figure 8. The pulse response is the sum of a positive step response starting at zero and a
delayed negative step response beginning at τ. Neither component vanishes permanently, but
their static limits cancel.
16 A useful limiting case: a very short force pulse
Keep the impulse J = F0τ fixed and make the duration τ small. The force becomes larger and
narrower while its time integral remains constant. Formally the rectangular pulse approaches Jδ(t)
in a distributional sense. The output therefore approaches
This can also be seen from the convolution result:
For fixed t > 0 where h is continuous, the bracket tends to h(t). This limit connects an actual finite
pulse to the ideal impulse response without pretending that a finite rectangular force acts for zero
time.
17 Initial conditions: the key operational difference
The main problem deliberately used zero initial displacement and velocity. Now suppose instead
that
Laplace: initial conditions enter automatically
Using the full derivative identities from Equations (42) and (43), transform the same equation of
motion:
Collect terms:
Hence
The first term is the zero-initial-condition forced response. The remaining terms produce a
homogeneous solution. In the underdamped case the additional displacement is
Thus the general solution is x(t) = xIC(t) + xforced(t), where xforced is the pulse response already
derived.
Fourier: the same initial conditions need extra care
A global two-sided Fourier transform of a causal extension must account for the jump at the origin
if x0≠0. Let x+(t) denote the motion for t > 0 and define xc(t) = u(t)x+(t). In the sense of
distributions,
The Fourier transform of δ(t) is 1, and that of δ′(t) is iω under our convention. Substituting the
causal extension into the full-line equation therefore introduces the effective forcing
Its Fourier solution is
Now evaluate Equation (87) at s = iω. Exactly the same expression results. The calculation shows
why Laplace transforms are usually more straightforward for initial-value problems: they keep
those boundary terms explicit without requiring a distributional causal extension.
If distributions are outside the reader’s present toolbox, an equally valid elementary Fourier
workflow is to calculate the zero-initial-condition forced response by convolution and then add the
homogeneous term from Equation (88). The physical answer is identical.
18 A second check: sinusoidal forcing and steady state
To connect with the brief sinusoidal-response example from FS26, consider a driving force
F(t) = Fa cos(Ωt) maintained indefinitely. A stable damped oscillator eventually reaches steady
sinusoidal motion after its transient decays.
Complex phasors give a convenient algebraic solution. Seek
where
Its real amplitude and phase lag are
Thus
For a force switched on at t = 0 with specified initial conditions, this steady state is not the entire
answer. One must also add a decaying homogeneous response chosen to satisfy the initial
conditions. A Laplace transform of Fau(t) cos(Ωt) includes both parts automatically when
inverted. The Fourier phasor construction emphasizes the eventual steady-state frequency
response instead. These are distinct questions, even though both use the same transfer
function.
19 Verification checklist and common mistakes
- Transform sign: We use e−iωt in the forward Fourier transform. That choice gives
the derivative factor +iω and Fourier poles at ±ωd + iα.
- Initial conditions: The simple Fourier derivative rule used above assumes the
complete decaying causal solution with zero initial data. It must not be applied without
boundary terms when a nonzero initial state is turned on at the time origin.
- Pulse duration: A finite rectangular force has a sinc-shaped transform. Its net impulse
is F0τ; it is not a Dirac delta unless an appropriate limit is taken.
- Impulse versus step: The impulse response is h and the unit-force step response is
g = ∫
h. The displacement under a finite pulse is F0[g(t) − u(t − τ)g(t − τ)].
- Continuity: A finite jump in applied force causes a jump in acceleration, not position
or velocity.
- Units: H(ω) has units m∕N; a Fourier force transform has N s; a Fourier displacement
transform has m s.
- Resonance: The peak response depends on the receptance and the input spectrum.
A large input magnitude at a frequency need not produce the largest displacement
response if the oscillator suppresses that frequency.
- Meaning of the solution: The pulse response is transient and causal. The indefinitely
driven sinusoidal solution is usually described as steady state plus a separately specified
transient.
20 Self-check exercises
- Derive Equation (14) directly from the pulse, and explain why the formula at ω = 0
is understood as a limit.
- Starting from H(s), derive the two Laplace poles. Convert them into the Fourier ω
plane using s = iω.
- Differentiate the unit step response g(t) and show that its derivative equals h(t).
- Check that x(0) = 0 and ẋ(0) = 0. Also show directly that x and ẋ remain continuous
at t = τ.
- Use the differential equation to find the jump in acceleration when the force turns off.
- For a nonzero initial displacement x0 with zero initial velocity, derive the homogeneous
response from Equation (87).
- Explain in words why an oscillator can continue moving away from equilibrium for a
short time after the applied force disappears.
- If the same pulse is made shorter but its impulse F0τ is fixed, what is the limiting
displacement response for t > 0?
21 Conclusion
The Fourier transform and Laplace transform solve the same linear oscillator because they encode
the same differential operator. Fourier analysis emphasizes the input spectrum and mechanical
receptance, while Laplace analysis emphasizes the initial-value problem, the algebra of time
shifts, and exponentially decaying modes. For a stable causal response, the connection
is concrete: H(iω) is the Fourier-domain frequency response, and the complete time
histories obtained by inverse Fourier convolution and inverse Laplace partial fractions agree
exactly.
References
[1] PhysicsLibrary, FS26, Fourier Series to Fourier Transform; the transform
conventions and brief oscillator example on which this companion expands.
[2] A. V. Oppenheim, A. S. Willsky, and S. H. Nawab, Signals and Systems, 2nd ed.,
Prentice Hall.
[3] E. Kreyszig, Advanced Engineering Mathematics, Wiley.
[4] S. S. Rao, Mechanical Vibrations, Pearson.