2.2.16 Problem 18

2.2.16.1 Solved using first_order_ode_reduced_riccati
2.2.16.2 Solved using first_order_ode_LIE
2.2.16.3 Solved using first_order_ode_riccati
2.2.16.4 Maple
2.2.16.5 Mathematica
2.2.16.6 Sympy

Internal problem ID [13222]
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 : 18
Date solved : Wednesday, December 31, 2025 at 12:12:09 PM
CAS classification : [_rational, [_Riccati, _special]]

2.2.16.1 Solved using first_order_ode_reduced_riccati

0.296 (sec)

Entering first order ode reduced riccati solver

\begin{align*} y^{\prime } x^{4}&=-x^{4} y^{2}-a^{2} \\ \end{align*}
This is reduced Riccati ode of the form
\begin{align*} y^{\prime }&=a \,x^{n}+b y^{2} \end{align*}

Comparing the given ode to the above shows that

\begin{align*} a &= -a^{2}\\ b &= -1\\ n &= -4 \end{align*}

Since \(n\neq -2\) then the solution of the reduced Riccati ode is given by

\begin{align*} w & =\sqrt {x}\left \{ \begin {array}[c]{cc} c_{1}\operatorname {BesselJ}\left ( \frac {1}{2k},\frac {1}{k}\sqrt {ab} x^{k}\right ) +c_{2}\operatorname {BesselY}\left ( \frac {1}{2k},\frac {1}{k}\sqrt {ab}x^{k}\right ) & ab>0\\ c_{1}\operatorname {BesselI}\left ( \frac {1}{2k},\frac {1}{k}\sqrt {-ab}x^{k}\right ) +c_{2}\operatorname {BesselK}\left ( \frac {1}{2k},\frac {1}{k}\sqrt {-ab}x^{k}\right ) & ab<0 \end {array} \right . \tag {1}\\ y & =-\frac {1}{b}\frac {w^{\prime }}{w}\nonumber \\ k &=1+\frac {n}{2}\nonumber \end{align*}

EQ(1) gives

\begin{align*} k &= -1\\ w &= \sqrt {x}\, \left (\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}-\frac {c_2 \sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}\right ) \end{align*}

Therefore the solution becomes

\begin{align*} y & =-\frac {1}{b}\frac {w^{\prime }}{w} \end{align*}

Substituting the value of \(b,w\) found above and simplifying gives

\[ y = \frac {\frac {\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}-\frac {c_2 \sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}}{2 \sqrt {x}}+\sqrt {x}\, \left (-\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right ) \sqrt {a^{2}}}{2 \sqrt {\pi }\, {\left (-\frac {\sqrt {a^{2}}}{x}\right )}^{{3}/{2}} x^{2}}+\frac {c_1 \sqrt {2}\, \sqrt {a^{2}}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}\, x^{2}}+\frac {c_2 \sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right ) \sqrt {a^{2}}}{2 \sqrt {\pi }\, {\left (-\frac {\sqrt {a^{2}}}{x}\right )}^{{3}/{2}} x^{2}}+\frac {c_2 \sqrt {2}\, \sqrt {a^{2}}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}\, x^{2}}\right )}{\sqrt {x}\, \left (\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}-\frac {c_2 \sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}\right )} \]
Letting \(c_2 = 1\) the above becomes
\[ y = \frac {\frac {\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}-\frac {\sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}}{2 \sqrt {x}}+\sqrt {x}\, \left (-\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right ) \sqrt {a^{2}}}{2 \sqrt {\pi }\, {\left (-\frac {\sqrt {a^{2}}}{x}\right )}^{{3}/{2}} x^{2}}+\frac {c_1 \sqrt {2}\, \sqrt {a^{2}}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}\, x^{2}}+\frac {\sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right ) \sqrt {a^{2}}}{2 \sqrt {\pi }\, {\left (-\frac {\sqrt {a^{2}}}{x}\right )}^{{3}/{2}} x^{2}}+\frac {\sqrt {2}\, \sqrt {a^{2}}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}\, x^{2}}\right )}{\sqrt {x}\, \left (\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}-\frac {\sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}\right )} \]

Summary of solutions found

\begin{align*} y &= \frac {\frac {\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}-\frac {\sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}}{2 \sqrt {x}}+\sqrt {x}\, \left (-\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right ) \sqrt {a^{2}}}{2 \sqrt {\pi }\, {\left (-\frac {\sqrt {a^{2}}}{x}\right )}^{{3}/{2}} x^{2}}+\frac {c_1 \sqrt {2}\, \sqrt {a^{2}}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}\, x^{2}}+\frac {\sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right ) \sqrt {a^{2}}}{2 \sqrt {\pi }\, {\left (-\frac {\sqrt {a^{2}}}{x}\right )}^{{3}/{2}} x^{2}}+\frac {\sqrt {2}\, \sqrt {a^{2}}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}\, x^{2}}\right )}{\sqrt {x}\, \left (\frac {c_1 \sqrt {2}\, \cos \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}-\frac {\sqrt {2}\, \sin \left (\frac {\sqrt {a^{2}}}{x}\right )}{\sqrt {\pi }\, \sqrt {-\frac {\sqrt {a^{2}}}{x}}}\right )} \\ \end{align*}
2.2.16.2 Solved using first_order_ode_LIE

1.796 (sec)

Entering first order ode LIE solver

\begin{align*} y^{\prime } x^{4}&=-x^{4} y^{2}-a^{2} \\ \end{align*}
Writing the ode as
\begin{align*} y^{\prime }&=-\frac {x^{4} y^{2}+a^{2}}{x^{4}}\\ y^{\prime }&= \omega \left ( x,y\right ) \end{align*}

The condition of Lie symmetry is the linearized PDE given by

\begin{align*} \eta _{x}+\omega \left ( \eta _{y}-\xi _{x}\right ) -\omega ^{2}\xi _{y}-\omega _{x}\xi -\omega _{y}\eta =0\tag {A} \end{align*}

To determine \(\xi ,\eta \) then (A) is solved using ansatz. Making bivariate polynomials of degree 2 to use as anstaz gives

\begin{align*} \tag{1E} \xi &= x^{2} a_{4}+x y a_{5}+y^{2} a_{6}+x a_{2}+y a_{3}+a_{1} \\ \tag{2E} \eta &= x^{2} b_{4}+x y b_{5}+y^{2} b_{6}+x b_{2}+y b_{3}+b_{1} \\ \end{align*}
Where the unknown coefficients are
\[ \{a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}, b_{1}, b_{2}, b_{3}, b_{4}, b_{5}, b_{6}\} \]
Substituting equations (1E,2E) and \(\omega \) into (A) gives
\begin{equation} \tag{5E} 2 x b_{4}+y b_{5}+b_{2}-\frac {\left (x^{4} y^{2}+a^{2}\right ) \left (-2 x a_{4}+x b_{5}-y a_{5}+2 y b_{6}-a_{2}+b_{3}\right )}{x^{4}}-\frac {\left (x^{4} y^{2}+a^{2}\right )^{2} \left (x a_{5}+2 y a_{6}+a_{3}\right )}{x^{8}}-\left (-\frac {4 y^{2}}{x}+\frac {4 x^{4} y^{2}+4 a^{2}}{x^{5}}\right ) \left (x^{2} a_{4}+x y a_{5}+y^{2} a_{6}+x a_{2}+y a_{3}+a_{1}\right )+2 y \left (x^{2} b_{4}+x y b_{5}+y^{2} b_{6}+x b_{2}+y b_{3}+b_{1}\right ) = 0 \end{equation}
Putting the above in normal form gives
\[ -\frac {x^{9} y^{4} a_{5}+2 x^{8} y^{5} a_{6}+x^{8} y^{4} a_{3}-2 x^{10} y b_{4}-2 x^{9} y^{2} a_{4}-x^{9} y^{2} b_{5}-x^{8} y^{3} a_{5}-2 x^{9} y b_{2}-x^{8} y^{2} a_{2}-x^{8} y^{2} b_{3}+2 a^{2} x^{5} y^{2} a_{5}+4 a^{2} x^{4} y^{3} a_{6}-2 x^{9} b_{4}-2 x^{8} y b_{1}-y b_{5} x^{8}+2 a^{2} x^{4} y^{2} a_{3}-b_{2} x^{8}+2 a^{2} x^{5} a_{4}+a^{2} x^{5} b_{5}+3 a^{2} x^{4} y a_{5}+2 a^{2} x^{4} y b_{6}+4 a^{2} x^{3} y^{2} a_{6}+3 a^{2} x^{4} a_{2}+a^{2} x^{4} b_{3}+4 a^{2} x^{3} y a_{3}+a^{4} x a_{5}+2 a^{4} y a_{6}+4 a^{2} x^{3} a_{1}+a^{4} a_{3}}{x^{8}} = 0 \]
Setting the numerator to zero gives
\begin{equation} \tag{6E} -x^{9} y^{4} a_{5}-2 x^{8} y^{5} a_{6}-x^{8} y^{4} a_{3}+2 x^{10} y b_{4}+2 x^{9} y^{2} a_{4}+x^{9} y^{2} b_{5}+x^{8} y^{3} a_{5}+2 x^{9} y b_{2}+x^{8} y^{2} a_{2}+x^{8} y^{2} b_{3}-2 a^{2} x^{5} y^{2} a_{5}-4 a^{2} x^{4} y^{3} a_{6}+2 x^{9} b_{4}+2 x^{8} y b_{1}+y b_{5} x^{8}-2 a^{2} x^{4} y^{2} a_{3}+b_{2} x^{8}-2 a^{2} x^{5} a_{4}-a^{2} x^{5} b_{5}-3 a^{2} x^{4} y a_{5}-2 a^{2} x^{4} y b_{6}-4 a^{2} x^{3} y^{2} a_{6}-3 a^{2} x^{4} a_{2}-a^{2} x^{4} b_{3}-4 a^{2} x^{3} y a_{3}-a^{4} x a_{5}-2 a^{4} y a_{6}-4 a^{2} x^{3} a_{1}-a^{4} a_{3} = 0 \end{equation}
Looking at the above PDE shows the following are all the terms with \(\{x, y\}\) in them.
\[ \{x, y\} \]
The following substitution is now made to be able to collect on all terms with \(\{x, y\}\) in them
\[ \{x = v_{1}, y = v_{2}\} \]
The above PDE (6E) now becomes
\begin{equation} \tag{7E} -a_{5} v_{1}^{9} v_{2}^{4}-2 a_{6} v_{1}^{8} v_{2}^{5}-a_{3} v_{1}^{8} v_{2}^{4}+2 a_{4} v_{1}^{9} v_{2}^{2}+a_{5} v_{1}^{8} v_{2}^{3}+2 b_{4} v_{1}^{10} v_{2}+b_{5} v_{1}^{9} v_{2}^{2}+a_{2} v_{1}^{8} v_{2}^{2}+2 b_{2} v_{1}^{9} v_{2}+b_{3} v_{1}^{8} v_{2}^{2}-2 a^{2} a_{5} v_{1}^{5} v_{2}^{2}-4 a^{2} a_{6} v_{1}^{4} v_{2}^{3}+2 b_{1} v_{1}^{8} v_{2}+2 b_{4} v_{1}^{9}+b_{5} v_{1}^{8} v_{2}-2 a^{2} a_{3} v_{1}^{4} v_{2}^{2}+b_{2} v_{1}^{8}-2 a^{2} a_{4} v_{1}^{5}-3 a^{2} a_{5} v_{1}^{4} v_{2}-4 a^{2} a_{6} v_{1}^{3} v_{2}^{2}-a^{2} b_{5} v_{1}^{5}-2 a^{2} b_{6} v_{1}^{4} v_{2}-3 a^{2} a_{2} v_{1}^{4}-4 a^{2} a_{3} v_{1}^{3} v_{2}-a^{2} b_{3} v_{1}^{4}-a^{4} a_{5} v_{1}-2 a^{4} a_{6} v_{2}-4 a^{2} a_{1} v_{1}^{3}-a^{4} a_{3} = 0 \end{equation}
Collecting the above on the terms \(v_i\) introduced, and these are
\[ \{v_{1}, v_{2}\} \]
Equation (7E) now becomes
\begin{equation} \tag{8E} 2 b_{4} v_{1}^{10} v_{2}-a_{5} v_{1}^{9} v_{2}^{4}+\left (2 a_{4}+b_{5}\right ) v_{1}^{9} v_{2}^{2}+2 b_{2} v_{1}^{9} v_{2}+2 b_{4} v_{1}^{9}-2 a_{6} v_{1}^{8} v_{2}^{5}-a_{3} v_{1}^{8} v_{2}^{4}+a_{5} v_{1}^{8} v_{2}^{3}+\left (a_{2}+b_{3}\right ) v_{1}^{8} v_{2}^{2}+\left (2 b_{1}+b_{5}\right ) v_{1}^{8} v_{2}+b_{2} v_{1}^{8}-2 a^{2} a_{5} v_{1}^{5} v_{2}^{2}+\left (-2 a^{2} a_{4}-a^{2} b_{5}\right ) v_{1}^{5}-4 a^{2} a_{6} v_{1}^{4} v_{2}^{3}-2 a^{2} a_{3} v_{1}^{4} v_{2}^{2}+\left (-3 a^{2} a_{5}-2 a^{2} b_{6}\right ) v_{1}^{4} v_{2}+\left (-3 a^{2} a_{2}-a^{2} b_{3}\right ) v_{1}^{4}-4 a^{2} a_{6} v_{1}^{3} v_{2}^{2}-4 a^{2} a_{3} v_{1}^{3} v_{2}-4 a^{2} a_{1} v_{1}^{3}-a^{4} a_{5} v_{1}-2 a^{4} a_{6} v_{2}-a^{4} a_{3} = 0 \end{equation}
Setting each coefficients in (8E) to zero gives the following equations to solve
\begin{align*} a_{5}&=0\\ b_{2}&=0\\ -a_{3}&=0\\ -a_{5}&=0\\ -2 a_{6}&=0\\ 2 b_{2}&=0\\ 2 b_{4}&=0\\ -4 a^{2} a_{1}&=0\\ -4 a^{2} a_{3}&=0\\ -2 a^{2} a_{3}&=0\\ -2 a^{2} a_{5}&=0\\ -4 a^{2} a_{6}&=0\\ -a^{4} a_{3}&=0\\ -a^{4} a_{5}&=0\\ -2 a^{4} a_{6}&=0\\ a_{2}+b_{3}&=0\\ 2 a_{4}+b_{5}&=0\\ 2 b_{1}+b_{5}&=0\\ -3 a^{2} a_{2}-a^{2} b_{3}&=0\\ -2 a^{2} a_{4}-a^{2} b_{5}&=0\\ -3 a^{2} a_{5}-2 a^{2} b_{6}&=0 \end{align*}

Solving the above equations for the unknowns gives

\begin{align*} a_{1}&=0\\ a_{2}&=0\\ a_{3}&=0\\ a_{4}&=b_{1}\\ a_{5}&=0\\ a_{6}&=0\\ b_{1}&=b_{1}\\ b_{2}&=0\\ b_{3}&=0\\ b_{4}&=0\\ b_{5}&=-2 b_{1}\\ b_{6}&=0 \end{align*}

Substituting the above solution in the anstaz (1E,2E) (using \(1\) as arbitrary value for any unknown in the RHS) gives

\begin{align*} \xi &= x^{2} \\ \eta &= -2 x y +1 \\ \end{align*}
Shifting is now applied to make \(\xi =0\) in order to simplify the rest of the computation
\begin{align*} \eta &= \eta - \omega \left (x,y\right ) \xi \\ &= -2 x y +1 - \left (-\frac {x^{4} y^{2}+a^{2}}{x^{4}}\right ) \left (x^{2}\right ) \\ &= \frac {x^{4} y^{2}-2 x^{3} y +a^{2}+x^{2}}{x^{2}}\\ \xi &= 0 \end{align*}

The next step is to determine the canonical coordinates \(R,S\). The canonical coordinates map \(\left ( x,y\right ) \to \left ( R,S \right )\) where \(\left ( R,S \right )\) are the canonical coordinates which make the original ode become a quadrature and hence solved by integration.

The characteristic pde which is used to find the canonical coordinates is

\begin{align*} \frac {d x}{\xi } &= \frac {d y}{\eta } = dS \tag {1} \end{align*}

The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial x} + \eta \frac {\partial }{\partial y}\right ) S(x,y) = 1\). Starting with the first pair of ode’s in (1) gives an ode to solve for the independent variable \(R\) in the canonical coordinates, where \(S(R)\). Since \(\xi =0\) then in this special case

\begin{align*} R = x \end{align*}

\(S\) is found from

\begin{align*} S &= \int { \frac {1}{\eta }} dy\\ &= \int { \frac {1}{\frac {x^{4} y^{2}-2 x^{3} y +a^{2}+x^{2}}{x^{2}}}} dy \end{align*}

Which results in

\begin{align*} S&= \frac {\arctan \left (\frac {2 x^{4} y -2 x^{3}}{2 a \,x^{2}}\right )}{a} \end{align*}

Now that \(R,S\) are found, we need to setup the ode in these coordinates. This is done by evaluating

\begin{align*} \frac {dS}{dR} &= \frac { S_{x} + \omega (x,y) S_{y} }{ R_{x} + \omega (x,y) R_{y} }\tag {2} \end{align*}

Where in the above \(R_{x},R_{y},S_{x},S_{y}\) are all partial derivatives and \(\omega (x,y)\) is the right hand side of the original ode given by

\begin{align*} \omega (x,y) &= -\frac {x^{4} y^{2}+a^{2}}{x^{4}} \end{align*}

Evaluating all the partial derivatives gives

\begin{align*} R_{x} &= 1\\ R_{y} &= 0\\ S_{x} &= \frac {2 x y -1}{x^{4} y^{2}-2 x^{3} y +a^{2}+x^{2}}\\ S_{y} &= \frac {x^{2}}{x^{4} y^{2}-2 x^{3} y +a^{2}+x^{2}} \end{align*}

Substituting all the above in (2) and simplifying gives the ode in canonical coordinates.

\begin{align*} \frac {dS}{dR} &= -\frac {1}{x^{2}}\tag {2A} \end{align*}

We now need to express the RHS as function of \(R\) only. This is done by solving for \(x,y\) in terms of \(R,S\) from the result obtained earlier and simplifying. This gives

\begin{align*} \frac {dS}{dR} &= -\frac {1}{R^{2}} \end{align*}

The above is a quadrature ode. This is the whole point of Lie symmetry method. It converts an ode, no matter how complicated it is, to one that can be solved by integration when the ode is in the canonical coordiates \(R,S\).

Since the ode has the form \(\frac {d}{d R}S \left (R \right )=f(R)\), then we only need to integrate \(f(R)\).

\begin{align*} \int {dS} &= \int {-\frac {1}{R^{2}}\, dR}\\ S \left (R \right ) &= \frac {1}{R} + c_2 \end{align*}
\begin{align*} S \left (R \right )&= \frac {1}{R}+c_2 \end{align*}

To complete the solution, we just need to transform the above back to \(x,y\) coordinates. This results in

\begin{align*} \frac {\arctan \left (\frac {x \left (x y-1\right )}{a}\right )}{a} = \frac {1}{x}+c_2 \end{align*}

Solving for \(y\) gives

\begin{align*} y &= \frac {\tan \left (\frac {a \left (c_2 x +1\right )}{x}\right ) a +x}{x^{2}} \\ \end{align*}

Summary of solutions found

\begin{align*} y &= \frac {\tan \left (\frac {a \left (c_2 x +1\right )}{x}\right ) a +x}{x^{2}} \\ \end{align*}
2.2.16.3 Solved using first_order_ode_riccati

2.490 (sec)

Entering first order ode riccati solver

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

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = \textit {the\_rhs} \]
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^{4}}\), \(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 &=-\frac {a^{2}}{x^{4}} \end{align*}

Substituting the above terms back in equation (2) gives

\[ -u^{\prime \prime }\left (x \right )-\frac {a^{2} u \left (x \right )}{x^{4}} = 0 \]
Entering second order bessel ode solverWriting the ode as
\begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )+\frac {a^{2} u}{x^{2}} = 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}{2}}\\ \beta &= a\\ n &= {\frac {1}{2}}\\ \gamma &= -1 \end{align*}

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

\begin{align*} u = \frac {c_1 \sqrt {x}\, \sqrt {2}\, \sin \left (\frac {a}{x}\right )}{\sqrt {\pi }\, \sqrt {\frac {a}{x}}}-\frac {c_2 \sqrt {x}\, \sqrt {2}\, \cos \left (\frac {a}{x}\right )}{\sqrt {\pi }\, \sqrt {\frac {a}{x}}} \end{align*}

Taking derivative gives

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

Summary of solutions found

\begin{align*} y &= \frac {\left (c_3 x +a \right ) \cos \left (\frac {a}{x}\right )+\sin \left (\frac {a}{x}\right ) \left (c_3 a -x \right )}{x^{2} \left (-\sin \left (\frac {a}{x}\right )+c_3 \cos \left (\frac {a}{x}\right )\right )} \\ \end{align*}
2.2.16.4 Maple. Time used: 0.002 (sec). Leaf size: 24
ode:=x^4*diff(y(x),x) = -y(x)^2*x^4-a^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-a \tan \left (\frac {a \left (c_1 x -1\right )}{x}\right )+x}{x^{2}} \]

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 
<- Riccati Special successful
 

Maple step by step

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