87.14.21 problem 20

Internal problem ID [23540]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 2. Linear differential equations. Exercise at page 109
Problem number : 20
Date solved : Thursday, October 02, 2025 at 09:42:48 PM
CAS classification : [_Laguerre]

\begin{align*} x y^{\prime \prime }+\left (1-x \right ) y^{\prime }+2 y&=0 \end{align*}

Using reduction of order method given that one solution is

\begin{align*} y&=x^{2}-4 x +2 \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 39
ode:=x*diff(diff(y(x),x),x)+(1-x)*diff(y(x),x)+2*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x^{2}-4 x +2\right ) c_2 \,\operatorname {Ei}_{1}\left (-x \right )}{4}+\frac {c_2 \left (x -3\right ) {\mathrm e}^{x}}{4}+c_1 \left (x^{2}-4 x +2\right ) \]
Mathematica. Time used: 0.187 (sec). Leaf size: 42
ode=x*D[y[x],{x,2}]+(1-x)*D[y[x],x]+2*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{4} c_2 \left (\left (x^2-4 x+2\right ) \operatorname {ExpIntegralEi}(x)-e^x (x-3)\right )+c_1 ((x-4) x+2) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), (x, 2)) + (1 - x)*Derivative(y(x), x) + 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False