14.13 problem 2(e)

Internal problem ID [6383]

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]]

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

Solution by Maple

Time used: 0.234 (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 \left (x \right ) = \frac {{\mathrm e}^{-x}}{2}+\frac {\left (\left (-\cos \left (x \right )+\sin \left (x \right )\right ) \cos \left (2\right )-\sin \left (2\right ) \cos \left (x \right )-\sin \left (2\right ) \sin \left (x \right )\right ) {\mathrm e}^{-2}}{2}-2 \cos \left (2\right ) \sin \left (x \right )+2 \sin \left (2\right ) \cos \left (x \right ) \]

Solution by Mathematica

Time used: 0.062 (sec). Leaf size: 48

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

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