2.2.65 Problem 68

2.2.65.1 Solved using first_order_ode_riccati
2.2.65.2 Maple
2.2.65.3 Mathematica
2.2.65.4 Sympy

Internal problem ID [13271]
Book : Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section : Chapter 1, section 1.2. Riccati Equation. 1.2.2. Equations Containing Power Functions
Problem number : 68
Date solved : Sunday, January 18, 2026 at 07:03:59 PM
CAS classification : [_rational, _Riccati]

2.2.65.1 Solved using first_order_ode_riccati

6.667 (sec)

Entering first order ode riccati solver

\begin{align*} x^{2} \left (x +a \right ) \left (y^{\prime }+\lambda y^{2}\right )+x \left (b x +c \right ) y+\alpha x +\beta &=0 \\ \end{align*}
In canonical form the ODE is
\begin{align*} y' &= F(x,y)\\ &= -\frac {a \,x^{2} \lambda y^{2}+y^{2} \lambda \,x^{3}+b \,x^{2} y+y c x +\alpha x +\beta }{x^{2} \left (x +a \right )} \end{align*}

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = -\frac {a \lambda y^{2}}{x +a}-\frac {x y^{2} \lambda }{x +a}-\frac {b y}{x +a}-\frac {y c}{x \left (x +a \right )}-\frac {\alpha }{x \left (x +a \right )}-\frac {\beta }{x^{2} \left (x +a \right )} \]
With Riccati ODE standard form
\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \(f_0(x)=-\frac {\alpha }{x \left (x +a \right )}-\frac {\beta }{x^{2} \left (x +a \right )}\), \(f_1(x)=-\frac {b}{x +a}-\frac {c}{x \left (x +a \right )}\) and \(f_2(x)=-\frac {a \lambda }{x +a}-\frac {x \lambda }{x +a}\). Let
\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{u \left (-\frac {a \lambda }{x +a}-\frac {x \lambda }{x +a}\right )} \tag {1} \end{align*}

Using the above substitution in the given ODE results (after some simplification) in a second order ODE to solve for \(u(x)\) which is

\begin{align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end{align*}

But

\begin{align*} f_2' &=\frac {a \lambda }{\left (x +a \right )^{2}}-\frac {\lambda }{x +a}+\frac {x \lambda }{\left (x +a \right )^{2}}\\ f_1 f_2 &=\left (-\frac {b}{x +a}-\frac {c}{x \left (x +a \right )}\right ) \left (-\frac {a \lambda }{x +a}-\frac {x \lambda }{x +a}\right )\\ f_2^2 f_0 &=\left (-\frac {a \lambda }{x +a}-\frac {x \lambda }{x +a}\right )^{2} \left (-\frac {\alpha }{x \left (x +a \right )}-\frac {\beta }{x^{2} \left (x +a \right )}\right ) \end{align*}

Substituting the above terms back in equation (2) gives

\[ \left (-\frac {a \lambda }{x +a}-\frac {x \lambda }{x +a}\right ) u^{\prime \prime }\left (x \right )-\left (\frac {a \lambda }{\left (x +a \right )^{2}}-\frac {\lambda }{x +a}+\frac {x \lambda }{\left (x +a \right )^{2}}+\left (-\frac {b}{x +a}-\frac {c}{x \left (x +a \right )}\right ) \left (-\frac {a \lambda }{x +a}-\frac {x \lambda }{x +a}\right )\right ) u^{\prime }\left (x \right )+\left (-\frac {a \lambda }{x +a}-\frac {x \lambda }{x +a}\right )^{2} \left (-\frac {\alpha }{x \left (x +a \right )}-\frac {\beta }{x^{2} \left (x +a \right )}\right ) u \left (x \right ) = 0 \]
Unable to solve. Will ask Maple to solve this ode now.

The solution for \(u \left (x \right )\) is

\begin{equation} \tag{3} u \left (x \right ) = c_1 \,x^{\frac {a -c +\sqrt {a^{2}+\left (-4 \beta \lambda -2 c \right ) a +c^{2}}}{2 a}} \operatorname {hypergeom}\left (\left [\frac {-a b +\sqrt {-4 \alpha \lambda +b^{2}-2 b +1}\, a +2 a +c +\sqrt {a^{2}+\left (-4 \beta \lambda -2 c \right ) a +c^{2}}}{2 a}, \frac {-a b -\sqrt {-4 \alpha \lambda +b^{2}-2 b +1}\, a +2 a +c +\sqrt {a^{2}+\left (-4 \beta \lambda -2 c \right ) a +c^{2}}}{2 a}\right ], \left [\frac {a +\sqrt {a^{2}+\left (-4 \beta \lambda -2 c \right ) a +c^{2}}}{a}\right ], -\frac {x}{a}\right ) \left (x +a \right )^{\frac {-a b +a +c}{a}}+c_2 \,x^{\frac {a -c -\sqrt {a^{2}+\left (-4 \beta \lambda -2 c \right ) a +c^{2}}}{2 a}} \operatorname {hypergeom}\left (\left [-\frac {\sqrt {-4 \alpha \lambda +b^{2}-2 b +1}\, a +a b +\sqrt {a^{2}+\left (-4 \beta \lambda -2 c \right ) a +c^{2}}-2 a -c}{2 a}, \frac {-a b +\sqrt {-4 \alpha \lambda +b^{2}-2 b +1}\, a +2 a +c -\sqrt {a^{2}+\left (-4 \beta \lambda -2 c \right ) a +c^{2}}}{2 a}\right ], \left [\frac {a -\sqrt {a^{2}+\left (-4 \beta \lambda -2 c \right ) a +c^{2}}}{a}\right ], -\frac {x}{a}\right ) \left (x +a \right )^{\frac {-a b +a +c}{a}} \end{equation}
Taking derivative gives
\begin{equation} \tag{4} \text {Expression too large to display} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{u \left (-\frac {a \lambda }{x +a}-\frac {x \lambda }{x +a}\right )} \\ y &= \text {Expression too large to display} \\ \end{align*}
Doing change of constants, the above solution becomes
\[ \text {Expression too large to display} \]
Simplifying the above gives
\begin{align*} \text {Expression too large to display} \\ \end{align*}

Summary of solutions found

\begin{align*} \text {Expression too large to display} \\ \end{align*}
2.2.65.2 Maple. Time used: 0.006 (sec). Leaf size: 1479
ode:=x^2*(x+a)*(diff(y(x),x)+lambda*y(x)^2)+x*(b*x+c)*y(x)+alpha*x+beta = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ \text {Expression too large to display} \]

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying Chini 
differential order: 1; looking for linear symmetries 
trying exact 
Looking for potential symmetries 
trying Riccati 
trying Riccati sub-methods: 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE, diff(diff(y(x),x),x) = -(b*x+c)/x/(x+a)* 
diff(y(x),x)-lambda*(alpha*x+beta)/x^2/(x+a)*y(x), y(x) 
      *** Sublevel 2 *** 
      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 
      <- No Liouvillian solutions exists 
      -> Trying a solution in terms of special functions: 
         -> Bessel 
         -> elliptic 
         -> Legendre 
         -> Kummer 
            -> hyper3: Equivalence to 1F1 under a power @ Moebius 
         -> hypergeometric 
            -> heuristic approach 
            <- heuristic approach successful 
         <- hypergeometric successful 
      <- special function solution successful 
   <- Riccati to 2nd Order successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x^{2} \left (x +a \right ) \left (\frac {d}{d x}y \left (x \right )+\lambda y \left (x \right )^{2}\right )+x \left (b x +c \right ) y \left (x \right )+\alpha x +\beta =0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=-\frac {x^{2} \lambda y \left (x \right )^{2} a +x^{3} \lambda y \left (x \right )^{2}+y \left (x \right ) b \,x^{2}+y \left (x \right ) c x +\alpha x +\beta }{x^{2} \left (x +a \right )} \end {array} \]
2.2.65.3 Mathematica. Time used: 2.196 (sec). Leaf size: 1770
ode=x^2*(x+a)*(D[y[x],x]+\[Lambda]*y[x]^2)+x*(b*x+c)*y[x]+\[Alpha]*x+\[Beta]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}
2.2.65.4 Sympy
from sympy import * 
x = symbols("x") 
Alpha = symbols("Alpha") 
BETA = symbols("BETA") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
lambda_ = symbols("lambda_") 
y = Function("y") 
ode = Eq(Alpha*x + BETA + x**2*(a + x)*(lambda_*y(x)**2 + Derivative(y(x), x)) + x*(b*x + c)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out
 
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] 
Sympy version 1.14.0