64.20.15 problem 15

Internal problem ID [13658]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 9, The Laplace transform. Section 9.3, Exercises page 452
Problem number : 15
Date solved : Tuesday, January 28, 2025 at 05:54:25 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y^{\prime }+5 y&=\left \{\begin {array}{cc} 1 & 0<t <\frac {\pi }{2} \\ 0 & \frac {\pi }{2}<t \end {array}\right . \end{align*}

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 15.643 (sec). Leaf size: 65

dsolve([diff(y(t),t$2)+4*diff(y(t),t)+5*y(t)=piecewise(0<t and t<Pi/2,1,t>Pi/2,0),y(0) = 0, D(y)(0) = 1],y(t), singsol=all)
 
\[ y = \frac {\left (\left \{\begin {array}{cc} 1 & t <\frac {\pi }{2} \\ -2 \cos \left (t \right ) {\mathrm e}^{-2 t +\pi }+\frac {{\mathrm e}^{\left (1+\frac {i}{2}\right ) \left (-2 t +\pi \right )}}{2}+\frac {{\mathrm e}^{\left (1-\frac {i}{2}\right ) \left (-2 t +\pi \right )}}{2} & \frac {\pi }{2}\le t \end {array}\right .\right )}{5}+\frac {{\mathrm e}^{-2 t} \left (3 \sin \left (t \right )-\cos \left (t \right )\right )}{5} \]

Solution by Mathematica

Time used: 0.047 (sec). Leaf size: 81

DSolve[{D[y[t],{t,2}]+4*D[y[t],t]+5*y[t]==Piecewise[{{1,0<t<Pi/2},{0,t>Pi/2}}],{y[0]==0,Derivative[1][y][0]==1}},{y[t]},t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} e^{-2 t} \sin (t) & t\leq 0 \\ \frac {1}{5} e^{-2 t} \left (-\cos (t)+e^{2 t}+3 \sin (t)\right ) & t>0\land 2 t\leq \pi \\ \frac {1}{5} e^{-2 t} \left (\left (3+e^{\pi }\right ) \sin (t)-\left (1+2 e^{\pi }\right ) \cos (t)\right ) & \text {True} \\ \end {array} \\ \end {array} \]