8.2 problem 2
Internal
problem
ID
[7348]
Book
:
DIFFERENTIAL
EQUATIONS
with
Boundary
Value
Problems.
DENNIS
G.
ZILL,
WARREN
S.
WRIGHT,
MICHAEL
R.
CULLEN.
Brooks/Cole.
Boston,
MA.
2013.
8th
edition.
Section
:
CHAPTER
7
THE
LAPLACE
TRANSFORM.
EXERCISES
7.5.
Page
315
Problem
number
:
2
Date
solved
:
Friday, October 11, 2024 at 08:07:49 AM
CAS
classification
:
[[_linear, `class A`]]
Solve
\begin{align*} y^{\prime }+y&=\delta \left (t -1\right ) \end{align*}
With initial conditions
\begin{align*} y \left (0\right )&=2 \end{align*}
Solving using the Laplace transform method. Let
\[ \mathcal {L}\left (y\right ) =Y(s) \]
Taking the Laplace transform of the ode
and using the relations that
\begin{align*} \mathcal {L}\left (y^{\prime }\right )&= s Y(s) - y \left (0\right ) \end{align*}
The given ode now becomes an algebraic equation in the Laplace domain
\begin{align*} s Y \left (s \right )-y \left (0\right )+Y \left (s \right ) = {\mathrm e}^{-s}\tag {1} \end{align*}
Replacing initial condition gives
\begin{align*} s Y \left (s \right )-2+Y \left (s \right ) = {\mathrm e}^{-s} \end{align*}
Solving for \(Y(s)\) gives
\begin{align*} Y(s) = \frac {{\mathrm e}^{-s}+2}{s +1} \end{align*}
Taking the inverse Laplace transform gives
\begin{align*} y&= \mathcal {L}^{-1}\left (Y(s)\right )\\ &= \mathcal {L}^{-1}\left (\frac {{\mathrm e}^{-s}+2}{s +1}\right )\\ &= \operatorname {Heaviside}\left (t -1\right ) {\mathrm e}^{-t +1}+2 \,{\mathrm e}^{-t} \end{align*}
Converting the above solution to piecewise it becomes
\[
y = \left \{\begin {array}{cc} 2 \,{\mathrm e}^{-t} & t <1 \\ 2 \,{\mathrm e}^{-t}+{\mathrm e}^{-t +1} & 1\le t \end {array}\right .
\]
8.2.1 Maple step by step solution
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [\frac {d}{d t}y \left (t \right )+y \left (t \right )=\mathit {Dirac}\left (t -1\right ), y \left (0\right )=2\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d t}y \left (t \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d t}y \left (t \right )=-y \left (t \right )+\mathit {Dirac}\left (t -1\right ) \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y \left (t \right )\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & \frac {d}{d t}y \left (t \right )+y \left (t \right )=\mathit {Dirac}\left (t -1\right ) \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (t \right ) \\ {} & {} & \mu \left (t \right ) \left (\frac {d}{d t}y \left (t \right )+y \left (t \right )\right )=\mu \left (t \right ) \mathit {Dirac}\left (t -1\right ) \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d t}\left (y \left (t \right ) \mu \left (t \right )\right ) \\ {} & {} & \mu \left (t \right ) \left (\frac {d}{d t}y \left (t \right )+y \left (t \right )\right )=\left (\frac {d}{d t}y \left (t \right )\right ) \mu \left (t \right )+y \left (t \right ) \left (\frac {d}{d t}\mu \left (t \right )\right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \frac {d}{d t}\mu \left (t \right ) \\ {} & {} & \frac {d}{d t}\mu \left (t \right )=\mu \left (t \right ) \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (t \right )={\mathrm e}^{t} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \left (\frac {d}{d t}\left (y \left (t \right ) \mu \left (t \right )\right )\right )d t =\int \mu \left (t \right ) \mathit {Dirac}\left (t -1\right )d t +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \left (t \right ) \mu \left (t \right )=\int \mu \left (t \right ) \mathit {Dirac}\left (t -1\right )d t +\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (t \right ) \\ {} & {} & y \left (t \right )=\frac {\int \mu \left (t \right ) \mathit {Dirac}\left (t -1\right )d t +\mathit {C1}}{\mu \left (t \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (t \right )={\mathrm e}^{t} \\ {} & {} & y \left (t \right )=\frac {\int {\mathrm e}^{t} \mathit {Dirac}\left (t -1\right )d t +\mathit {C1}}{{\mathrm e}^{t}} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y \left (t \right )=\frac {\mathit {Heaviside}\left (t -1\right ) {\mathrm e}+\mathit {C1}}{{\mathrm e}^{t}} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y \left (t \right )={\mathrm e}^{-t} \left (\mathit {Heaviside}\left (t -1\right ) {\mathrm e}+\mathit {C1} \right ) \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=2 \\ {} & {} & 2=\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} \textit {\_C1} \\ {} & {} & \mathit {C1} =2 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \textit {\_C1} =2\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y \left (t \right )={\mathrm e}^{-t} \left (\mathit {Heaviside}\left (t -1\right ) {\mathrm e}+2\right ) \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y \left (t \right )={\mathrm e}^{-t} \left (\mathit {Heaviside}\left (t -1\right ) {\mathrm e}+2\right ) \end {array} \]
8.2.2 Maple trace
` Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful `
8.2.3 Maple dsolve solution
Solving time : 0.116
(sec)
Leaf size : 22
dsolve ([ diff ( y ( t ), t )+ y ( t ) = Dirac ( t -1),
op ([ y (0) = 2])],
y(t),method=laplace)
\[
y = \operatorname {Heaviside}\left (t -1\right ) {\mathrm e}^{1-t}+2 \,{\mathrm e}^{-t}
\]
8.2.4 Mathematica DSolve solution
Solving time : 0.027
(sec)
Leaf size : 19
DSolve [{ D [ y [ t ], t ]+ y [ t ]== DiracDelta [ t -1],{ y [0]==2}},
y[t],t,IncludeSingularSolutions-> True ]
\[
y(t)\to e^{-t} (e \theta (t-1)+2)
\]