2.34.21 Problem 259

2.34.21.1 Maple
2.34.21.2 Mathematica
2.34.21.3 Sympy

Internal problem ID [13919]
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-8. Other equations.
Problem number : 259
Date solved : Friday, December 19, 2025 at 08:34:49 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} x^{2} \left (x^{n} a +b \right )^{2} y^{\prime \prime }+\left (1+n \right ) x \left (x^{2 n} a^{2}-b^{2}\right ) y^{\prime }+c y&=0 \\ \end{align*}
2.34.21.1 Maple. Time used: 0.020 (sec). Leaf size: 127
ode:=x^2*(a*x^n+b)^2*diff(diff(y(x),x),x)+(n+1)*x*(a^2*x^(2*n)-b^2)*diff(y(x),x)+c*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sqrt {a \,x^{2 n}+x^{n} b}\, \left (a \,x^{n}+b \right )^{\frac {-n -1}{n}} x \left (\left (\frac {x^{n}}{a \,x^{n}+b}\right )^{-\frac {\sqrt {\frac {\left (n +2\right )^{2} b^{2}-4 c}{n^{2} a^{2}}}\, a}{2 b}} c_2 +\left (\frac {x^{n}}{a \,x^{n}+b}\right )^{\frac {\sqrt {\frac {\left (n +2\right )^{2} b^{2}-4 c}{n^{2} a^{2}}}\, a}{2 b}} c_1 \right ) \]

Maple trace

Methods for second order ODEs: 
--- Trying classification methods --- 
trying a symmetry of the form [xi=0, eta=F(x)] 
checking if the LODE is missing y 
-> Trying an equivalence, under non-integer power transformations, 
   to LODEs admitting Liouvillian solutions. 
   -> Trying a Liouvillian solution using Kovacics algorithm 
      A Liouvillian solution exists 
      Group is reducible or imprimitive 
   <- Kovacics algorithm successful 
<- Equivalence, under non-integer power transformations successful
 
2.34.21.2 Mathematica. Time used: 0.615 (sec). Leaf size: 149
ode=x^2*(a*x^n+b)^2*D[y[x],{x,2}]+(n+1)*x*(a^2*x^(2*n)-b^2)*D[y[x],x]+c*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to c_1 \exp \left (\frac {\left (b (n+2)-\sqrt {c} \sqrt {\frac {b^2 (n+2)^2-4 c}{c}}\right ) \left (-\log \left (a x^n+b\right )-\log (b)+n \log (x)-\log (n)\right )}{2 b n}\right )+c_2 \exp \left (\frac {\left (\sqrt {c} \sqrt {\frac {b^2 (n+2)^2-4 c}{c}}+b (n+2)\right ) \left (-\log \left (a x^n+b\right )-\log (b)+n \log (x)-\log (n)\right )}{2 b n}\right ) \end{align*}
2.34.21.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
n = symbols("n") 
y = Function("y") 
ode = Eq(c*y(x) + x**2*(a*x**n + b)**2*Derivative(y(x), (x, 2)) + x*(n + 1)*(a**2*x**(2*n) - b**2)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : Add object cannot be interpreted as an integer
 
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] 
Sympy version 1.14.0
 
classify_ode(ode,func=y(x)) 
 
('factorable', '2nd_hypergeometric', '2nd_hypergeometric_Integral', '2nd_power_series_regular')