7.6 problem 23

Internal problem ID [5699]

Book: ADVANCED ENGINEERING MATHEMATICS. ERWIN KREYSZIG, HERBERT KREYSZIG, EDWARD J. NORMINTON. 10th edition. John Wiley USA. 2011
Section: Chapter 6. Laplace Transforms. Problem set 6.3, page 224
Problem number: 23.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

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

\[ y \left (t \right ) = {\mathrm e}^{t}-\left (\left \{\begin {array}{cc} \sin \left (t \right ) & t <2 \pi \\ \frac {\sin \left (2 t \right )}{2} & 2 \pi \le t \end {array}\right .\right ) \]

Solution by Mathematica

Time used: 0.058 (sec). Leaf size: 55

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

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} \frac {e^{-2 t}}{3}+\frac {2 e^t}{3} & t\leq 0 \\ e^t-\sin (t) & 0<t\leq 2 \pi \\ e^t-\cos (t) \sin (t) & \text {True} \\ \end {array} \\ \end {array} \]