76.20.7 problem 7

Internal problem ID [17755]
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 : 7
Date solved : Tuesday, January 28, 2025 at 11:02:16 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 11.219 (sec). Leaf size: 22

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

Solution by Mathematica

Time used: 0.021 (sec). Leaf size: 21

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