76.20.12 problem 12

Internal problem ID [17760]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 5. The Laplace transform. Section 5.6 (Differential equations with Discontinuous Forcing Functions). Problems at page 342
Problem number : 12
Date solved : Tuesday, January 28, 2025 at 11:02:22 AM
CAS classification : [[_high_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

\begin{align*} y \left (0\right )&=12\\ y^{\prime }\left (0\right )&=7\\ y^{\prime \prime }\left (0\right )&=2\\ y^{\prime \prime \prime }\left (0\right )&=-9 \end{align*}

Solution by Maple

Time used: 13.770 (sec). Leaf size: 57

dsolve([diff(y(t),t$4)-y(t)=Heaviside(t-1)-Heaviside(t-2),y(0) = 12, D(y)(0) = 7, (D@@2)(y)(0) = 2, (D@@3)(y)(0) = -9],y(t), singsol=all)
 
\[ y = \frac {\left (2-\cos \left (t -2\right )-\cosh \left (t -2\right )\right ) \operatorname {Heaviside}\left (t -2\right )}{2}+\frac {\operatorname {Heaviside}\left (t -1\right ) \left (-2+\cos \left (t -1\right )+\cosh \left (t -1\right )\right )}{2}+5 \cos \left (t \right )+8 \sin \left (t \right )+7 \cosh \left (t \right )-\sinh \left (t \right ) \]

Solution by Mathematica

Time used: 0.105 (sec). Leaf size: 154

DSolve[{D[y[t],{t,4}]-y[t]==UnitStep[t-1]-UnitStep[t-2],{y[0]==12,Derivative[1][y][0] ==7,Derivative[2][y][0] ==2,Derivative[3][y][0] ==-9}},y[t],t,IncludeSingularSolutions -> True]
 
\[ y(t)\to \begin {array}{cc} \{ & \begin {array}{cc} 5 \cos (t)+4 e^{-t}+3 e^t+8 \sin (t) & t\leq 1 \\ \frac {1}{4} \left (2 \cos (1-t)+e^{1-t}+e^{t-1}+16 e^{-t}+12 e^t+20 \cos (t)+32 \sin (t)-4\right ) & 1<t\leq 2 \\ \frac {1}{4} \left (2 \cos (1-t)+e^{1-t}-e^{2-t}-e^{t-2}+e^{t-1}+16 e^{-t}+12 e^t-2 \cos (2-t)+20 \cos (t)+32 \sin (t)\right ) & \text {True} \\ \end {array} \\ \end {array} \]