82.49.1 problem Ex. 1

Internal problem ID [18932]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter IX. Equations of the second order. problems at page 111
Problem number : Ex. 1
Date solved : Monday, March 31, 2025 at 06:25:23 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.002 (sec). Leaf size: 16
ode:=x*diff(diff(y(x),x),x)+(1-x)*diff(y(x),x)-y(x) = exp(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} \left (c_1 \,\operatorname {Ei}_{1}\left (x \right )+\ln \left (x \right )+c_2 \right ) \]
Mathematica. Time used: 0.072 (sec). Leaf size: 23
ode=x*D[y[x],{x,2}]+(1-x)*D[y[x],x]-y[x]==Exp[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x (c_2 \operatorname {ExpIntegralEi}(-x)+\log (-x)+c_1) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), (x, 2)) + (1 - x)*Derivative(y(x), x) - y(x) - exp(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x*Derivative(y(x), (x, 2)) - y(x) - exp(x))/(x - 1) cannot be solved by the factorable group method