14.15 problem Problem 41

Internal problem ID [2881]

Book: Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section: Chapter 10, The Laplace Transform and Some Elementary Applications. Exercises for 10.7. page 704
Problem number: Problem 41.
ODE order: 2.
ODE degree: 1.

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

\[ \boxed {y^{\prime \prime }-2 y^{\prime }+5 y=2 \sin \left (t \right )+\operatorname {Heaviside}\left (t -\frac {\pi }{2}\right ) \left (1+\cos \left (t \right )\right )} \] With initial conditions \begin {align*} [y \left (0\right ) = 0, y^{\prime }\left (0\right ) = 0] \end {align*}

Solution by Maple

Time used: 2.515 (sec). Leaf size: 77

dsolve([diff(y(t),t$2)-2*diff(y(t),t)+5*y(t)=2*sin(t)+Heaviside(t-Pi/2)*(1-sin(t-Pi/2)),y(0) = 0, D(y)(0) = 0],y(t), singsol=all)
 

\[ y \left (t \right ) = \frac {\left (\left (2 \cos \left (t \right )^{2}-3 \cos \left (t \right ) \sin \left (t \right )-1\right ) {\mathrm e}^{t -\frac {\pi }{2}}+2 \cos \left (t \right )-\sin \left (t \right )+2\right ) \operatorname {Heaviside}\left (t -\frac {\pi }{2}\right )}{10}-\frac {2 \,{\mathrm e}^{t} \cos \left (t \right )^{2}}{5}-\frac {\sin \left (t \right ) \cos \left (t \right ) {\mathrm e}^{t}}{5}+\frac {\cos \left (t \right )}{5}+\frac {{\mathrm e}^{t}}{5}+\frac {2 \sin \left (t \right )}{5} \]

Solution by Mathematica

Time used: 0.502 (sec). Leaf size: 98

DSolve[{y''[t]-2*y'[t]+5*y[t]==2*Sin[t]+UnitStep[t-Pi/2]*(1-Sin[t-Pi/2]),{y[0]==0,y'[0]==0}},y[t],t,IncludeSingularSolutions -> True]
 

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} \frac {1}{5} \left (-e^t \sin (t) \cos (t)+\cos (t)-e^t \cos (2 t)+2 \sin (t)\right ) & 2 t\leq \pi \\ \frac {1}{20} \left (8 \cos (t)+2 e^t \left (-2+e^{-\pi /2}\right ) \cos (2 t)+6 \sin (t)-2 e^t \sin (2 t)-3 e^{t-\frac {\pi }{2}} \sin (2 t)+4\right ) & \text {True} \\ \end {array} \\ \end {array} \]