14.13 problem 2(e)

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(e).
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _with_linear_symmetries]]

Solve \begin {gather*} \boxed {y^{\prime \prime }+y-{\mathrm e}^{-x}=0} \end {gather*} With initial conditions \begin {align*} [y \relax (2) = 0, y^{\prime }\relax (2) = -2] \end {align*}

Solution by Maple

Time used: 0.075 (sec). Leaf size: 50

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

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

Solution by Mathematica

Time used: 0.026 (sec). Leaf size: 40

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

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