59.1.256 problem 259

Internal problem ID [9428]
Book : Collection of Kovacic problems
Section : section 1
Problem number : 259
Date solved : Wednesday, March 05, 2025 at 07:49:06 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.022 (sec). Leaf size: 42
ode:=x*diff(diff(y(x),x),x)+(x+n)*diff(y(x),x)+(n+1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (c_{2} x^{-n +1} \operatorname {hypergeom}\left (\left [-n \right ], \left [-n +2\right ], x\right ) n +\left (-x +n \right ) c_{1} \right ) {\mathrm e}^{-x}}{n} \]
Mathematica. Time used: 0.355 (sec). Leaf size: 77
ode=x*D[y[x],{x,2}]+(x+n)*D[y[x],x]+(n+1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{\int \frac {-n+x-1}{n-x} \, dx} \left (c_2 \int _1^x\exp \left (\int _1^{K[2]}-\frac {n^2-2 K[1] n+(K[1]-2) K[1]}{(n-K[1]) K[1]}dK[1]\right )dK[2]+c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), (x, 2)) + (n + 1)*y(x) + (n + x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Expected Expr or iterable but got None