3.3.26.2 Examples with constant coefficients
3.3.26.2.1 Example 1 IC \(y(0)=3\)
\begin{align*} y^{\prime }-2y & =6e^{5t}\\ y\left ( 0\right ) & =3 \end{align*}
Taking the Laplace transform gives
\begin{align*}\mathcal {L}\left ( y\right ) & =Y\left ( s\right ) \\\mathcal {L}\left ( y^{\prime }\right ) & =sY\left ( s\right ) -y\left ( 0\right ) \\\mathcal {L}\left ( 6e^{5t}\right ) & =\frac {6}{s-5}\end{align*}
The ode becomes
\begin{align*} sY\left ( s\right ) -y\left ( 0\right ) -2Y\left ( s\right ) & =\frac {6}{s-5}\\ Y\left ( s\right ) \left ( s-2\right ) -y\left ( 0\right ) & =\frac {6}{s-5}\\ Y\left ( s\right ) \left ( s-2\right ) & =\frac {6}{s-5}+y\left ( 0\right ) \\ Y\left ( s\right ) \left ( s-2\right ) & =\frac {6}{s-5}+3\\ Y\left ( s\right ) \left ( s-2\right ) & =\frac {6+3\left ( s-5\right ) }{s-5}\\ Y\left ( s\right ) \left ( s-2\right ) & =\frac {3s-9}{s-5}\\ Y\left ( s\right ) & =\frac {3s-9}{\left ( s-5\right ) \left ( s-2\right ) }\\ & =\frac {2}{s-5}+\frac {1}{s-2}\end{align*}
Applying inverse Laplace transform and using \(\mathcal {L}^{-1}\left ( \frac {2}{s-5}\right ) =2e^{5t},\mathcal {L}^{-1}\left ( \frac {1}{s-2}\right ) =e^{2t}\) then the above gives
\[ y\left ( t\right ) =2e^{5t}+e^{2t}\]
3.3.26.2.2 Example 2 IC \(y(-1)=4\)
\begin{align*} y^{\prime }-6y & =0\\ y\left ( -1\right ) & =4 \end{align*}
There are two ways to solve an ode using Laplace transform when IC are not at zero. Either
we do change of variables to shift the IC to zero, or solve as is. Both methods are shown
below.
method 1 (no change of variable)
Taking the Laplace transform of the ode gives
\begin{align*}\mathcal {L}\left ( y\right ) & =Y\left ( s\right ) \\\mathcal {L}\left ( y^{\prime }\right ) & =sY\left ( s\right ) -y\left ( 0\right ) \end{align*}
The ode becomes
\[ sY-y\left ( 0\right ) -6Y=0 \]
Solving for \(Y\) gives
\begin{align*} Y\left ( s-6\right ) -y\left ( 0\right ) & =0\\ Y & =\frac {y\left ( 0\right ) }{s-6}\end{align*}
Taking inverse Laplace transform gives
\begin{equation} y\left ( t\right ) =y\left ( 0\right ) e^{6t} \tag {1}\end{equation}
Now we need to find \(y\left ( 0\right ) \,\), for this, we use the given IC \(y\left ( -1\right ) =4\).
The above becomes
\begin{align*} 4 & =y\left ( 0\right ) e^{-6}\\ y\left ( 0\right ) & =4e^{6}\end{align*}
Hence (1) becomes
\begin{align*} y\left ( t\right ) & =4e^{6}e^{6t}\\ & =4e^{6t+6}\end{align*}
method 2 (change of variable)
Let
\[ \tau =t+1 \]
The ode \(y^{\prime }-6y=0\) becomes
\begin{align*} y^{\prime }\left ( \tau \right ) -6y\left ( \tau \right ) & =0\\ y\left ( 0\right ) & =4 \end{align*}
Taking Laplace transform gives
\begin{align*} sY-y\left ( 0\right ) -6Y & =0\\ sY-4-6Y & =0\\ Y & =\frac {4}{s-6}\end{align*}
The inverse Laplace transform is
\[ y\left ( \tau \right ) =4e^{6\tau }\]
Changing back to \(t\) the above becomes
\[ y\left ( t\right ) =4e^{6\left ( t+1\right ) }\]
Which
is the same answer as before. The change of variable method seems to be more
common.
3.3.26.2.3 Example 3 IC \(y(1)=y_{0}\)
\begin{align*} y^{\prime }+y & =\sin \left ( t\right ) \\ y\left ( 1\right ) & =y_{0}\end{align*}
There are two ways to solve an ode using Laplace transform when IC are not at zero. Either
we do change of variables to shift the IC to zero, or solve as is. Both methods are shown
below.
method 1 (no change of variable)
Taking the Laplace transform of the ode gives
\begin{align*}\mathcal {L}\left ( y\right ) & =Y\left ( s\right ) \\\mathcal {L}\left ( y^{\prime }\right ) & =sY\left ( s\right ) -y\left ( 0\right ) \\\mathcal {L}\left ( \sin t\right ) & =\frac {1}{1+s^{2}}\end{align*}
The ode becomes
\[ sY-y\left ( 0\right ) +Y=\frac {1}{1+s^{2}}\]
Solving for \(Y\) gives
\begin{align*} Y\left ( s+1\right ) -y\left ( 0\right ) & =\frac {1}{1+s^{2}}\\ Y & =\frac {\frac {1}{1+s^{2}}+y\left ( 0\right ) }{s+1}\\ & =\frac {1}{\left ( 1+s^{2}\right ) \left ( s+1\right ) }+\frac {y\left ( 0\right ) }{s+1}\end{align*}
Taking inverse Laplace transform gives
\begin{equation} y\left ( t\right ) =\frac {e^{-t}}{2}\left ( 2y\left ( 0\right ) +1\right ) -\frac {1}{2}\cos t+\frac {1}{2}\sin t \tag {1}\end{equation}
Now we need to find \(y\left ( 0\right ) \,\), for this, we use the original
given IC \(y\left ( 1\right ) =y_{0}\). The above becomes
\begin{align*} y_{0} & =\frac {e^{-1}}{2}\left ( 2y\left ( 0\right ) +1\right ) -\frac {1}{2}\cos 1+\frac {1}{2}\sin 1\\ y_{0}+\frac {1}{2}\cos 1-\frac {1}{2}\sin 1 & =\frac {e^{-1}}{2}\left ( 2y\left ( 0\right ) +1\right ) \\ 2e\left ( y_{0}+\frac {1}{2}\cos 1-\frac {1}{2}\sin 1\right ) & =\left ( 2y\left ( 0\right ) +1\right ) \\ y\left ( 0\right ) & =e\left ( y_{0}+\frac {1}{2}\cos 1-\frac {1}{2}\sin 1\right ) -\frac {1}{2}\end{align*}
Hence (1) becomes
\begin{align*} y\left ( t\right ) & =\frac {e^{-t}}{2}\left ( 2\left ( e\left ( y_{0}+\frac {1}{2}\cos 1-\frac {1}{2}\sin 1\right ) -\frac {1}{2}\right ) +1\right ) -\frac {1}{2}\cos t+\frac {1}{2}\sin t\\ & =e^{1-t}\left ( y_{0}+\frac {1}{2}\cos 1-\frac {1}{2}\sin 1\right ) -\frac {1}{2}\cos t+\frac {1}{2}\sin t\\ & =\frac {1}{2}e^{1-t}\left ( 2y_{0}+\cos 1-\sin 1\right ) -\frac {1}{2}\cos t+\frac {1}{2}\sin t \end{align*}
method 2 (change of variable)
Let
\[ \tau =t-1 \]
The ode\(\ y^{\prime }+y=\sin \left ( t\right ) \) becomes
\begin{align*} y^{\prime }\left ( \tau \right ) +y\left ( \tau \right ) & =\sin \left ( \tau +1\right ) \\ y\left ( 0\right ) & =y_{0}\end{align*}
Taking Laplace transform gives
\begin{align*} sY-y\left ( 0\right ) +Y & =\frac {\sin \left ( 1\right ) s+\cos \left ( 1\right ) }{1+s^{2}}\\ Y\left ( 1+s\right ) & =\frac {\sin \left ( 1\right ) s+\cos \left ( 1\right ) }{1+s^{2}}+y_{0}\\ Y & =\frac {\sin \left ( 1\right ) s+\cos \left ( 1\right ) }{\left ( 1+s^{2}\right ) \left ( 1+s\right ) }+\frac {y_{0}}{1+s}\end{align*}
The inverse Laplace transform is
\[ y\left ( \tau \right ) =\frac {1}{2}e^{-\tau }\left ( 2y_{0}+\cos 1-\sin 1\right ) +\frac {\cos 1}{2}\left ( \sin \tau -\cos \tau \right ) +\frac {\sin 1}{2}\left ( \sin \tau +\cos \tau \right ) \]
Finally, changing back to \(t\) the above becomes
\[ y\left ( t\right ) =\frac {1}{2}e^{1-t}\left ( 2y_{0}+\cos 1-\sin 1\right ) +\frac {\cos 1}{2}\left ( \sin \left ( t-1\right ) -\cos \left ( t-1\right ) \right ) +\frac {\sin 1}{2}\left ( \sin \left ( t-1\right ) +\cos \left ( t-1\right ) \right ) \]
Which
simplifies to
\[ y\left ( t\right ) =\frac {1}{2}e^{1-t}\left ( 2y_{0}+\cos 1-\sin 1\right ) -\frac {1}{2}\cos t+\frac {1}{2}\sin t \]
Which is the same answer as before.