1.3.9 Example 9  \(ty^{\prime }+y=t,y(1)=1\)

This is the same example as above, but with \(y(1)=1\) instead of homogeneous IC \(y\left ( 1\right ) =0\).

\begin{align*} ty^{\prime }+y & =t\\ y\left ( 1\right ) & =1 \end{align*}

Applying change of variables to make the IC at zero. Let \(\tau =t-1\) the ode becomes

\begin{align*} \left ( \tau +1\right ) y^{\prime }\left ( \tau \right ) +y\left ( \tau \right ) & =\tau +1\\ y^{\prime }\left ( \tau \right ) +\tau y^{\prime }\left ( \tau \right ) +y\left ( \tau \right ) & =\tau +1\\ y\left ( 0\right ) & =1 \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*} \left ( sY-y\left ( 0\right ) \right ) +\left ( -1\right ) \frac {d}{ds}\left ( sY-y\left ( 0\right ) \right ) +Y & =\frac {s+1}{s^{2}}\\ sY-y\left ( 0\right ) -\left ( Y+s\frac {dY}{ds}\right ) +Y & =\frac {s+1}{s^{2}}\\ sY-1-Y-s\frac {dY}{ds}+Y & =\frac {s+1}{s^{2}}\\ sY-s\frac {d}{ds}Y & =\frac {s+1}{s^{2}}+1\\ \frac {d}{ds}Y-Y & =-\frac {s+1}{s^{3}}-\frac {1}{s}\end{align*}

The above is linear ode. Solving it gives

\begin{equation} Y=\frac {1}{2s^{2}}+\frac {1}{2s}+\frac {e^{s}\operatorname {Ei}\left ( 1,s\right ) }{2}+c_{1}e^{s} \tag {1}\end{equation}

Taking the inverse Laplace gives

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

Applying IC \(y\left ( 0\right ) =1\) gives

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

Hence (2) becomes

\[ y\left ( \tau \right ) =\frac {\tau }{2}+\frac {1}{2}+\frac {1}{2\left ( 1+\tau \right ) }\]

Going back to \(t\) using \(\tau =t-1\) the above becomes

\begin{align*} y\left ( t\right ) & =\frac {t-1}{2}+\frac {1}{2}+\frac {1}{2t}\\ & =\frac {t}{2}+\frac {1}{2t}\end{align*}