23.3.127 problem 129

Internal problem ID [5841]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 3. THE DIFFERENTIAL EQUATION IS LINEAR AND OF SECOND ORDER, page 311
Problem number : 129
Date solved : Tuesday, September 30, 2025 at 02:04:00 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x y-x^{2} y^{\prime }+y^{\prime \prime }&=x \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 54
ode:=x*y(x)-x^2*diff(y(x),x)+diff(diff(y(x),x),x) = x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 1-\frac {x^{3} c_1 \Gamma \left (\frac {2}{3}\right )}{\left (-x^{3}\right )^{{2}/{3}}}+\frac {x^{3} c_1 \Gamma \left (\frac {2}{3}, -\frac {x^{3}}{3}\right )}{\left (-x^{3}\right )^{{2}/{3}}}+3^{{1}/{3}} {\mathrm e}^{\frac {x^{3}}{3}} c_1 +c_2 x \]
Mathematica. Time used: 0.092 (sec). Leaf size: 42
ode=x*y[x] - x^2*D[y[x],x] + D[y[x],{x,2}] == x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {c_2 \sqrt [3]{-x^3} \Gamma \left (-\frac {1}{3},-\frac {x^3}{3}\right )}{3 \sqrt [3]{3}}+c_1 x+1 \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2*Derivative(y(x), x) + x*y(x) - x + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x*(y(x) - 1) + Derivative(y(x), (x, 2)))/