5.4: Step and Impulse Functions
- Page ID
- 91075
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Heaviside Step Function
OFTEN, THE INITIAL VALUE PROBLEMS THAT ONE FACES in differential equations courses can be solved using either the Method of Undetermined Coefficients or the Method of Variation of Parameters. However, using the latter can be messy and involves some skill with integration. Many circuit designs can be modeled with systems of differential equations using Kirchoff’s Rules. Such systems can get fairly complicated. However, Laplace transforms can be used to solve such systems, and electrical engineers have long used such methods in circuit analysis.
In this section we add a couple more transform pairs and transform properties that are useful in accounting for things like turning on a driving force, using periodic functions like a square wave, or introducing impulse forces.
![clipboard_ebcfd816715648eec0d90c4e6df4bcd17.png](https://math.libretexts.org/@api/deki/files/81606/clipboard_ebcfd816715648eec0d90c4e6df4bcd17.png?revision=1)
We first recall the Heaviside step function, given by
\[H(t)= \begin{cases}0, & t<0 \\[4pt] 1, & t>0\end{cases} \nonumber \]
. A more general version of the step function is the horizontally shifted step function, \(H(t-a)\). This function is shown in Figure \(5 \cdot 5\). The Laplace transform of this function is found for \(a>0\) as
\[\begin{aligned}
\mathcal{L}[H(t-a)] &=\int_{0}^{\infty} H(t-a) e^{-s t} d t \\[4pt]
&=\int_{a}^{\infty} e^{-s t} d t \\[4pt]
&=\left.\dfrac{e^{-s t}}{s}\right|_{a} ^{\infty}=\dfrac{e^{-a s}}{s}
\end{aligned} \label{5.18} \]
The Laplace transform has two Shift Theorems involving the multiplication of the function, \(f(t)\), or its transform, \(F(s)\), by exponentials. The First and Second Shift Properties Theorems are given by
\[\mathcal{L}\left[e^{a t} f(t)\right]=F(s-a) \nonumber \]
\[\mathcal{L}[f(t-a) H(t-a)]=e^{-a s} F(s). \nonumber \]
(The Shift Theorems). We prove the First Shift Theorem and leave the other proof as an exercise for the reader. Namely,
\[ \begin{aligned} \mathcal{L}\left[e^{a t} f(t)\right] &=\int_{0}^{\infty} e^{a t} f(t) e^{-s t} d t \\[4pt] &=\int_{0}^{\infty} f(t) e^{-(s-a) t} d t=F(s-a) \end{aligned} \label{5.21} \]
Compute the Laplace transform of \(e^{-a t} \sin \omega t\).
This function arises as the solution of the underdamped harmonic oscillator. We first note that the exponential multiplies a sine function. The First Shift Theorem tells us that we first need the transform of the sine function. So, for \(f(t)=\sin \omega t\), we have
\[F(s)=\dfrac{\omega}{s^{2}+\omega^{2}}\nonumber \]
Using this transform, we can obtain the solution to this problem as
\[\mathcal{L}\left[e^{-a t} \sin \omega t\right]=F(s+a)=\dfrac{\omega}{(s+a)^{2}+\omega^{2}}\nonumber \]
More interesting examples can be found using piecewise defined functions. First we consider the function \(H(t)-H(t-a) \). For \(t<0\), both terms are zero. In the interval \([0, a]\), the function \(H(t)=1\) and \(H(t-a)=0 \). Therefore, \(H(t)-H(t-a)=1\) for \(t \in[0, a]\). Finally, for \(t>a\), both functions are one and therefore the difference is zero. The graph of \(H(t)-H(t-a)\) is shown in Figure \(\PageIndex{2}\).
![clipboard_e3e087dc84dded54c1dd1df2428f009c8.png](https://math.libretexts.org/@api/deki/files/81610/clipboard_e3e087dc84dded54c1dd1df2428f009c8.png?revision=1)
We now consider the piecewise defined function:
\[g(t)=\left\{\begin{array}{cc}
f(t), & 0 \leq t \leq a \\[4pt]
0, & t<0, t>a
\end{array}\right . \nonumber \]
This function can be rewritten in terms of step functions. We only need to multiply \(f(t)\) by the above box function,
\[g(t) = f(t)[H(t) − H(t − a)].\nonumber \]
We depict this in Figure \(\PageIndex{3}\).
![clipboard_e41d23ce089f648c0c4634e93a607e3ec.png](https://math.libretexts.org/@api/deki/files/81614/clipboard_e41d23ce089f648c0c4634e93a607e3ec.png?revision=1)
Even more complicated functions can be written in terms of step functions. We only need to look at sums of functions of the form \(f(t)[H(t-a)-H(t-b)]\) for \(b>a\). This is similar to a box function. It is nonzero between \(a\) and \(b\) and has height \(f(t)\). We show as an example the square wave function in Figure \(\PageIndex{4}\). It can be represented as a sum of an infinite number of boxes,
\[f(t)=\sum_{n=-\infty}^{\infty}[H(t-2 n a)-H(t-(2 n+1) a)]\nonumber \]
for \(a>0\)
Find the Laplace Transform of a square wave "turned \(\mathrm{on}^{\prime \prime}\) at \(t=0 \).
![clipboard_e1a018487b6d6e19ba744ae3645f27127.png](https://math.libretexts.org/@api/deki/files/81615/clipboard_e1a018487b6d6e19ba744ae3645f27127.png?revision=1)
We let
\[f(t)=\sum_{n=0}^{\infty}[H(t-2 n a)-H(t-(2 n+1) a)], \quad a>0 \nonumber \]
Using the properties of the Heaviside function, we have
\[ \begin{aligned} \mathcal{L}[f(t)] &=\sum_{n=0}^{\infty}[\mathcal{L}[H(t-2 n a)]-\mathcal{L}[H(t-(2n+1)a)]]\\[4pt] &=\sum_{n=0}^{\infty}\left[\dfrac{e^{-2 n a s}}{s}-\dfrac{e^{-(2 n+1) a s}}{s}\right] \\[4pt] &=\dfrac{1-e^{-a s}}{s} \sum_{n=0}^{\infty}\left(e^{-2 a s}\right)^{n} \\[4pt] &=\dfrac{1-e^{-a s}}{s}\left(\dfrac{1}{1-e^{-2 a s}}\right) \\[4pt] &=\dfrac{1-e^{-a s}}{s\left(1-e^{-2 a s}\right)} \\[4pt] &=\dfrac{1}{s\left(1+e^{-a s}\right)} \end{aligned}\label{5.22} \]
Note that the third line in the derivation is a geometric series. We summed this series to get the answer in a compact form since \(e^{-2 a s}<\) \(1 \).
Periodic Functions\(^{*}\)
The previous example provides us with a causal function \((f(t)=0\) for \(t<0 .)\) which is periodic with period \(a\). Such periodic functions can be teated in a simpler fashion. We will now show that
(Laplace transform of periodic functions).
If \(f(t)\) is periodic with period \(T\) and piecewise continuous on \([0, T]\), then
\[F(s)=\dfrac{1}{1-e^{-s T}} \int_{0}^{T} f(t) e^{-s t} d t \nonumber \]
- Proof.
-
\[ \begin{aligned} F(s) &=\int_{0}^{\infty} f(t) e^{-s t} d t \\[4pt] &=\int_{0}^{T} f(t) e^{-s t} d t+\int_{T}^{\infty} f(t) e^{-s t} d t \\[4pt] &=\int_{0}^{T} f(t) e^{-s t} d t+\int_{T}^{\infty} f(t-T) e^{-s t} d t \\[4pt] &=\int_{0}^{T} f(t) e^{-s t} d t+e^{-s T} \int_{0}^{\infty} f(\tau) e^{-s \tau} d \tau \\[4pt] &=\int_{0}^{T} f(t) e^{-s t} d t+e^{-s T} F(s) \end{aligned} \label{5.23} \]
Solving for \(F(s)\), one obtains the desired result.
Use the periodicity of
\[f(t)=\sum_{n=0}^{\infty}[H(t-2 n a)-H(t-(2 n+1) a) \nonumber], \quad a>0 \nonumber \]
to obtain the Laplace transform.
We note that \(f(t)\) has period \(T=2 a\). By Theorem 5.1, we have
\[\begin{aligned} F(s) &=\int_{0}^{\infty} f(t) e^{-s t} d t \\[4pt] &=\dfrac{1}{1-e^{-2 a s}} \int_{0}^{2 a}[H(t)-H(t-a)] e^{-s t} d t \\[4pt] &=\dfrac{1}{1-e^{-2 a s}}\left[\int_{0}^{2 a} e^{-s t} d t-\int_{a}^{2 a} e^{-s t} d t\right] \\[4pt] &=\dfrac{1}{1-e^{-2 a s}}\left[\left.\dfrac{e^{-s t}}{-s}\right|_{0} ^{2 a}-\left.\dfrac{e^{-s t}}{-s}\right|_{a} ^{2 a}\right] \\[4pt] &=\dfrac{1}{s\left(1-e^{-2 a s}\right)}\left[1-e^{-2 a s}+e^{-2 a s}-e^{-a s}\right] \\[4pt] &=\dfrac{1-e^{-a s}}{s\left(1-e^{-2 a s}\right)} \\[4pt] &=\dfrac{1}{s\left(1+e^{-a s}\right)} \end{aligned}\label{5.24} \]
This is the same result that was obtained in the previous example.
P. A. M. Dirac \((1902-1984)\) introduced the \(\delta\) function in his book, The Principles of Quantum Mechanics, 4 th Ed., \(\mathrm{Ox}-\) ford University Press, 1958 , originally published in 1930 , as part of his orthogonality statement for a basis of functions in a Hilbert space, \(\left\langle\xi^{\prime} \mid \xi^{\prime \prime}\right\rangle=\) \(c \delta\left(\xi^{\prime}-\zeta^{\prime \prime}\right)\) in the same way we introduced discrete orthogonality using the Kronecker delta. Historically, a number of mathematicians sought to understand the Diract delta function, culminating in Laurent Schwartz’s (1915-2002) theory of distributions in 1945 .
Dirac Delta Function
ANOTHER USEFUL CONCEPT IS THE IMPULSE FUNCTION. If wE want to apply an impulse function, we can use the Dirac delta function \(\delta(x)\). This is an example of what is known as a generalized function, or a distribution. Dirac had introduced this function in the 1930 s in his study of quantum mechanics as a useful tool. It was later studied in a general theory of distributions and found to be more than a simple tool used by physicists. The Dirac delta function, as any distribution, only makes sense under an integral. Here will will introduce the Dirac delta function through its main properties. The delta function satisfies two main properties:
- \(\delta(x)=0\) for \(x \neq 0\).
- \(\int_{-\infty}^{\infty} \delta(x) d x=1\).
Integration over more general intervals gives
\[ \int_{a}^{b} \delta(x) d x= \begin{cases}1, & 0 \in[a, b] \\[4pt] 0, & 0 \notin[a, b]\end{cases} \label{5.25} \]
Another important property is the sifting property:
\[\int_{-\infty}^{\infty} \delta(x-a) f(x) d x=f(a) \nonumber \]
This can be seen by noting that the delta function is zero everywhere except at \(x=a\). Therefore, the integrand is zero everywhere and the only contribution from \(f(x)\) will be from \(x=a\). So, we can replace \(f(x)\) with \(f(a)\) under the integral. Since \(f(a)\) is a constant, we have that
\[ \begin{aligned} \int_{-\infty}^{\infty} \delta(x-a) f(x) d x &=\int_{-\infty}^{\infty} \delta(x-a) f(a) d x \\[4pt] &=f(a) \int_{-\infty}^{\infty} \delta(x-a) d x=f(a) \end{aligned} \label{5.26} \]
Evaluate: \(\int_{-\infty}^{\infty} \delta(x+3) x^{3} d x\)
This is a simple use of the sifting property:
\[\int_{-\infty}^{\infty} \delta(x+3) x^{3} d x=(-3)^{3}=-27 \nonumber \]
Another property results from using a scaled argument, \(ax\). In this case, we show that
\[\delta(a x)=|a|^{-1} \delta(x) \nonumber \]
usual, this only has meaning under an integral sign. So, we place \(\delta(a x)\) inside an integral and make a substitution \(y=a x\) :
\[ \begin{aligned} \int_{-\infty}^{\infty} \delta(a x) d x &=\lim _{L \rightarrow \infty} \int_{-L}^{L} \delta(a x) d x \\[4pt] &=\lim _{L \rightarrow \infty} \dfrac{1}{a} \int_{-a L}^{a L} \delta(y) d y \end{aligned}\label{5.28} \]
If \(a>0\) then
\[\int_{-\infty}^{\infty} \delta(a x) d x=\dfrac{1}{a} \int_{-\infty}^{\infty} \delta(y) d y \nonumber \]
However, if \(a<0\) then
\[\int_{-\infty}^{\infty} \delta(a x) d x=\dfrac{1}{a} \int_{\infty}^{-\infty} \delta(y) d y=-\dfrac{1}{a} \int_{-\infty}^{\infty} \delta(y) d y \nonumber \]
The overall difference in a multiplicative minus sign can be absorbed into one expression by changing the factor \(1 / a\) to \(1 /|a| \). Thus,
\[\int_{-\infty}^{\infty} \delta(a x) d x=\dfrac{1}{|a|} \int_{-\infty}^{\infty} \delta(y) d y \nonumber \]
Properties of the Dirac delta function:
\[\begin{aligned} & \begin{gathered}\int_{-\infty}^{\infty} \delta(x-a) f(x) d x=f(a) . \\[4pt]\int_{-\infty}^{\infty} \delta(a x) d x=\dfrac{1}{|a|} \int_{-\infty}^{\infty} \delta(y) d y .\end{gathered} \end{aligned} \nonumber \]
Evaluate \(\int_{-\infty}^{\infty}(5 x+1) \delta(4(x-2)) d x\)
This is a straightforward integration:
\[\int_{-\infty}^{\infty}(5 x+1) \delta(4(x-2)) d x=\dfrac{1}{4} \int_{-\infty}^{\infty}(5 x+1) \delta(x-2) d x=\dfrac{11}{4} \nonumber \]
The first step is to write \(\delta(4(x-2))=\dfrac{1}{4} \delta(x-2) \). Then, the final evaluation is given by
\[\dfrac{1}{4} \int_{-\infty}^{\infty}(5 x+1) \delta(x-2) d x=\dfrac{1}{4}(5(2)+1)=\dfrac{11}{4} \nonumber \]
The Dirac delta function can be used to represent a unit impulse. Summing over a number of impulses, or point sources, we can describe a general function as shown in Figure 5.9. The sum of impulses located at points \(a_{i}\), \(i=1, \ldots, n\), with strengths \(f\left(a_{i}\right)\) would be given by
\[f(x)=\sum_{i=1}^{n} f\left(a_{i}\right) \delta\left(x-a_{i}\right)\nonumber \]
![clipboard_e06a9d078feee958fd63a4e7308b46bd4.png](https://math.libretexts.org/@api/deki/files/81616/clipboard_e06a9d078feee958fd63a4e7308b46bd4.png?revision=1)
A continuous sum could be written as
\[f(x)=\int_{-\infty}^{\infty} f(\xi) \delta(x-\xi) d \xi \nonumber \]
This is simply an application of the sifting property of the delta function.
We will investigate a case when one would use a single impulse. While a mass on a spring is undergoing simple harmonic motion, we hit it for an instant at time \(t = a\). In such a case, we could represent the force as a multiple of \(\delta(t − a) \\[4pt]).
One would then need the Laplace transform of the delta function to solve the associated initial value problem. Inserting the delta function into the Laplace transform, we find that for \(a>0\),
\[ \begin{aligned} \mathcal{L}[\delta(t-a)] &=\int_{0}^{\infty} \delta(t-a) e^{-s t} d t \\[4pt] &=\int_{-\infty}^{\infty} \delta(t-a) e^{-s t} d t \\[4pt] &=e^{-a s} \end{aligned} \label{5.30} \]
Solve the initial value problem \(y^{\prime \prime}+4 \pi^{2} y=\delta(t-2)\),
This initial value problem models a spring oscillation with an impulse force. Without the forcing term, given by the delta function, this spring is initially at rest and not stretched. The delta function models a unit impulse at \(t=2\). Of course, we anticipate that at this time the spring will begin to oscillate. We will solve this problem using Laplace \(y(0)=y^{\prime}(0)=0\). transforms. First, we transform the differential equation:
\[s^{2} Y-s y(0)-y^{\prime}(0)+4 \pi^{2} Y=e^{-2 s}\nonumber \]
Inserting the initial conditions, we have
\[\left(s^{2}+4 \pi^{2}\right) Y=e^{-2 s}\nonumber \]
Solving for \(Y(s)\), we obtain
\[Y(s)=\dfrac{e^{-2 s}}{s^{2}+4 \pi^{2}}\nonumber \]
We now seek the function for which this is the Laplace transform. The form of this function is an exponential times some Laplace transform, \(F(s)\). Thus, we need the Second Shift Theorem since the solution is of the form \(Y(s)=e^{-2 s} F(s)\) for
\[F(s)=\dfrac{1}{s^{2}+4 \pi^{2}}.\nonumber \]
We need to find the corresponding \(f(t)\) of the Laplace transform pair. The denominator in \(F(s)\) suggests a sine or cosine. Since the numerator is constant, we pick sine. From the tables of transforms, we have
\[\mathcal{L}[\sin 2 \pi t]=\dfrac{2 \pi}{s^{2}+4 \pi^{2}}\nonumber \]
So, we write
\[F(s)=\dfrac{1}{2 \pi} \dfrac{2 \pi}{s^{2}+4 \pi^{2}}\nonumber \]
This gives \(f(t)=(2 \pi)^{-1} \sin 2 \pi t\).
We now apply the Second Shift Theorem, \(\mathcal{L}[f(t-a) H(t-a)]=\) \(e^{-a s} F(s)\), or
\[ \begin{aligned} y(t) &=\mathcal{L}^{-1}\left[e^{-2 s} F(s)\right] \\[4pt] &=H(t-2) f(t-2) \\[4pt] &=\dfrac{1}{2 \pi} H(t-2) \sin 2 \pi(t-2) \end{aligned}\label{5.31} \]
![clipboard_ec95c355c86a2d40841e55572ed350215.png](https://math.libretexts.org/@api/deki/files/81617/clipboard_ec95c355c86a2d40841e55572ed350215.png?revision=1)
This solution tells us that the mass is at rest until \(t=2\) and then ample \(5.14\) in which a spring at rest exbegins to oscillate at its natural frequency. A plot of this solution is periences an impulse force at \(t=2\). shown in Figure \(\PageIndex{6}\)
Solve the initial value problem
\[y^{\prime \prime}+y=f(t), \quad y(0)=0, y^{\prime}(0)=0 \nonumber \]
where
\[f(t)=\left\{\begin{array}{cl} \cos \pi t, & 0 \leq t \leq 2 \\[4pt] 0, & \text { otherwise } \end{array}\right. \nonumber \]
We need the Laplace transform of f(t). This function can be written in terms of a Heaviside function, \(f(t) = cos \pi tH(t − 2)\). In order to apply the Second Shift Theorem, we need a shifted version of the cosine function. We find the shifted version by noting that \(\cos \pi(t-2)=\cos \pi t\). Thus, we have
\[ \begin{aligned} f(t) &=\cos \pi t[H(t)-H(t-2)] \\[4pt] &=\cos \pi t-\cos \pi(t-2) H(t-2), \quad t \geq 0 \end{aligned} \label{5.32} \]
The Laplace transform of this driving term is
\[F(s)=\left(1-e^{-2 s}\right) \mathcal{L}[\cos \pi t]=\left(1-e^{-2 s}\right) \dfrac{s}{s^{2}+\pi^{2}} \nonumber \]
Now we can proceed to solve the initial value problem. The Laplace transform of the initial value problem yields
\[\left(s^{2}+1\right) Y(s)=\left(1-e^{-2 s}\right) \dfrac{s}{s^{2}+\pi^{2}}\nonumber \]
Therefore,
\[Y(s)=\left(1-e^{-2 s}\right) \dfrac{s}{\left(s^{2}+\pi^{2}\right)\left(s^{2}+1\right)}\nonumber \]
We can retrieve the solution to the initial value problem using the Second Shift Theorem. The solution is of the form \(Y(s)=(1-\) \(\left.e^{-2 s}\right) G(s)\) for
\[G(s)=\dfrac{s}{\left(s^{2}+\pi^{2}\right)\left(s^{2}+1\right)}\nonumber \]
Then, the final solution takes the form
\[y(t)=g(t)-g(t-2) H(t-2)\nonumber \]
We only need to find \(g(t)\) in order to finish the problem. This is easily done using the partial fraction decomposition
\[G(s)=\dfrac{s}{\left(s^{2}+\pi^{2}\right)\left(s^{2}+1\right)}=\dfrac{1}{\pi^{2}-1}\left[\dfrac{s}{s^{2}+1}-\dfrac{s}{s^{2}+\pi^{2}}\right]\nonumber \]
Then,
\[g(t)=\mathcal{L}^{-1}\left[\frac{s}{\left(s^{2}+\pi^{2}\right)\left(s^{2}+1\right)}\right]=\frac{1}{\pi^{2}-1}(\cos t-\cos \pi t)\nonumber \]
The final solution is then given by
\[y(t)=\dfrac{1}{\pi^{2}-1}[\cos t-\cos \pi t-H(t-2)(\cos (t-2)-\cos \pi t)]\nonumber \]
A plot of this solution is shown in Figure \(\PageIndex{7}\).
![clipboard_e83c6f5f6dea76a1143b07277aed39b09.png](https://math.libretexts.org/@api/deki/files/81618/clipboard_e83c6f5f6dea76a1143b07277aed39b09.png?revision=1)