67.4.15 problem Problem 3(a)

Internal problem ID [14059]
Book : APPLIED DIFFERENTIAL EQUATIONS The Primary Course by Vladimir A. Dobrushkin. CRC Press 2015
Section : Chapter 5.6 Laplace transform. Nonhomogeneous equations. Problems page 368
Problem number : Problem 3(a)
Date solved : Tuesday, January 28, 2025 at 06:13:20 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+y&=\operatorname {Heaviside}\left (t \right )-\operatorname {Heaviside}\left (t -2\right ) \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=1 \end{align*}

Solution by Maple

Time used: 9.759 (sec). Leaf size: 23

dsolve([diff(y(t),t)+y(t)=Heaviside(t)-Heaviside(t-2),y(0) = 1],y(t), singsol=all)
 
\[ y = 1-\operatorname {Heaviside}\left (t -2\right )+\operatorname {Heaviside}\left (t -2\right ) {\mathrm e}^{-t +2} \]

Solution by Mathematica

Time used: 0.062 (sec). Leaf size: 31

DSolve[{D[y[t],t]+y[t]==UnitStep[t]-UnitStep[t-2],{y[0]==1}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} 1 & 0\leq t\leq 2 \\ e^{2-t} & t>2 \\ e^{-t} & \text {True} \\ \end {array} \\ \end {array} \]