2.31.22 Problem 170

2.31.22.1 Maple
2.31.22.2 Mathematica
2.31.22.3 Sympy

Internal problem ID [13831]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 2, Second-Order Differential Equations. section 2.1.2-5
Problem number : 170
Date solved : Friday, December 19, 2025 at 02:24:30 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (a \,x^{2}+b \right ) y^{\prime \prime }+\left (\lambda \left (a +c \right ) x^{2}+\left (-a +c \right ) x +2 b \lambda \right ) y^{\prime }+\lambda ^{2} \left (c \,x^{2}+b \right ) y&=0 \\ \end{align*}
2.31.22.1 Maple. Time used: 0.061 (sec). Leaf size: 1263
ode:=(a*x^2+b)*diff(diff(y(x),x),x)+(lambda*(a+c)*x^2+(c-a)*x+2*b*lambda)*diff(y(x),x)+lambda^2*(c*x^2+b)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {Expression too large to display} \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
checking if the LODE has constant coefficients 
checking if the LODE is of Euler type 
trying a symmetry of the form [xi=0, eta=F(x)] 
checking if the LODE is missing y 
-> Trying a Liouvillian solution using Kovacics algorithm 
   A Liouvillian solution exists 
   Reducible group (found an exponential solution) 
   Group is reducible, not completely reducible 
   Solution has integrals. Trying a special function solution free of integrals\ 
... 
   -> Trying a solution in terms of special functions: 
      -> Bessel 
      -> elliptic 
      -> Legendre 
      -> Kummer 
         -> hyper3: Equivalence to 1F1 under a power @ Moebius 
      -> hypergeometric 
         -> heuristic approach 
         -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
      -> Mathieu 
         -> Equivalence to the rational form of Mathieu ODE under a power @ Mo\ 
ebius 
      -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a \ 
power @ Moebius 
      <- Heun successful: received ODE is equivalent to the  HeunC  ODE, case  \ 
a <> 0, e <> 0, c = 0 
   <- Kovacics algorithm successful
 
2.31.22.2 Mathematica. Time used: 2.857 (sec). Leaf size: 104
ode=(a*x^2+b)*D[y[x],{x,2}]+(\[Lambda]*(c+a)*x^2+(c-a)*x+2*b*\[Lambda])*D[y[x],x]+\[Lambda]^2*(c*x^2+b)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{\lambda (-x)} (\lambda x+1) \left (c_2 \int _1^x\frac {\exp \left (\frac {(a-c) \lambda \left (\sqrt {a} K[1]-\sqrt {b} \arctan \left (\frac {\sqrt {a} K[1]}{\sqrt {b}}\right )\right )}{a^{3/2}}\right ) \left (a K[1]^2+b\right )^{\frac {a-c}{2 a}}}{(\lambda K[1]+1)^2}dK[1]+c_1\right ) \end{align*}
2.31.22.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
lambda_ = symbols("lambda_") 
y = Function("y") 
ode = Eq(lambda_**2*(b + c*x**2)*y(x) + (a*x**2 + b)*Derivative(y(x), (x, 2)) + (2*b*lambda_ + lambda_*x**2*(a + c) + x*(-a + c))*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False