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]]

Solve \begin {gather*} \boxed {y^{\prime \prime }+4 y-\theta \left (-\pi +t \right )+\theta \left (-3 \pi +t \right )=0} \end {gather*} With initial conditions \begin {align*} [y \relax (0) = 0, y^{\prime }\relax (0) = 0] \end {align*}

Solution by Maple

Time used: 0.018 (sec). Leaf size: 27

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 \relax (t ) = \frac {\left (\cos \left (2 t \right )-1\right ) \left (-\theta \left (-\pi +t \right )+\theta \left (-3 \pi +t \right )\right )}{4} \]

Solution by Mathematica

Time used: 0.008 (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]
 

\begin{align*} y(t)\to {cc} \{ & {cc} \frac {\sin ^2(t)}{2} & \pi <t\leq 3 \pi \\ 0 & \text {True} \\ \\ \\ \\ \\ \end{align*}