14.14 problem 2(f)

Internal problem ID [5630]

Book: Differential Equations: Theory, Technique, and Practice by George Simmons, Steven Krantz. McGraw-Hill NY. 2007. 1st Edition.
Section: Chapter 2. Problems for Review and Discovery. Drill excercises. Page 105
Problem number: 2(f).
ODE order: 2.
ODE degree: 1.

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

\[ \boxed {y^{\prime \prime }-y-\cos \left (x \right )=0} \] With initial conditions \begin {align*} [y \left (0\right ) = 3, y^{\prime }\left (2\right ) = 2] \end {align*}

Solution by Maple

Time used: 0.141 (sec). Leaf size: 54

dsolve([diff(y(x),x$2)-y(x)=cos(x),y(0) = 3, D(y)(2) = 2],y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {\left (\sin \left (2\right )-4\right ) {\mathrm e}^{-x +2}+7 \,{\mathrm e}^{-x +4}+\left (-\sin \left (2\right )+4\right ) {\mathrm e}^{x +2}+\left (-{\mathrm e}^{4}-1\right ) \cos \left (x \right )+7 \,{\mathrm e}^{x}}{2 \,{\mathrm e}^{4}+2} \]

Solution by Mathematica

Time used: 0.013 (sec). Leaf size: 45

DSolve[{y''[x]-y[x]==Cos[x],{y[0]==3,y'[2]==2}},y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {1}{2} \left (-\cos (x)+7 \cosh (x)+\frac {\left (7+e^2 \left (8-7 e^2-2 \sin (2)\right )\right ) \sinh (x)}{1+e^4}\right ) \\ \end{align*}