Internal problem ID [13892]
Internal file name [OUTPUT/13064_Friday_February_23_2024_06_54_28_AM_89926492/index.tex
]
Book: Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell.
second edition. CRC Press. FL, USA. 2020
Section: Chapter 31. Delta Functions. Additional Exercises. page 572
Problem number: 31.6 (b).
ODE order: 1.
ODE degree: 1.
The type(s) of ODE detected by this program : "quadrature"
Maple gives the following as the ode type
[_quadrature]
\[ \boxed {y^{\prime }=\delta \left (-2+t \right )-\delta \left (t -4\right )} \] With initial conditions \begin {align*} [y \left (0\right ) = 0] \end {align*}
This is a linear ODE. In canonical form it is written as \begin {align*} y^{\prime } + p(t)y &= q(t) \end {align*}
Where here \begin {align*} p(t) &=0\\ q(t) &=\delta \left (-2+t \right )-\delta \left (t -4\right ) \end {align*}
Hence the ode is \begin {align*} y^{\prime } = \delta \left (-2+t \right )-\delta \left (t -4\right ) \end {align*}
The domain of \(p(t)=0\) is \[
\{-\infty
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 ) = {\mathrm e}^{-2 s}-{\mathrm e}^{-4 s}\tag {1} \end {align*}
Replacing initial condition gives \begin {align*} s Y \left (s \right ) = {\mathrm e}^{-2 s}-{\mathrm e}^{-4 s} \end {align*}
Solving for \(Y(s)\) gives \begin {align*} Y(s) = \frac {{\mathrm e}^{-2 s}-{\mathrm e}^{-4 s}}{s} \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}^{-2 s}-{\mathrm e}^{-4 s}}{s}\right )\\ &= \operatorname {Heaviside}\left (-2+t \right )-\operatorname {Heaviside}\left (t -4\right ) \end {align*}
Converting the above solution to piecewise it becomes \[
y = \left \{\begin {array}{cc} 0 & t <2 \\ 1 & t <4 \\ 0 & 4\le t \end {array}\right .
\]
The solution(s) found are the following \begin{align*}
\tag{1} y &= \left \{\begin {array}{cc} 0 & t <2 \\ 1 & t <4 \\ 0 & 4\le t \end {array}\right . \\
\end{align*} Verification of solutions
\[
y = \left \{\begin {array}{cc} 0 & t <2 \\ 1 & t <4 \\ 0 & 4\le t \end {array}\right .
\] Verified OK.
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [y^{\prime }=\mathit {Dirac}\left (-2+t \right )-\mathit {Dirac}\left (t -4\right ), y \left (0\right )=0\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int y^{\prime }d t =\int \left (\mathit {Dirac}\left (-2+t \right )-\mathit {Dirac}\left (t -4\right )\right )d t +c_{1} \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & y=\mathit {Heaviside}\left (-2+t \right )-\mathit {Heaviside}\left (t -4\right )+c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \\ {} & {} & y=\mathit {Heaviside}\left (-2+t \right )-\mathit {Heaviside}\left (t -4\right )+c_{1} \\ \bullet & {} & \textrm {Use initial condition}\hspace {3pt} y \left (0\right )=0 \\ {} & {} & 0=c_{1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} c_{1} \\ {} & {} & c_{1} =0 \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} c_{1} =0\hspace {3pt}\textrm {into general solution and simplify}\hspace {3pt} \\ {} & {} & y=\mathit {Heaviside}\left (-2+t \right )-\mathit {Heaviside}\left (t -4\right ) \\ \bullet & {} & \textrm {Solution to the IVP}\hspace {3pt} \\ {} & {} & y=\mathit {Heaviside}\left (-2+t \right )-\mathit {Heaviside}\left (t -4\right ) \end {array} \]
Maple trace
✓ Solution by Maple
Time used: 5.015 (sec). Leaf size: 15
\[
y \left (t \right ) = -\operatorname {Heaviside}\left (t -4\right )+\operatorname {Heaviside}\left (t -2\right )
\]
✓ Solution by Mathematica
Time used: 0.01 (sec). Leaf size: 16
\[
y(t)\to \theta (t-2)-\theta (t-4)
\]
22.2.2 Solving as laplace ode
22.2.3 Maple step by step solution
`Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
<- quadrature successful`
dsolve([diff(y(t),t)=Dirac(t-2)-Dirac(t-4),y(0) = 0],y(t), singsol=all)
DSolve[{y'[t]==DiracDelta[t-2]-DiracDelta[t-4],{y[0]==0}},y[t],t,IncludeSingularSolutions -> True]