6.18 problem 18

Internal problem ID [585]

Book: Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section: Miscellaneous problems, end of chapter 2. Page 133
Problem number: 18.
ODE order: 1.
ODE degree: 1.

CAS Maple gives this as type [[_linear, class A]]

Solve \begin {gather*} \boxed {2 y+y^{\prime }-{\mathrm e}^{-x^{2}-2 x}=0} \end {gather*}

Solution by Maple

Time used: 0.015 (sec). Leaf size: 18

dsolve(2*y(x)+diff(y(x),x) = exp(-x^2-2*x),y(x), singsol=all)
 

\[ y \relax (x ) = \left (\frac {\sqrt {\pi }\, \erf \relax (x )}{2}+c_{1}\right ) {\mathrm e}^{-2 x} \]

Solution by Mathematica

Time used: 0.091 (sec). Leaf size: 27

DSolve[2*y[x]+y'[x] == Exp[-x^2-2*x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {1}{2} e^{-2 x} \left (\sqrt {\pi } \text {Erf}(x)+2 c_1\right ) \\ \end{align*}