2.2.2 Problem 2

2.2.2.1 Solved using first_order_ode_riccati
2.2.2.2 Solved using first_order_ode_riccati_by_guessing_particular_solution
2.2.2.3 Maple
2.2.2.4 Mathematica
2.2.2.5 Sympy

Internal problem ID [13208]
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 : 2
Date solved : Sunday, January 18, 2026 at 06:41:51 PM
CAS classification : [_Riccati]

2.2.2.1 Solved using first_order_ode_riccati

0.343 (sec)

Entering first order ode riccati solver

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

This is a Riccati ODE. Comparing the ODE to solve

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

Substituting the above terms back in equation (2) gives

\[ u^{\prime \prime }\left (x \right )+\left (-a^{2} x^{2}+3 a \right ) u \left (x \right ) = 0 \]
Entering kovacic solverWriting the ode as
\begin{align*} \frac {d^{2}u}{d x^{2}}+\left (-a^{2} x^{2}+3 a \right ) u &= 0 \tag {1} \\ A \frac {d^{2}u}{d x^{2}} + B \frac {d u}{d x} + C u &= 0 \tag {2} \end{align*}

Comparing (1) and (2) shows that

\begin{align*} A &= 1 \\ B &= 0\tag {3} \\ C &= -a^{2} x^{2}+3 a \end{align*}

Applying the Liouville transformation on the dependent variable gives

\begin{align*} z(x) &= u e^{\int \frac {B}{2 A} \,dx} \end{align*}

Then (2) becomes

\begin{align*} z''(x) = r z(x)\tag {4} \end{align*}

Where \(r\) is given by

\begin{align*} r &= \frac {s}{t}\tag {5} \\ &= \frac {2 A B' - 2 B A' + B^2 - 4 A C}{4 A^2} \end{align*}

Substituting the values of \(A,B,C\) from (3) in the above and simplifying gives

\begin{align*} r &= \frac {a \left (a \,x^{2}-3\right )}{1}\tag {6} \end{align*}

Comparing the above to (5) shows that

\begin{align*} s &= a \left (a \,x^{2}-3\right )\\ t &= 1 \end{align*}

Therefore eq. (4) becomes

\begin{align*} z''(x) &= \left ( a \left (a \,x^{2}-3\right )\right ) z(x)\tag {7} \end{align*}

Equation (7) is now solved. After finding \(z(x)\) then \(u\) is found using the inverse transformation

\begin{align*} u &= z \left (x \right ) e^{-\int \frac {B}{2 A} \,dx} \end{align*}

The first step is to determine the case of Kovacic algorithm this ode belongs to. There are 3 cases depending on the order of poles of \(r\) and the order of \(r\) at \(\infty \). The following table summarizes these cases.

Case

Allowed pole order for \(r\)

Allowed value for \(\mathcal {O}(\infty )\)

1

\(\left \{ 0,1,2,4,6,8,\cdots \right \} \)

\(\left \{ \cdots ,-6,-4,-2,0,2,3,4,5,6,\cdots \right \} \)

2

Need to have at least one pole that is either order \(2\) or odd order greater than \(2\). Any other pole order is allowed as long as the above condition is satisfied. Hence the following set of pole orders are all allowed. \(\{1,2\}\),\(\{1,3\}\),\(\{2\}\),\(\{3\}\),\(\{3,4\}\),\(\{1,2,5\}\).

no condition

3

\(\left \{ 1,2\right \} \)

\(\left \{ 2,3,4,5,6,7,\cdots \right \} \)

Table 2.1: Necessary conditions for each Kovacic case

The order of \(r\) at \(\infty \) is the degree of \(t\) minus the degree of \(s\). Therefore

\begin{align*} O\left (\infty \right ) &= \text {deg}(t) - \text {deg}(s) \\ &= 0 - 2 \\ &= -2 \end{align*}

There are no poles in \(r\). Therefore the set of poles \(\Gamma \) is empty. Since there is no odd order pole larger than \(2\) and the order at \(\infty \) is \(-2\) then the necessary conditions for case one are met. Therefore

\begin{align*} L &= [1] \end{align*}

Attempting to find a solution using case \(n=1\).

Since the order of \(r\) at \(\infty \) is \(O_r(\infty ) = -2\) then

\begin{alignat*}{3} v &= \frac {-O_r(\infty )}{2} &&= \frac {2}{2} &&= 1 \end{alignat*}

\([\sqrt r]_\infty \) is the sum of terms involving \(x^i\) for \(0\leq i \leq v\) in the Laurent series for \(\sqrt r\) at \(\infty \). Therefore

\begin{align*} [\sqrt r]_\infty &= \sum _{i=0}^{v} a_i x^i \\ &= \sum _{i=0}^{1} a_i x^i \tag {8} \end{align*}

Let \(a\) be the coefficient of \(x^v=x^1\) in the above sum. The Laurent series of \(\sqrt r\) at \(\infty \) is

\begin{equation} \tag{9} \sqrt r \approx a x -\frac {3}{2 x}-\frac {9}{8 a \,x^{3}}-\frac {27}{16 a^{2} x^{5}}-\frac {405}{128 a^{3} x^{7}}-\frac {1701}{256 a^{4} x^{9}}-\frac {15309}{1024 a^{5} x^{11}}-\frac {72171}{2048 a^{6} x^{13}} + \dots \end{equation}
Comparing Eq. (9) with Eq. (8) shows that
\[ a = a \]
From Eq. (9) the sum up to \(v=1\) gives
\begin{align*} [\sqrt r]_\infty &= \sum _{i=0}^{1} a_i x^i \\ &= a x \tag {10} \end{align*}

Now we need to find \(b\), where \(b\) be the coefficient of \(x^{v-1} = x^{0}=1\) in \(r\) minus the coefficient of same term but in \(\left ( [\sqrt r]_\infty \right )^2 \) where \([\sqrt r]_\infty \) was found above in Eq (10). Hence

\[ \left ( [\sqrt r]_\infty \right )^2 = a^{2} x^{2} \]
This shows that the coefficient of \(1\) in the above is \(0\). Now we need to find the coefficient of \(1\) in \(r\). How this is done depends on if \(v=0\) or not. Since \(v=1\) which is not zero, then starting \(r=\frac {s}{t}\), we do long division and write this in the form
\[ r = Q + \frac {R}{t} \]
Where \(Q\) is the quotient and \(R\) is the remainder. Then the coefficient of \(1\) in \(r\) will be the coefficient this term in the quotient. Doing long division gives
\begin{align*} r &= \frac {s}{t} \\ &= \frac {a \left (a \,x^{2}-3\right )}{1} \\ &= Q + \frac {R}{1} \\ &= \left (a^{2} x^{2}-3 a\right ) + \left ( 0\right ) \\ &= a^{2} x^{2}-3 a \end{align*}

We see that the coefficient of the term \(\frac {1}{x}\) in the quotient is \(-3 a\). Now \(b\) can be found.

\begin{align*} b &= \left (-3 a\right )-\left (0\right )\\ &= -3 a \end{align*}

Hence

\begin{alignat*}{3} [\sqrt r]_\infty &= a x\\ \alpha _{\infty }^{+} &= \frac {1}{2} \left ( \frac {b}{a} - v \right ) &&= \frac {1}{2} \left ( \frac {-3 a}{a} - 1 \right ) &&= -2\\ \alpha _{\infty }^{-} &= \frac {1}{2} \left ( -\frac {b}{a} - v \right ) &&= \frac {1}{2} \left ( -\frac {-3 a}{a} - 1 \right ) &&= 1 \end{alignat*}

The following table summarizes the findings so far for poles and for the order of \(r\) at \(\infty \) where \(r\) is

\[ r=a \left (a \,x^{2}-3\right ) \]

Order of \(r\) at \(\infty \) \([\sqrt r]_\infty \) \(\alpha _\infty ^{+}\) \(\alpha _\infty ^{-}\)
\(-2\) \(a x\) \(-2\) \(1\)

Now that the all \([\sqrt r]_c\) and its associated \(\alpha _c^{\pm }\) have been determined for all the poles in the set \(\Gamma \) and \([\sqrt r]_\infty \) and its associated \(\alpha _\infty ^{\pm }\) have also been found, the next step is to determine possible non negative integer \(d\) from these using

\begin{align*} d &= \alpha _\infty ^{s(\infty )} - \sum _{c \in \Gamma } \alpha _c^{s(c)} \end{align*}

Where \(s(c)\) is either \(+\) or \(-\) and \(s(\infty )\) is the sign of \(\alpha _\infty ^{\pm }\). This is done by trial over all set of families \(s=(s(c))_{c \in \Gamma \cup {\infty }}\) until such \(d\) is found to work in finding candidate \(\omega \). Trying \(\alpha _\infty ^{-} = 1\), and since there are no poles then

\begin{align*} d &= \alpha _\infty ^{-} \\ &= 1 \end{align*}

Since \(d\) an integer and \(d \geq 0\) then it can be used to find \(\omega \) using

\begin{align*} \omega &= \sum _{c \in \Gamma } \left ( s(c) [\sqrt r]_c + \frac {\alpha _c^{s(c)}}{x-c} \right ) + s(\infty ) [\sqrt r]_\infty \end{align*}

The above gives

\begin{align*} \omega &= (-) [\sqrt r]_\infty \\ &= 0 + (-) \left ( a x \right ) \\ &= -a x\\ &= -a x \end{align*}

Now that \(\omega \) is determined, the next step is find a corresponding minimal polynomial \(p(x)\) of degree \(d=1\) to solve the ode. The polynomial \(p(x)\) needs to satisfy the equation

\begin{align*} p'' + 2 \omega p' + \left ( \omega ' +\omega ^2 -r\right ) p = 0 \tag {1A} \end{align*}

Let

\begin{align*} p(x) &= x +a_{0}\tag {2A} \end{align*}

Substituting the above in eq. (1A) gives

\begin{align*} \left (0\right ) + 2 \left (-a x\right ) \left (1\right ) + \left ( \left (-a\right ) + \left (-a x\right )^2 - \left (a \left (a \,x^{2}-3\right )\right ) \right ) &= 0\\ 2 a a_{0} = 0 \end{align*}

Solving for the coefficients \(a_i\) in the above using method of undetermined coefficients gives

\[ \{a_{0} = 0\} \]
Substituting these coefficients in \(p(x)\) in eq. (2A) results in
\begin{align*} p(x) &= x \end{align*}

Therefore the first solution to the ode \(z'' = r z\) is

\begin{align*} z_1(x) &= p e^{ \int \omega \,dx}\\ & = \left (x\right ) {\mathrm e}^{\int -a x d x}\\ & = \left (x\right ) {\mathrm e}^{-\frac {a \,x^{2}}{2}}\\ & = x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}} \end{align*}

The first solution to the original ode in \(u\) is found from

\[ u_1 = z_1 e^{ \int -\frac {1}{2} \frac {B}{A} \,dx} \]

Since \(B=0\) then the above reduces to

\begin{align*} u_1 &= z_1 \\ &= x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}} \\ \end{align*}
Which simplifies to
\[ u_1 = x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}} \]
The second solution \(u_2\) to the original ode is found using reduction of order
\[ u_2 = u_1 \int \frac { e^{\int -\frac {B}{A} \,dx}}{u_1^2} \,dx \]
Since \(B=0\) then the above becomes
\begin{align*} u_2 &= u_1 \int \frac {1}{u_1^2} \,dx \\ &= x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}\int \frac {1}{x^{2} {\mathrm e}^{-a \,x^{2}}} \,dx \\ &= x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}\left (-\frac {{\mathrm e}^{a \,x^{2}}}{x}+\frac {a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right )}{\sqrt {-a}}\right ) \\ \end{align*}
Therefore the solution is
\begin{align*} u &= c_1 u_1 + c_2 u_2 \\ &= c_1 \left (x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}\right ) + c_2 \left (x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}\left (-\frac {{\mathrm e}^{a \,x^{2}}}{x}+\frac {a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right )}{\sqrt {-a}}\right )\right ) \\ \end{align*}
Taking derivative gives
\begin{equation} \tag{4} u^{\prime }\left (x \right ) = c_1 \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}-c_1 \,x^{2} a \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}+\frac {c_2 a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right ) {\mathrm e}^{-\frac {a \,x^{2}}{2}}}{\sqrt {-a}}-\frac {c_2 \left (a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right ) x -{\mathrm e}^{a \,x^{2}} \sqrt {-a}\right ) a x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}}{\sqrt {-a}} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{u} \\ y &= -\frac {c_1 \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}-c_1 \,x^{2} a \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}+\frac {c_2 a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right ) {\mathrm e}^{-\frac {a \,x^{2}}{2}}}{\sqrt {-a}}-\frac {c_2 \left (a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right ) x -{\mathrm e}^{a \,x^{2}} \sqrt {-a}\right ) a x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}}{\sqrt {-a}}}{c_1 x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}+\frac {c_2 \left (a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right ) x -{\mathrm e}^{a \,x^{2}} \sqrt {-a}\right ) {\mathrm e}^{-\frac {a \,x^{2}}{2}}}{\sqrt {-a}}} \\ \end{align*}
Doing change of constants, the above solution becomes
\[ y = -\frac {{\mathrm e}^{-\frac {a \,x^{2}}{2}}-x^{2} a \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}+\frac {c_3 a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right ) {\mathrm e}^{-\frac {a \,x^{2}}{2}}}{\sqrt {-a}}-\frac {c_3 \left (a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right ) x -{\mathrm e}^{a \,x^{2}} \sqrt {-a}\right ) a x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}}{\sqrt {-a}}}{x \,{\mathrm e}^{-\frac {a \,x^{2}}{2}}+\frac {c_3 \left (a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right ) x -{\mathrm e}^{a \,x^{2}} \sqrt {-a}\right ) {\mathrm e}^{-\frac {a \,x^{2}}{2}}}{\sqrt {-a}}} \]
Simplifying the above gives
\begin{align*} y &= \frac {x c_3 \left (-a \right )^{{3}/{2}} {\mathrm e}^{a \,x^{2}}+a c_3 \sqrt {\pi }\, \left (a \,x^{2}-1\right ) \operatorname {erf}\left (\sqrt {-a}\, x \right )-x^{2} \left (-a \right )^{{3}/{2}}-\sqrt {-a}}{-\sqrt {-a}\, {\mathrm e}^{a \,x^{2}} c_3 +x \left (c_3 a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right )+\sqrt {-a}\right )} \\ \end{align*}

Summary of solutions found

\begin{align*} y &= \frac {x c_3 \left (-a \right )^{{3}/{2}} {\mathrm e}^{a \,x^{2}}+a c_3 \sqrt {\pi }\, \left (a \,x^{2}-1\right ) \operatorname {erf}\left (\sqrt {-a}\, x \right )-x^{2} \left (-a \right )^{{3}/{2}}-\sqrt {-a}}{-\sqrt {-a}\, {\mathrm e}^{a \,x^{2}} c_3 +x \left (c_3 a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right )+\sqrt {-a}\right )} \\ \end{align*}
2.2.2.2 Solved using first_order_ode_riccati_by_guessing_particular_solution

0.088 (sec)

Entering first order ode riccati guess solver

\begin{align*} y^{\prime }&=y^{2}-a^{2} x^{2}+3 a \\ \end{align*}
This is a Riccati ODE. Comparing the above ODE to solve with the Riccati standard form
\[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \]
Shows that
\begin{align*} f_0(x) & =-a^{2} x^{2}+3 a\\ f_1(x) & =0\\ f_2(x) &=1 \end{align*}

Using trial and error, the following particular solution was found

\[ y_p = a x -\frac {1}{x} \]
Since a particular solution is known, then the general solution is given by
\begin{align*} y &= y_p + \frac { \phi (x) }{ c_1 - \int { \phi (x) f_2 \,dx} } \end{align*}

Where

\begin{align*} \phi (x) &= e^{ \int 2 f_2 y_p + f_1 \,dx } \end{align*}

Evaluating the above gives the general solution as

\[ y = \frac {x \left (-a \right )^{{3}/{2}} {\mathrm e}^{a \,x^{2}}+a \sqrt {\pi }\, \left (a \,x^{2}-1\right ) \operatorname {erf}\left (\sqrt {-a}\, x \right )+c_1 \left (x^{2} \left (-a \right )^{{3}/{2}}+\sqrt {-a}\right )}{-{\mathrm e}^{a \,x^{2}} \sqrt {-a}+x \left (a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right )-c_1 \sqrt {-a}\right )} \]

Summary of solutions found

\begin{align*} y &= \frac {x \left (-a \right )^{{3}/{2}} {\mathrm e}^{a \,x^{2}}+a \sqrt {\pi }\, \left (a \,x^{2}-1\right ) \operatorname {erf}\left (\sqrt {-a}\, x \right )+c_1 \left (x^{2} \left (-a \right )^{{3}/{2}}+\sqrt {-a}\right )}{-{\mathrm e}^{a \,x^{2}} \sqrt {-a}+x \left (a \sqrt {\pi }\, \operatorname {erf}\left (\sqrt {-a}\, x \right )-c_1 \sqrt {-a}\right )} \\ \end{align*}
2.2.2.3 Maple. Time used: 0.001 (sec). Leaf size: 82
ode:=diff(y(x),x) = y(x)^2-a^2*x^2+3*a; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 a x \,{\mathrm e}^{a \,x^{2}}-c_1 \sqrt {\pi }\, \left (x^{2} \left (-a \right )^{{3}/{2}}+\sqrt {-a}\right ) \operatorname {erf}\left (\sqrt {-a}\, x \right )+a \,x^{2}-1}{\operatorname {erf}\left (\sqrt {-a}\, x \right ) \sqrt {\pi }\, \sqrt {-a}\, c_1 x +c_1 \,{\mathrm e}^{a \,x^{2}}+x} \]

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 Special 
trying Riccati sub-methods: 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE, diff(diff(y(x),x),x) = (a^2*x^2-3*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 
         A Liouvillian solution exists 
         Reducible group (found an exponential solution) 
         Group is reducible, not completely reducible 
      <- Kovacics algorithm successful 
   <- Riccati to 2nd Order successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=y \left (x \right )^{2}-a^{2} x^{2}+3 a \\ \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 )=y \left (x \right )^{2}-a^{2} x^{2}+3 a \end {array} \]
2.2.2.4 Mathematica. Time used: 0.308 (sec). Leaf size: 192
ode=D[y[x],x]==y[x]^2-a^2*x^2+3*a; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {a x \operatorname {ParabolicCylinderD}\left (-2,i \sqrt {2} \sqrt {a} x\right )+i \sqrt {2} \sqrt {a} \operatorname {ParabolicCylinderD}\left (-1,i \sqrt {2} \sqrt {a} x\right )-a c_1 x \operatorname {ParabolicCylinderD}\left (1,\sqrt {2} \sqrt {a} x\right )+\sqrt {2} \sqrt {a} c_1 \operatorname {ParabolicCylinderD}\left (2,\sqrt {2} \sqrt {a} x\right )}{\operatorname {ParabolicCylinderD}\left (-2,i \sqrt {2} \sqrt {a} x\right )+c_1 \operatorname {ParabolicCylinderD}\left (1,\sqrt {2} \sqrt {a} x\right )}\\ y(x)&\to \frac {\sqrt {2} \sqrt {a} \operatorname {ParabolicCylinderD}\left (2,\sqrt {2} \sqrt {a} x\right )}{\operatorname {ParabolicCylinderD}\left (1,\sqrt {2} \sqrt {a} x\right )}-a x \end{align*}
2.2.2.5 Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a**2*x**2 - 3*a - y(x)**2 + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE a**2*x**2 - 3*a - y(x)**2 + Derivative(y(x), x) cannot be solved
 
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)) 
 
('1st_power_series', 'lie_group')