14.15 problem Problem 41

Internal problem ID [2372]

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 )=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.078 (sec). Leaf size: 68

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 {{\mathrm e}^{t} \cos \left (t \right ) \sin \left (t \right )}{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.241 (sec). Leaf size: 90

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]
 

\begin{align*} y(t)\to {cc} \{ & {cc} \frac {1}{5} \left (\cos (t)+2 \sin (t)-e^t (\cos (2 t)+\cos (t) \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)+e^t \left (-2-3 e^{-\pi /2}\right ) \sin (2 t)+4\right ) & \text {True} \\ \\ \\ \\ \\ \end{align*}