16.6 problem 6

Internal problem ID [12499]

Book: Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section: Chapter 5. The Laplace Transform Method. Exercises 5.5, page 273
Problem number: 6.
ODE order: 2.
ODE degree: 1.

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

\[ \boxed {y^{\prime \prime }+4 y=\left (\delta \left (x -\pi \right )\right ) \cos \left (x \right )} \] With initial conditions \begin {align*} [y \left (0\right ) = 0, y^{\prime }\left (0\right ) = 1] \end {align*}

Solution by Maple

Time used: 0.094 (sec). Leaf size: 16

dsolve([diff(y(x),x$2)+4*y(x)=cos(x)*Dirac(x-Pi),y(0) = 0, D(y)(0) = 1],y(x), singsol=all)
 

\[ y \left (x \right ) = -\frac {\sin \left (2 x \right ) \left (\operatorname {Heaviside}\left (x -\pi \right )-1\right )}{2} \]

Solution by Mathematica

Time used: 0.06 (sec). Leaf size: 19

DSolve[{y''[x]+4*y[x]==Cos[x]*DiracDelta[x-Pi],{y[0]==0,y'[0]==1}},y[x],x,IncludeSingularSolutions -> True]
 

\[ y(x)\to (\theta (x-\pi )-1) \sin (x) (-\cos (x)) \]