Internal problem ID [6384]
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 )} \] With initial conditions \begin {align*} [y \left (0\right ) = 3, y^{\prime }\left (2\right ) = 2] \end {align*}
✓ Solution by Maple
Time used: 0.406 (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}^{2-x}+7 \,{\mathrm e}^{4-x}+\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.038 (sec). Leaf size: 67
DSolve[{y''[x]-y[x]==Cos[x],{y[0]==3,y'[2]==2}},y[x],x,IncludeSingularSolutions -> True]
\[ y(x)\to \frac {e^{-x} \left (7 e^{2 x}-e^{2 x+2} (\sin (2)-4)+\left (1+e^4\right ) \left (-e^x\right ) \cos (x)+7 e^4+e^2 (\sin (2)-4)\right )}{2 \left (1+e^4\right )} \]