11.4.7 problem 7

Internal problem ID [1501]
Book : Elementary differential equations and boundary value problems, 11th ed., Boyce, DiPrima, Meade
Section : Chapter 6.4, The Laplace Transform. Differential equations with discontinuous forcing functions. page 268
Problem number : 7
Date solved : Monday, January 27, 2025 at 04:58:08 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Using Laplace method With initial conditions

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

Solution by Maple

Time used: 0.297 (sec). Leaf size: 25

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

Solution by Mathematica

Time used: 0.037 (sec). Leaf size: 25

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