Processing math: 100%
Skip to main content

Section 6.5 ODEs with discontinuous forcing functions

We will now do some examples involving intial value problems where the forcing function have pieces that switch on and off. This will require the use of step functions to turn parts of the forcing function on and off as the definition requires. You can think of this as a way to rewrite a multi-part definition into just one definition for a piecewise continuous function.

Solve using Laplace Transforms:

\begin{equation*} y^{\prime}=-y+u_{3}(t),\,\,\,\,\,y(0)=2. \end{equation*}

Step 1: Take \(\mathcal{L}\) of both sides and solve for \(\mathcal{L}\)

\begin{equation*} \mathcal{L}\left\{ y^{\prime}\right\} =\mathcal{L}\left\{ -y\right\} +\mathcal{L}\left\{ u_{3}(t)\right\} \end{equation*}

so that

\begin{equation*} s\mathcal{L}\left\{ y\right\} -y(0)=-\mathcal{L}\left\{ y\right\} +\frac{e^{-3s}}{s}. \end{equation*}

Step 2: Solve for \(\mathcal{L}\left\{ y\right\} \text{,}\)

\begin{equation*} \mathcal{L}\left\{ y\right\} =\frac{2}{s+1}+\frac{e^{-3s}}{s\left(s+1\right)} \end{equation*}

Step 3: We do partial fractions on

\begin{equation*} \frac{1}{s\left(s+1\right)}=\frac{1}{s}-\frac{1}{s+1} \end{equation*}

Step 4: Take the inverse Laplace transform: Using \(\mathcal{L}\left[u_{a}(t)f(t-a)\right]=e^{-as}F(s)\text{,}\) and get

\begin{align*} y \amp =\mathcal{L}^{-1}\left\{ \frac{2}{s+1}+e^{-3s}\frac{1}{s}-e^{-3s}\frac{1}{s+1}\right\} \\ \amp =2e^{-t}+u_{3}(t)-u_{3}(t)e^{-\left(t-3\right)}. \end{align*}

Solve using Laplace Transforms:

\begin{equation*} y^{\prime}=-3y+6u_{4}(t)e^{-\left(t-4\right)},\,\,\,\,\,y(0)=5. \end{equation*}

Step 1: Take \(\mathcal{L}\) of both sides

\begin{equation*} \mathcal{L}\left\{ y^{\prime}\right\} =-3\mathcal{L}\left\{ y\right\} +6\mathcal{L}\left\{ u_{4}(t)e^{-\left(t-4\right)}\right\} \end{equation*}

and get

\begin{equation*} s\mathcal{L}\left\{ y\right\} -y(0)=-3\mathcal{L}\left\{ y\right\} +6\mathcal{L}\left\{ u_{4}(t)e^{-\left(t-4\right)}\right\} \end{equation*}

Step 2: Solve for \(\mathcal{L}\left\{ y\right\} \) and get

\begin{equation*} \mathcal{L}\left\{ y\right\} =\frac{5}{s+3}+\frac{6e^{-4s}}{\left(s+3\right)\left(s+1\right)}. \end{equation*}

Step 3: We do partial fractions

\begin{equation*} \frac{6}{\left(s+3\right)\left(s+1\right)}=\frac{-3}{\left(s+3\right)}+\frac{3}{\left(s+1\right)}. \end{equation*}

Step 3: Take the inverse Laplace transform: Using \(\mathcal{L}\left[u_{a}(t)f(t-a)\right]=e^{-as}F(s)\text{,}\) and

\begin{align*} y \amp =\mathcal{L}^{-1}\left\{ \frac{5}{s+3}+\frac{6e^{-4s}}{\left(s+3\right)\left(s+1\right)}\right\} \\ \amp =\mathcal{L}^{-1}\left\{ \frac{5}{s+3}\right\} +\mathcal{L}^{-1}\left\{ -3e^{-4s}\frac{1}{\left(s+3\right)}+3e^{-4s}\frac{1}{\left(s+1\right)}\right\} \\ \amp =5e^{-3t}-3u_{4}(t)e^{-3\left(t-4\right)}+3u_{4}(t)e^{-\left(t-4\right)}. \end{align*}

Solve using Laplace Transforms:

\begin{equation*} y^{\prime\prime}+4y=3u_{5}(t)\sin\left(t-5\right),\,\,\,\,\,y(0)=1,y^{\prime}(0)=0. \end{equation*}

Step 1: Take \(\mathcal{L}\) of both sides and solve for \(\mathcal{L}\)

\begin{equation*} \mathcal{L}\left\{ y^{\prime\prime}\right\} +4\mathcal{L}\left\{ y\right\} =3\mathcal{L}\left\{ u_{5}(t)\sin\left(t-5\right)\right\} \end{equation*}

and recall \(\mathcal{L}\left[u_{a}(t)f(t-a)\right]=e^{-as}F(s)\text{,}\) hence \(a=4\text{,}\) \(f(t-5)=\sin\left(t-5\right)\) hence \(f(t)=\sin t\) and \(\mathcal{L}\left\{ \sin t\right\} =\frac{1}{s^{2}+1}\) hence

\begin{align*} s^{2}\mathcal{L}\left\{ y\right\} -sy(0)-y^{\prime}(0)+4\mathcal{L}\left\{ y\right\} \amp =3\frac{e^{-5s}}{s^{2}+1},\implies\\ \left(s^{2}+4\right)\mathcal{L}\left\{ y\right\} -s \amp =3\frac{e^{-5s}}{s^{2}+1},\implies\\ \mathcal{L}\left\{ y\right\} \amp =3\frac{e^{-5s}}{\left(s^{2}+4\right)\left(s^{2}+1\right)}+\frac{s}{s^{2}+4} \end{align*}

Step 2: We do partial fractions on

\begin{equation*} \frac{3}{\left(s^{2}+4\right)\left(s^{2}+1\right)}=\frac{As+B}{s^{2}+4}+\frac{Cs+D}{s^{2}+1} \end{equation*}

hence

\begin{align*} 3 \amp =\left(As+B\right)\left(s^{2}+1\right)+\left(Cs+D\right)\left(s^{2}+4\right),\implies\\ 0\cdot s^{3}+0\cdot s^{2}+0\cdot s+3 \amp =\left(A+C\right)s^{3}+\left(B+D\right)s^{2}+\left(A+4C\right)s+\left(B+4D\right) \end{align*}

hence

\begin{align*} A+C \amp =0\\ B+D \amp =0\\ A+4C \amp =0\\ B+4D \amp =3 \end{align*}

and get

\begin{equation*} A=0\,\,\,\,B=-1,\,\,\,\,C=0,\,\,\,D=1 \end{equation*}

hence

\begin{equation*} \frac{3}{\left(s^{2}+4\right)\left(s^{2}+1\right)}=\frac{-1}{s^{2}+4}+\frac{1}{s^{2}+1} \end{equation*}

Step 3: Take the inverse Laplace transform: Using \(\mathcal{L}\left[u_{a}(t)f(t-a)\right]=e^{-as}F(s)\text{,}\) and \(\mathcal{L}\left\{ \sin(at)\right\} =\frac{a}{s^{2}+a^{2}}\) and \(\mathcal{L}\left\{ \cos(at)\right\} =\frac{a}{s^{2}+a^{2}}\) we have

\begin{align*} y \amp =\mathcal{L}^{-1}\left\{ \frac{-e^{-5s}}{s^{2}+4}+\frac{e^{-5s}}{s^{2}+1}+\frac{s}{s^{2}+4}\right\} \\ \amp =-\frac{1}{2}\mathcal{L}^{-1}\left\{ \frac{2e^{-5s}}{s^{2}+2^{2}}\right\} +\mathcal{L}^{-1}\left\{ \frac{e^{-5s}}{s^{2}+1}\right\} +\mathcal{L}^{-1}\left\{ \frac{s}{s^{2}+4}\right\} \\ \amp =-\frac{1}{2}u_{5}(t)\sin\left(2\left(t-5\right)\right)+u_{5}(t)\sin\left(t-5\right)+\cos\left(2t\right) \end{align*}

Solve using Laplace Transforms:

\begin{equation*} y^{(4)}-y=u_{1}(t)-u_{2}(t),\,\,\,\,\,y(0)=0,y^{\prime}(0)=0,y^{\prime\prime}(0)=0.,y^{\prime\prime\prime}(0)=0.. \end{equation*}

Step 1: Take \(\mathcal{L}\) of both sides and solve for \(\mathcal{L}\)

\begin{equation*} \mathcal{L}\left\{ y^{(4)}\right\} -\mathcal{L}\left\{ y\right\} =\mathcal{L}\left\{ u_{1}(t)-u_{2}(t)\right\} \end{equation*}

hence

\begin{align*} \amp s^{4}\mathcal{L}\left\{ y\right\} -s^{3}y(0)-s^{2}y^{\prime}(0)-sy^{\prime\prime}(0)-sy^{\prime\prime\prime}-y^{\prime}(0)-\mathcal{L}\left\{ y\right\}\\ \amp =\frac{e^{-s}}{s}-\frac{e^{-2s}}{s}\implies\\ \left(s^{4}-1\right)\mathcal{L}\left\{ y\right\} \amp =\frac{e^{-s}}{s}-\frac{e^{-2s}}{s},\implies\\ \mathcal{L}\left\{ y\right\} \amp =\frac{e^{-s}}{s\left(s^{4}-1\right)}-\frac{e^{-2s}}{s\left(s^{4}-1\right)} \end{align*}

Step 2: We do partial fractions on

\begin{equation*} \frac{1}{s\left(s^{4}-1\right)}=\frac{1}{s\left(s^{2}-1\right)\left(s^{2}+1\right)}=\frac{1}{s\left(s+1\right)\left(s-1\right)\left(s^{2}+1\right)}= \end{equation*}

hence

\begin{equation*} \frac{1}{s\left(s^{4}-1\right)}=\frac{A}{s}+\frac{B}{s+1}+\frac{C}{s-1}+\frac{Ds+E}{s^{2}+1} \end{equation*}

after doing the work to get the partial fractions you get

\begin{equation*} \frac{1}{s\left(s^{4}-1\right)}=-\frac{1}{s}+\frac{1}{4}\frac{1}{s+1}+\frac{1}{4}\frac{1}{s-1}+\frac{1}{2}\frac{s}{s^{2}+1} \end{equation*}

putting it back we need to take the inverse of

\begin{align*} \amp e^{-s}\left[-\frac{1}{s}+\frac{1}{4}\frac{1}{s+1}+\frac{1}{4}\frac{1}{s-1}+\frac{1}{2}\frac{s}{s^{2}+1}\right]\\ \amp -e^{-2s}\left[-\frac{1}{s}+\frac{1}{4}\frac{1}{s+1}+\frac{1}{4}\frac{1}{s-1}+\frac{1}{2}\frac{s}{s^{2}+1}\right] \end{align*}

Step 3: Take the inverse Laplace transform: Using \(\mathcal{L}\left[u_{a}(t)f(t-a)\right]=e^{-as}F(s)\text{,}\) and \(\mathcal{L}\left\{ \cos(at)\right\} =\frac{a}{s^{2}+a^{2}}\) and \(\mathcal{L}\left\{ e^{at}\right\} =\frac{1}{s-a}\) we have

\begin{align*} y \amp =\mathcal{L}^{-1}\left\{ e^{-s}\left[-\frac{1}{s}+\frac{1}{4}\frac{1}{s+1}+\frac{1}{4}\frac{1}{s-1}+\frac{1}{2}\frac{s}{s^{2}+1}\right]\right\} \\ \amp -\mathcal{L}^{-1}\left\{ e^{-2s}\left[-\frac{1}{s}+\frac{1}{4}\frac{1}{s+1}+\frac{1}{4}\frac{1}{s-1}+\frac{1}{2}\frac{s}{s^{2}+1}\right]\right\} \\ \amp =-u_{1}(t)+u_{1}(t)\left[\frac{1}{4}e^{-1\left(t-1\right)}+\frac{1}{4}e^{1\left(t-1\right)}+\frac{1}{2}\cos\left(t-1\right)\right]\\ \amp +u_{2}(t)-u_{2}(t)\left\{ \frac{1}{4}e^{-1\left(t-2\right)}+\frac{1}{4}e^{1\left(t-2\right)}+\frac{1}{2}\cos\left(t-2\right)\right\} \end{align*}

Find the Laplace transform of

\begin{equation*} f(t)=\begin{cases} t \amp 0\leq t\lt 1\\ 3t \amp 1\leq t\lt\infty \end{cases}. \end{equation*}

Step 1: First let us rewrite this in terms of unit step functions. When \(0\leq t\lt 1\text{:}\) the function is \(f(t)=t\) When \(1\leq t\lt \infty\text{:}\) then function is \(f(t)=t+?\cdot u_{1}(t)=3t\) hence \(?=2t\) so that

\begin{equation*} f(t)=t+2tu_{1}(t). \end{equation*}

Step 2: Before we can take a Laplace transform, we notice that our fomula involves \(\mathcal{L}\left\{ u_{c}(t)g\left(t-c\right)\right\} =e^{-ct}\mathcal{L}\left\{ g(t)\right\} \text{.}\) Thus we will need to turn \(2tu_{1}(t)\) into this form:

\begin{align*} f(t) \amp =t+2tu_{1}(t)\\ \amp =t+2\left(t-\boldsymbol{1}\right)u_{1}(t)+\boldsymbol{2u_{1}(t)} \end{align*}

hence

\begin{align*} \mathcal{L}\left\{ f(t)\right\} \amp =\mathcal{L}\left\{ t\right\} +2\mathcal{L}\left\{ (t-1)u_{1}(t)\right\} +2\mathcal{L}\left\{ u_{1}(t)\right\} \\ \amp =\frac{1}{s^{2}}+2e^{-s}\frac{1}{s^{2}}+2e^{-s}\frac{1}{s}. \end{align*}

We now introduce the following useful formula that is not included in the table, which records the translation of a step function:

Take the Laplace transform of \(f(t)=u_{1}(t)te^{t}\text{.}\)

Notice that we cannot use the formula \(\mathcal{L}\left\{ u_{c}(t)g\left(t-c\right)\right\} =e^{-ct}\mathcal{L}\left\{ g(t)\right\} \) directly since \(te^{t}\) is not written as a function of \((t-1)\text{.}\) Hence we'll need to use \(\mathcal{L}\left\{ u_{c}(t)h(t)\right\} =e^{-cs}\mathcal{L}\left\{ h\left(t+c\right)\right\} \) with \(h(t)=te^{t}\) and \(c=1\text{.}\) Thus

\begin{equation*} h\left(t+1\right)=(t+1)e^{t+1} \end{equation*}

and we get

\begin{align*} \mathcal{L}\left\{ u_{1}(t)te^{t}\right\} \amp =e^{-cs}\mathcal{L}\left\{ h\left(t+c\right)\right\} \\ \amp =e^{-s}\mathcal{L}\left\{ (t+1)e^{t+1}\right\} \\ \amp =e^{-s}\mathcal{L}\left\{ te^{t}e+e^{t}e\right\} \\ \amp =e^{-s}\left(e\mathcal{L}\left\{ te^{t}\right\} +e\mathcal{L}\left\{ e^{t}\right\} \right)\\ \amp =e^{1-s}\left(\frac{1}{\left(s-1\right)^{2}}+\frac{1}{\left(s-1\right)}\right) \end{align*}

where we used formula \(2\) and \(11\) in the table.