23.3.390 problem 394

Internal problem ID [6104]
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 : 394
Date solved : Tuesday, September 30, 2025 at 02:21:36 PM
CAS classification : [[_2nd_order, _exact, _linear, _homogeneous]]

\begin{align*} 2 y-a y^{\prime }+\left (1-x \right ) x y^{\prime \prime }&=0 \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 42
ode:=2*y(x)-a*diff(y(x),x)+(1-x)*x*diff(diff(y(x),x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x^{a +1} c_2 \left (-1+x \right )^{-a +1}+c_1 \left (a^{2}+a \left (2 x -1\right )+2 x^{2}-2 x \right ) \]
Mathematica. Time used: 0.387 (sec). Leaf size: 87
ode=2*y[x] - a*D[y[x],x] + (1 - x)*x*D[y[x],{x,2}] == 0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {\left (a^2+a (2 x-1)+2 (x-1) x\right ) \left (\frac {c_2 x^{a+1} (1-x)^{1-a}}{(a-1) a (a+1) \left (a^2+a (2 x-1)+2 (x-1) x\right )}+c_1\right )}{a^2+3 a+4} \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*Derivative(y(x), x) + x*(1 - x)*Derivative(y(x), (x, 2)) + 2*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Expected Expr or iterable but got None