14.9 problem Problem 35

Internal problem ID [2366]

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 )=0} \] With initial conditions \begin {align*} [y \left (0\right ) = 1, y^{\prime }\left (0\right ) = -2] \end {align*}

Solution by Maple

Time used: 0.031 (sec). Leaf size: 48

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 {{\mathrm e}^{2 t}}{6}+\frac {5 \,{\mathrm e}^{-t}}{3}+\frac {3 \operatorname {Heaviside}\left (t -2\right )}{2}-\frac {\operatorname {Heaviside}\left (t -2\right ) {\mathrm e}^{2 t -4}}{2}-\frac {1}{2}-\operatorname {Heaviside}\left (t -2\right ) {\mathrm e}^{2-t} \]

Solution by Mathematica

Time used: 0.008 (sec). Leaf size: 65

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

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