Internal problem ID [5631]
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]]
Solve \begin {gather*} \boxed {y^{\prime \prime }-y-\cos \relax (x )=0} \end {gather*} With initial conditions \begin {align*} [y \relax (0) = 3, y^{\prime }\relax (2) = 2] \end {align*}
✓ Solution by Maple
Time used: 0.079 (sec). Leaf size: 57
dsolve([diff(y(x),x$2)-y(x)=cos(x),y(0) = 3, D(y)(2) = 2],y(x), singsol=all)
\[ y \relax (x ) = \frac {\left (\sin \relax (2)-4\right ) {\mathrm e}^{2-x}+\left (-\sin \relax (2)+4\right ) {\mathrm e}^{x +2}+7 \,{\mathrm e}^{4-x}+\left (-{\mathrm e}^{4}-1\right ) \cos \relax (x )+7 \,{\mathrm e}^{x}}{2 \,{\mathrm e}^{4}+2} \]
✓ Solution by Mathematica
Time used: 0.033 (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*}