28.3.10 problem 6.45

Internal problem ID [4523]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 6. The Laplace Transform and Its Applications. Problems at page 291
Problem number : 6.45
Date solved : Monday, January 27, 2025 at 09:22:41 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 3.316 (sec). Leaf size: 38

dsolve([diff(y(t),t$2)+2*diff(y(t),t)+y(t)=2*sin(t)*Heaviside(t-Pi),y(0) = 1, D(y)(0) = 0],y(t), singsol=all)
 
\[ y = \left (\left (-t +\pi -1\right ) {\mathrm e}^{-t +\pi }-\cos \left (t \right )\right ) \operatorname {Heaviside}\left (t -\pi \right )+{\mathrm e}^{-t} \left (t +1\right ) \]

Solution by Mathematica

Time used: 0.037 (sec). Leaf size: 46

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