5.2 problem 2

Internal problem ID [5070]

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

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

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

Solution by Maple

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

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

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

Solution by Mathematica

Time used: 0.063 (sec). Leaf size: 29

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

\begin{align*} y(x)\to x (-c_2 \text {ExpIntegralEi}(-x)+x+c_1)-c_2 e^{-x} \\ \end{align*}