14.9 problem Problem 35

Internal problem ID [2875]

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 35.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

Time used: 2.218 (sec). Leaf size: 50

dsolve([diff(y(t),t$2)-diff(y(t),t)-2*y(t)=1-3*Heaviside(t-2),y(0) = 1, D(y)(0) = -2],y(t), singsol=all)
 

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

Solution by Mathematica

Time used: 0.029 (sec). Leaf size: 70

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

\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} -\frac {1}{6} e^{-t} \left (-10+3 e^t+e^{3 t}\right ) & t\leq 2 \\ \frac {1}{6} \left (6-6 e^{2-t}+10 e^{-t}-e^{2 t}-3 e^{2 t-4}\right ) & \text {True} \\ \end {array} \\ \end {array} \]