5.1 problem 1

Internal problem ID [5822]

Book: Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section: Chapter 2. Linear homogeneous equations. Section 2.3.4 problems. page 104
Problem number: 1.
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _exact, _linear, _nonhomogeneous]]

\[ \boxed {y^{\prime \prime }+y^{\prime } x +y=2 x \,{\mathrm e}^{x}-1} \]

Solution by Maple

Time used: 0.016 (sec). Leaf size: 81

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

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

Solution by Mathematica

Time used: 0.148 (sec). Leaf size: 53

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

\[ y(x)\to e^{-\frac {x^2}{2}} \left (\int _1^xe^{\frac {K[1]^2}{2}} \left (c_1+2 e^{K[1]} (K[1]-1)-K[1]\right )dK[1]+c_2\right ) \]