2.2.45 Problem 48

2.2.45.1 Solved using first_order_ode_riccati
2.2.45.2 Maple
2.2.45.3 Mathematica
2.2.45.4 Sympy

Internal problem ID [13251]
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 : 48
Date solved : Sunday, January 18, 2026 at 06:52:29 PM
CAS classification : [_rational, _Riccati]

2.2.45.1 Solved using first_order_ode_riccati

0.265 (sec)

Entering first order ode riccati solver

\begin{align*} 2 x^{2} y^{\prime }&=2 y^{2}+3 y x -2 x \,a^{2} \\ \end{align*}
In canonical form the ODE is
\begin{align*} y' &= F(x,y)\\ &= \frac {2 y^{2}+3 y x -2 x \,a^{2}}{2 x^{2}} \end{align*}

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = \frac {y^{2}}{x^{2}}+\frac {3 y}{2 x}-\frac {a^{2}}{x} \]
With Riccati ODE standard form
\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that \(f_0(x)=-\frac {a^{2}}{x}\), \(f_1(x)=\frac {3}{2 x}\) and \(f_2(x)=\frac {1}{x^{2}}\). Let
\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{\frac {u}{x^{2}}} \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 {2}{x^{3}}\\ f_1 f_2 &=\frac {3}{2 x^{3}}\\ f_2^2 f_0 &=-\frac {a^{2}}{x^{5}} \end{align*}

Substituting the above terms back in equation (2) gives

\[ \frac {u^{\prime \prime }\left (x \right )}{x^{2}}+\frac {u^{\prime }\left (x \right )}{2 x^{3}}-\frac {a^{2} u \left (x \right )}{x^{5}} = 0 \]
Entering second order bessel ode solverWriting the ode as
\begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )+\frac {\left (\frac {d u}{d x}\right ) x}{2}-\frac {a^{2} u}{x} = 0\tag {1} \end{align*}

Bessel ode has the form

\begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )+\left (\frac {d u}{d x}\right ) x +\left (-n^{2}+x^{2}\right ) u = 0\tag {2} \end{align*}

The generalized form of Bessel ode is given by Bowman (1958) as the following

\begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )+\left (1-2 \alpha \right ) x \left (\frac {d u}{d x}\right )+\left (\beta ^{2} \gamma ^{2} x^{2 \gamma }-n^{2} \gamma ^{2}+\alpha ^{2}\right ) u = 0\tag {3} \end{align*}

With the standard solution

\begin{align*} u&=x^{\alpha } \left (c_1 \operatorname {BesselJ}\left (n , \beta \,x^{\gamma }\right )+c_2 \operatorname {BesselY}\left (n , \beta \,x^{\gamma }\right )\right )\tag {4} \end{align*}

Comparing (3) to (1) and solving for \(\alpha ,\beta ,n,\gamma \) gives

\begin{align*} \alpha &= {\frac {1}{4}}\\ \beta &= 2 i a\\ n &= {\frac {1}{2}}\\ \gamma &= -{\frac {1}{2}} \end{align*}

Substituting all the above into (4) gives the solution as

\begin{align*} u = \frac {i c_1 \,x^{{1}/{4}} \sinh \left (\frac {2 a}{\sqrt {x}}\right )}{\sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {c_2 \,x^{{1}/{4}} \cosh \left (\frac {2 a}{\sqrt {x}}\right )}{\sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}} \end{align*}

Taking derivative gives

\begin{equation} \tag{4} u^{\prime }\left (x \right ) = \frac {i c_1 \sinh \left (\frac {2 a}{\sqrt {x}}\right )}{4 x^{{3}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {c_1 \sinh \left (\frac {2 a}{\sqrt {x}}\right ) a}{4 x^{{5}/{4}} \sqrt {\pi }\, \left (\frac {i a}{\sqrt {x}}\right )^{{3}/{2}}}-\frac {i c_1 a \cosh \left (\frac {2 a}{\sqrt {x}}\right )}{x^{{5}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {c_2 \cosh \left (\frac {2 a}{\sqrt {x}}\right )}{4 x^{{3}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {i c_2 \cosh \left (\frac {2 a}{\sqrt {x}}\right ) a}{4 x^{{5}/{4}} \sqrt {\pi }\, \left (\frac {i a}{\sqrt {x}}\right )^{{3}/{2}}}+\frac {c_2 a \sinh \left (\frac {2 a}{\sqrt {x}}\right )}{x^{{5}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{\frac {u}{x^{2}}} \\ y &= -\frac {\left (\frac {i c_1 \sinh \left (\frac {2 a}{\sqrt {x}}\right )}{4 x^{{3}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {c_1 \sinh \left (\frac {2 a}{\sqrt {x}}\right ) a}{4 x^{{5}/{4}} \sqrt {\pi }\, \left (\frac {i a}{\sqrt {x}}\right )^{{3}/{2}}}-\frac {i c_1 a \cosh \left (\frac {2 a}{\sqrt {x}}\right )}{x^{{5}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {c_2 \cosh \left (\frac {2 a}{\sqrt {x}}\right )}{4 x^{{3}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {i c_2 \cosh \left (\frac {2 a}{\sqrt {x}}\right ) a}{4 x^{{5}/{4}} \sqrt {\pi }\, \left (\frac {i a}{\sqrt {x}}\right )^{{3}/{2}}}+\frac {c_2 a \sinh \left (\frac {2 a}{\sqrt {x}}\right )}{x^{{5}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}\right ) x^{2}}{\frac {i c_1 \,x^{{1}/{4}} \sinh \left (\frac {2 a}{\sqrt {x}}\right )}{\sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {c_2 \,x^{{1}/{4}} \cosh \left (\frac {2 a}{\sqrt {x}}\right )}{\sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}} \\ \end{align*}
Doing change of constants, the above solution becomes
\[ y = -\frac {\left (\frac {i \sinh \left (\frac {2 a}{\sqrt {x}}\right )}{4 x^{{3}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {\sinh \left (\frac {2 a}{\sqrt {x}}\right ) a}{4 x^{{5}/{4}} \sqrt {\pi }\, \left (\frac {i a}{\sqrt {x}}\right )^{{3}/{2}}}-\frac {i a \cosh \left (\frac {2 a}{\sqrt {x}}\right )}{x^{{5}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {c_3 \cosh \left (\frac {2 a}{\sqrt {x}}\right )}{4 x^{{3}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {i c_3 \cosh \left (\frac {2 a}{\sqrt {x}}\right ) a}{4 x^{{5}/{4}} \sqrt {\pi }\, \left (\frac {i a}{\sqrt {x}}\right )^{{3}/{2}}}+\frac {c_3 a \sinh \left (\frac {2 a}{\sqrt {x}}\right )}{x^{{5}/{4}} \sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}\right ) x^{2}}{\frac {i x^{{1}/{4}} \sinh \left (\frac {2 a}{\sqrt {x}}\right )}{\sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}-\frac {c_3 \,x^{{1}/{4}} \cosh \left (\frac {2 a}{\sqrt {x}}\right )}{\sqrt {\pi }\, \sqrt {\frac {i a}{\sqrt {x}}}}} \]
Simplifying the above gives
\begin{align*} y &= -\frac {\sqrt {x}\, \left (-\sqrt {x}\, \cosh \left (\frac {2 a}{\sqrt {x}}\right ) c_3 +2 c_3 a \sinh \left (\frac {2 a}{\sqrt {x}}\right )+i \sqrt {x}\, \sinh \left (\frac {2 a}{\sqrt {x}}\right )-2 i a \cosh \left (\frac {2 a}{\sqrt {x}}\right )\right )}{2 i \sinh \left (\frac {2 a}{\sqrt {x}}\right )-2 c_3 \cosh \left (\frac {2 a}{\sqrt {x}}\right )} \\ \end{align*}

Summary of solutions found

\begin{align*} y &= -\frac {\sqrt {x}\, \left (-\sqrt {x}\, \cosh \left (\frac {2 a}{\sqrt {x}}\right ) c_3 +2 c_3 a \sinh \left (\frac {2 a}{\sqrt {x}}\right )+i \sqrt {x}\, \sinh \left (\frac {2 a}{\sqrt {x}}\right )-2 i a \cosh \left (\frac {2 a}{\sqrt {x}}\right )\right )}{2 i \sinh \left (\frac {2 a}{\sqrt {x}}\right )-2 c_3 \cosh \left (\frac {2 a}{\sqrt {x}}\right )} \\ \end{align*}
2.2.45.2 Maple. Time used: 0.017 (sec). Leaf size: 102
ode:=2*x^2*diff(y(x),x) = 2*y(x)^2+3*y(x)*x-2*a^2*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (-2 x c_1 \sqrt {-\frac {a^{2}}{x}}-x \right ) \sin \left (2 \sqrt {-\frac {a^{2}}{x}}\right )-x \left (c_1 -2 \sqrt {-\frac {a^{2}}{x}}\right ) \cos \left (2 \sqrt {-\frac {a^{2}}{x}}\right )}{2 \cos \left (2 \sqrt {-\frac {a^{2}}{x}}\right ) c_1 +2 \sin \left (2 \sqrt {-\frac {a^{2}}{x}}\right )} \]

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 a Liouvillian solution using Kovacics algorithm 
         A Liouvillian solution exists 
         Group is reducible or imprimitive 
      <- Kovacics algorithm successful 
   <- Abel AIR successful: ODE belongs to the 0F1 1-parameter (Bessel type) cla\ 
ss
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & 2 x^{2} \left (\frac {d}{d x}y \left (x \right )\right )=2 y \left (x \right )^{2}+3 x y \left (x \right )-2 a^{2} x \\ \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 {2 y \left (x \right )^{2}+3 x y \left (x \right )-2 a^{2} x}{2 x^{2}} \end {array} \]
2.2.45.3 Mathematica. Time used: 0.194 (sec). Leaf size: 94
ode=2*x^2*D[y[x],x]==2*y[x]^2+3*x*y[x]-2*a^2*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {4 a^2 c_1 \sqrt {x}+2 a \sqrt {x} e^{\frac {4 a}{\sqrt {x}}}-x e^{\frac {4 a}{\sqrt {x}}}+2 a c_1 x}{2 e^{\frac {4 a}{\sqrt {x}}}-4 a c_1}\\ y(x)&\to a \left (-\sqrt {x}\right )-\frac {x}{2} \end{align*}
2.2.45.4 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(2*a**2*x + 2*x**2*Derivative(y(x), x) - 3*x*y(x) - 2*y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
RecursionError : maximum recursion depth exceeded
 
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', 'lie_group')