4.7 problem 7

Internal problem ID [851]

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.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }+4 y=\operatorname {Heaviside}\left (t -\pi \right )-\operatorname {Heaviside}\left (t -3 \pi \right )} \] 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 \left (t \right ) = \frac {\left (\operatorname {Heaviside}\left (t -\pi \right )-\operatorname {Heaviside}\left (t -3 \pi \right )\right ) \sin \left (t \right )^{2}}{2} \]

Solution by Mathematica

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

DSolve[{y''[t]+4*y[t]==UnitStep[t-Pi]-UnitStep[t-3*Pi],{y[0]==0,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} \]