5.11 problem 12

Internal problem ID [866]

Book: Elementary differential equations and boundary value problems, 11th ed., Boyce, DiPrima, Meade
Section: Chapter 6.5, The Laplace Transform. Impulse functions. page 273
Problem number: 12.
ODE order: 2.
ODE degree: 1.

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

Solve \begin {gather*} \boxed {y^{\prime \prime }+y-\frac {\theta \left (t -4+k \right )-\theta \left (t -4-k \right )}{2 k}=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.089 (sec). Leaf size: 83

dsolve([diff(y(t),t$2)+y(t)=1/(2*k)*(Heaviside(t-(4-k)) -  Heaviside(t-(4+k)) ),y(0) = 0, D(y)(0) = 0],y(t), singsol=all)
 

\[ y \relax (t ) = \frac {\left (\theta \left (4+k \right )+\theta \left (t -4-k \right )-1\right ) \cos \left (-t +4+k \right )-\theta \left (t -4-k \right )+\left (-\cos \left (t -4+k \right )+1\right ) \theta \left (t -4+k \right )-\theta \left (-4+k \right ) \cos \relax (t )-\theta \left (4+k \right ) \cos \relax (t )+\theta \left (-4+k \right ) \cos \left (t -4+k \right )+\cos \relax (t )}{2 k} \]

Solution by Mathematica

Time used: 0.73 (sec). Leaf size: 181

DSolve[{y''[t]+y[t]==1/(2*k)*(UnitStep[t-(4-k)] -  UnitStep[t-(4+k)] ),{y[0]==0,y'[0]==0}},y[t],t,IncludeSingularSolutions -> True]
 

\begin{align*} y(t)\to \fbox {$\frac {(\cos (k-t+4)-1) \theta (-k+t-4)-(\cos (-k-t+4)-1) \theta (k+t-4)}{2 k}\text { if }-4<k<4$} \\ y(t)\to \fbox {$\frac {\cos (-k-t+4)-\cos (t)+(\cos (k-t+4)-1) \theta (-k+t-4)-(\cos (-k-t+4)-1) \theta (k+t-4)}{2 k}\text { if }k>4$} \\ y(t)\to \fbox {$\frac {-\cos (k-t+4)+\cos (t)+(\cos (k-t+4)-1) \theta (-k+t-4)-(\cos (-k-t+4)-1) \theta (k+t-4)}{2 k}\text { if }k<-4$} \\ \end{align*}