WOLFRAM|DEMONSTRATIONS PROJECT

Differential Equation with a Discontinuous Forcing Function

​
number of terms N
4
Consider the equation
2
d
u(t)
d
2
t
+
2
π
u(t)=g(t)
, where
g(t)
is a square-wave step function and
u(t)
is the oscillation of a spring-mass system in resonance with the square-wave forcing function. The graph of
g(t)
is drawn in purple and that of
u(t)
in blue. Using Laplace transforms, this solution is more compact than using a Fourier series expansion of the forcing function.
The first three terms of the Laplace transform of the homogeneous solution for
u(t)
are:
-2s

s(
2
s
+
2
π
)
-
-s

s(
2
s
+
2
π
)
+
1
s(
2
s
+
2
π
)
. The Laplace transform of the forcing function is
-2s

s
-
-s

s
+
1
s
. The phase synchronization between input
g(t)
and output
u(t)
gives rise to resonance.