20.22.11 problem Problem 37

Internal problem ID [3966]
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 37
Date solved : Monday, January 27, 2025 at 08:05:20 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y&=t -\operatorname {Heaviside}\left (t -1\right ) \left (t -1\right ) \end{align*}

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=2\\ y^{\prime }\left (0\right )&=1 \end{align*}

Solution by Maple

Time used: 2.902 (sec). Leaf size: 24

dsolve([diff(y(t),t$2)+y(t)=t-Heaviside(t-1)*(t-1),y(0) = 2, D(y)(0) = 1],y(t), singsol=all)
 
\[ y = \left (-t +\sin \left (-1+t \right )+1\right ) \operatorname {Heaviside}\left (-1+t \right )+t +2 \cos \left (t \right ) \]

Solution by Mathematica

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

DSolve[{D[y[t],{t,2}]+y[t]==t-UnitStep[t-1]*(t-1),{y[0]==2,Derivative[1][y][0] ==1}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} t+2 \cos (t) & t\leq 1 \\ 2 \cos (t)-\sin (1-t)+1 & \text {True} \\ \end {array} \\ \end {array} \]