2.34.18 Problem 256

2.34.18.1 Maple
2.34.18.2 Mathematica
2.34.18.3 Sympy

Internal problem ID [13916]
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 : 256
Date solved : Friday, December 19, 2025 at 08:33:27 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} \left (x^{n} a +b \right )^{2} y^{\prime \prime }+\left (x^{n} a +b \right ) \left (x^{n} c +d \right ) y^{\prime }+n \left (-a d +b c \right ) x^{n -1} y&=0 \\ \end{align*}
2.34.18.1 Maple. Time used: 0.057 (sec). Leaf size: 53
ode:=(a*x^n+b)^2*diff(diff(y(x),x),x)+(a*x^n+b)*(c*x^n+d)*diff(y(x),x)+n*(-a*d+b*c)*x^(n-1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\int \frac {c \,x^{n}+d}{a \,x^{n}+b}d x} \left (c_2 \int {\mathrm e}^{\int \frac {c \,x^{n}+d}{a \,x^{n}+b}d x}d x +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 solution in terms of special functions: 
   -> Bessel 
   -> elliptic 
   -> Legendre 
   -> Whittaker 
      -> 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 @ Moebi\ 
us 
-> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power \ 
@ Moebius 
-> Heun: Equivalence to the GHE or one of its 4 confluent cases under a power \ 
@ Moebius 
-> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(x),\ 
 dx)) * 2F1([a1, a2], [b1], f) 
-> Trying changes of variables to rationalize or make the ODE simpler 
<- unable to find a useful change of variables 
   trying a symmetry of the form [xi=0, eta=F(x)] 
   trying differential order: 2; exact nonlinear 
   trying symmetries linear in x and y(x) 
   trying to convert to a linear ODE with constant coefficients 
   trying 2nd order, integrating factor of the form mu(x,y) 
   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 solution in terms of special functions: 
      -> Bessel 
      -> elliptic 
      -> Legendre 
      -> Whittaker 
         -> 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 pow\ 
er @ Moebius 
   -> Heun: Equivalence to the GHE or one of its 4 confluent cases under a pow\ 
er @ Moebius 
   -> trying a solution of the form r0(x) * Y + r1(x) * Y where Y = exp(int(r(\ 
x), dx)) * 2F1([a1, a2], [b1], f) 
   -> Trying changes of variables to rationalize or make the ODE simpler 
   <- unable to find a useful change of variables 
      trying a symmetry of the form [xi=0, eta=F(x)] 
   trying to convert to an ODE of Bessel type 
   -> trying reduction of order to Riccati 
      trying Riccati sub-methods: 
         trying Riccati_symmetries 
         -> trying a symmetry pattern of the form [F(x)*G(y), 0] 
         -> trying a symmetry pattern of the form [0, F(x)*G(y)] 
         -> trying a symmetry pattern of the form [F(x),G(x)*y+H(x)] 
--- Trying Lie symmetry methods, 2nd order --- 
   -> Computing symmetries using: way = 3 
[0, y] 
   <- successful computation of symmetries. 
   -> Computing symmetries using: way = 5 
[0, y], [y/a/c, -y^2*(c*x^n+d)/(a*x^n+b)/a/c] 
   <- successful computation of symmetries.
 
2.34.18.2 Mathematica. Time used: 60.479 (sec). Leaf size: 106
ode=(a*x^n+b)^2*D[y[x],{x,2}]+(a*x^n+b)*(c*x^n+d)*D[y[x],x]+n*(b*c-a*d)*x^(n-1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \exp \left (-\frac {x \left ((a d-b c) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {a x^n}{b}\right )+b c\right )}{a b}\right ) \left (\int _1^x\exp \left (\frac {\left (b c+(a d-b c) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {a K[1]^n}{b}\right )\right ) K[1]}{a b}\right ) c_1dK[1]+c_2\right ) \end{align*}
2.34.18.3 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
d = symbols("d") 
n = symbols("n") 
y = Function("y") 
ode = Eq(n*x**(n - 1)*(-a*d + b*c)*y(x) + (a*x**n + b)**2*Derivative(y(x), (x, 2)) + (a*x**n + b)*(c*x**n + d)*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_power_series_ordinary')