1.3.6 Example 6 \(ty^{\prime }+y=0,y\left ( 1\right ) =5\)
\begin{align*} ty^{\prime }+y & =0\\ y\left ( 1\right ) & =5 \end{align*}

method 1

Since IC given is not at zero, change of variables must be made so that the IC at zero. Let \(\tau =t-1\) then the ode becomes

\begin{align*} \left ( 1+\tau \right ) y^{\prime }\left ( \tau \right ) +y\left ( \tau \right ) & =0\\ y^{\prime }\left ( \tau \right ) +\tau y^{\prime }\left ( \tau \right ) +y\left ( \tau \right ) & =0\\ y\left ( 0\right ) & =5 \end{align*}

Converting the above new ode to Laplace domain using

\[\mathcal {L}\left ( tf\left ( \tau \right ) \right ) =-\frac {d}{ds}F\left ( s\right ) \]

Gives (using \(Y\left ( s\right ) \) as the Laplace of \(y\left ( \tau \right ) \))

\begin{align*} sY-y\left ( 0\right ) +\left ( -1\right ) \frac {d}{ds}\left ( sY-y\left ( 0\right ) \right ) +Y & =0\\ sY-y\left ( 0\right ) -\left ( Y+s\frac {d}{ds}Y\right ) +Y & =0\\ sY-5-Y-s\frac {d}{ds}Y+Y & =0\\ sY-s\frac {d}{ds}Y & =5\\ \frac {d}{ds}Y-Y & =-\frac {5}{s}\end{align*}

The solution is

\[ Y=c_{1}e^{s}+\left ( 5\operatorname {Ei}\left ( s\right ) \right ) e^{s}\]

Taking inverse Laplace transform gives

\begin{align} y\left ( \tau \right ) & =c_{1}\mathcal {L}^{-1}\left ( e^{s},s,\tau \right ) +\mathcal {L}^{-1}\left ( \left ( 5\operatorname {Ei}\left ( s\right ) \right ) e^{s}\right ) \tag {1}\\ & =c_{1}\mathcal {L}^{-1}\left ( e^{s},s,\tau \right ) +\frac {5}{1+\tau }\nonumber \end{align}

Applying IC \(y\left ( 0\right ) =5\) the above becomes

\begin{align*} 5 & =c_{1}\mathcal {L}^{-1}\left ( e^{s},s,0\right ) +5\\ 0 & =c_{1}\mathcal {L}^{-1}\left ( e^{s},s,0\right ) \end{align*}

Hence

\[ c_{1}=0 \]

Therefore the solution (1) becomes

\begin{equation} y\left ( \tau \right ) =\frac {5}{1+\tau } \tag {2}\end{equation}

Converting back to \(t\) the above becomes

\[ y\left ( t\right ) =\frac {5}{t}\]

Note that this ode can be solved much more easily but not using Laplace transform. Let see how. The given ode is

\[ y^{\prime }+\frac {y}{t}=0\hspace {0.5in}t\neq 0 \]

This is linear ode, its solution can be easily found as

\[ y=\frac {1}{t}c_{1}\]

Applying IC

\begin{align*} 5 & =\frac {1}{1}c_{1}\\ c_{1} & =5 \end{align*}

Hence the solution is

\[ y=\frac {5}{t}\]

method 2

This method shows what happens in the case of time varying ode whose IC is not at zero, and if we do not do change of variables as was done above.

Taking Laplace transform of original ode \(ty^{\prime }+y=0\) gives

\begin{align*} -\frac {d}{ds}\left ( sY-y\left ( 0\right ) \right ) +Y & =0\\ -\left ( Y+s\frac {dY}{ds}\right ) +Y & =0\\ -s\frac {dY}{ds} & =0\\ \frac {dY}{ds} & =0 \end{align*}

Hence

\[ Y=c_{1}\]

Taking inverse Laplace transform gives

\begin{equation} y\left ( t\right ) =c_{1}\delta \left ( t\right ) \tag {1}\end{equation}

Applying IC \(y\left ( 1\right ) =5\) to the above

\begin{align*} 5 & =c_{1}\delta \left ( 1\right ) \\ c_{1} & =\frac {5}{\delta \left ( 1\right ) }\end{align*}

Which is off course is not valid, since \(\delta \left ( 1\right ) =0\). This shows that time varying ode, using Laplace transform, we must apply change of variables (as done in method 1) first. Notice that for constant coefficients, both methods work OK. See example above under constant coefficient for problem where IC was not at zero.

So to be consistent, it seems better to stick to one method which works for both time varying and constant coefficients, which is to do change of variables if the IC is given and it is not at zero.