4.27 problem Problem 4(c)

Internal problem ID [10987]

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 4(c).
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }+3 y^{\prime }+2 y-\left (\left \{\begin {array}{cc} 1 & 0\le t <2 \\ -1 & 2\le t \end {array}\right .\right )=0} \] With initial conditions \begin {align*} [y \left (0\right ) = 0, y^{\prime }\left (0\right ) = 0] \end {align*}

Solution by Maple

Time used: 0.094 (sec). Leaf size: 61

dsolve([diff(y(t),t$2)+3*diff(y(t),t)+2*y(t)=piecewise(0<=t and t<2,1,t>=2,-1),y(0) = 0, D(y)(0) = 0],y(t), singsol=all)
 

\[ y \left (t \right ) = -\frac {\left (\left \{\begin {array}{cc} 0 & t <0 \\ -1+2 \,{\mathrm e}^{-t}-{\mathrm e}^{-2 t} & t <2 \\ 1+2 \,{\mathrm e}^{-t}-{\mathrm e}^{-2 t}-4 \,{\mathrm e}^{-t +2}+2 \,{\mathrm e}^{-2 t +4} & 2\le t \end {array}\right .\right )}{2} \]

Solution by Mathematica

Time used: 0.011 (sec). Leaf size: 59

DSolve[{y''[t]+3*y'[t]+2*y[t]==Piecewise[{{1,0<=t<2},{-1,t>=2}}],{y[0]==0,y'[0]==0}},y[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} y(t)\to {cc} \{ & {cc} 0 & t\leq 0 \\ \frac {1}{2} e^{-2 t} \left (-1+e^t\right )^2 & 0<t\leq 2 \\ \left (\sinh (t)+e^{4-t}-2 e^2+1\right ) (\sinh (t)-\cosh (t)) & \text {True} \\ \\ \\ \\ \\ \end{align*}