2.22.2 Problem 2
Internal
problem
ID
[13497]
Book
:
Handbook
of
exact
solutions
for
ordinary
differential
equations.
By
Polyanin
and
Zaitsev.
Second
edition
Section
:
Chapter
1,
section
1.3.
Abel
Equations
of
the
Second
Kind.
subsection
1.3.1-2.
Solvable
equations
and
their
solutions
Problem
number
:
2
Date
solved
:
Sunday, January 18, 2026 at 08:30:30 PM
CAS
classification
:
[[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]
2.22.2.1 Solved using first_order_ode_dAlembert
1.150 (sec)
Entering first order ode dAlembert solver
\begin{align*}
y y^{\prime }-y&=A x +B \\
\end{align*}
Let \(p=y^{\prime }\) the ode becomes \begin{align*} y p -y = A x +B \end{align*}
Solving for \(y\) from the above results in
\begin{align*}
\tag{1} y &= \frac {A x}{p -1}+\frac {B}{p -1} \\
\end{align*}
This has the form \begin{align*} y=x f(p)+g(p)\tag {*} \end{align*}
Where \(f,g\) are functions of \(p=y'(x)\). The above ode is dAlembert ode which is now solved.
Taking derivative of (*) w.r.t. \(x\) gives
\begin{align*} p &= f+(x f'+g') \frac {dp}{dx}\\ p-f &= (x f'+g') \frac {dp}{dx}\tag {2} \end{align*}
Comparing the form \(y=x f + g\) to (1A) shows that
\begin{align*} f &= \frac {A}{p -1}\\ g &= \frac {B}{p -1} \end{align*}
Hence (2) becomes
\begin{equation}
\tag{2A} p -\frac {A}{p -1} = \left (-\frac {x A}{\left (p -1\right )^{2}}-\frac {B}{\left (p -1\right )^{2}}\right ) p^{\prime }\left (x \right )
\end{equation}
The singular solution is found by setting \(\frac {dp}{dx}=0\) in the above which gives
\begin{align*} p -\frac {A}{p -1} = 0 \end{align*}
Solving the above for \(p\) results in
\begin{align*} p_{1} &=\frac {1}{2}+\frac {\sqrt {4 A +1}}{2}\\ p_{2} &=\frac {1}{2}-\frac {\sqrt {4 A +1}}{2} \end{align*}
Substituting these in (1A) and keeping singular solution that verifies the ode gives
\begin{align*} y = \frac {\left (A x +B \right ) \left (1+\sqrt {4 A +1}\right )}{2 A}\\ y = -\frac {\left (A x +B \right ) \left (-1+\sqrt {4 A +1}\right )}{2 A} \end{align*}
The general solution is found when \( \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}x}}\neq 0\). From eq. (2A). This results in
\begin{equation}
\tag{3} p^{\prime }\left (x \right ) = \frac {p \left (x \right )-\frac {A}{p \left (x \right )-1}}{-\frac {x A}{\left (p \left (x \right )-1\right )^{2}}-\frac {B}{\left (p \left (x \right )-1\right )^{2}}}
\end{equation}
This ODE is now solved for \(p \left (x \right )\).
No inversion is needed.
The ode
\begin{equation}
p^{\prime }\left (x \right ) = \frac {\left (p \left (x \right )-1\right ) \left (-p \left (x \right )^{2}+A +p \left (x \right )\right )}{A x +B}
\end{equation}
is separable as it can be written as \begin{align*} p^{\prime }\left (x \right )&= \frac {\left (p \left (x \right )-1\right ) \left (-p \left (x \right )^{2}+A +p \left (x \right )\right )}{A x +B}\\ &= f(x) g(p) \end{align*}
Where
\begin{align*} f(x) &= \frac {1}{A x +B}\\ g(p) &= \left (p -1\right ) \left (-p^{2}+A +p \right ) \end{align*}
Integrating gives
\begin{align*}
\int { \frac {1}{g(p)} \,dp} &= \int { f(x) \,dx} \\
\int { \frac {1}{\left (p -1\right ) \left (-p^{2}+A +p \right )}\,dp} &= \int { \frac {1}{A x +B} \,dx} \\
\end{align*}
\[
\frac {\ln \left (p \left (x \right )-1\right )-\frac {\ln \left (-p \left (x \right )^{2}+A +p \left (x \right )\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 p \left (x \right )-1}{\sqrt {4 A +1}}\right )}{\sqrt {4 A +1}}}{A}=\frac {\ln \left (A x +B \right )}{A}+c_1
\]
We now need to find the singular solutions, these are found by finding
for what values \(g(p)\) is zero, since we had to divide by this above. Solving \(g(p)=0\) or \[
\left (p -1\right ) \left (-p^{2}+A +p \right )=0
\]
for \(p \left (x \right )\) gives
\begin{align*} p \left (x \right )&=1\\ p \left (x \right )&=\frac {1}{2}-\frac {\sqrt {4 A +1}}{2} \end{align*}
Now we go over each such singular solution and check if it verifies the ode itself and any initial
conditions given. If it does not then the singular solution will not be used.
Therefore the solutions found are
\begin{align*}
\frac {\ln \left (p \left (x \right )-1\right )-\frac {\ln \left (-p \left (x \right )^{2}+A +p \left (x \right )\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 p \left (x \right )-1}{\sqrt {4 A +1}}\right )}{\sqrt {4 A +1}}}{A} &= \frac {\ln \left (A x +B \right )}{A}+c_1 \\
p \left (x \right ) &= 1 \\
p \left (x \right ) &= \frac {1}{2}-\frac {\sqrt {4 A +1}}{2} \\
\end{align*}
Substituing the above solution for \(p\) in (2A) gives
\begin{align*}
y &= -\frac {\left (A x +B \right ) \left (-1+\sqrt {4 A +1}\right )}{2 A} \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= -\frac {\left (A x +B \right ) \left (-1+\sqrt {4 A +1}\right )}{2 A} \\
y &= \frac {\left (A x +B \right ) \left (1+\sqrt {4 A +1}\right )}{2 A} \\
\end{align*}
2.22.2.2 Solved using first_order_ode_homog_type_maple_C
2.966 (sec)
Entering first order ode homog type maple C solver
\begin{align*}
y y^{\prime }-y&=A x +B \\
\end{align*}
Let \(Y = y -y_{0}\) and \(X = x -x_{0}\) then the above is transformed to
new ode in \(Y(X)\) \[
\frac {d}{d X}Y \left (X \right ) = \frac {Y \left (X \right )+y_{0} +A \left (X +x_{0} \right )+B}{Y \left (X \right )+y_{0}}
\]
Solving for possible values of \(x_{0}\) and \(y_{0}\) which makes the above ode a homogeneous ode
results in \begin{align*} x_{0}&=-\frac {B}{A}\\ y_{0}&=0 \end{align*}
Using these values now it is possible to easily solve for \(Y \left (X \right )\). The above ode now becomes
\begin{align*} \frac {d}{d X}Y \left (X \right ) = \frac {A X +Y \left (X \right )}{Y \left (X \right )} \end{align*}
In canonical form, the ODE is
\begin{align*} Y' &= F(X,Y)\\ &= \frac {A X +Y}{Y}\tag {1} \end{align*}
An ode of the form \(Y' = \frac {M(X,Y)}{N(X,Y)}\) is called homogeneous if the functions \(M(X,Y)\) and \(N(X,Y)\) are both homogeneous functions
and of the same order. Recall that a function \(f(X,Y)\) is homogeneous of order \(n\) if
\[ f(t^n X, t^n Y)= t^n f(X,Y) \]
In this case, it can be
seen that both \(M=A X +Y\) and \(N=Y\) are both homogeneous and of the same order \(n=1\). Therefore this is a
homogeneous ode. Since this ode is homogeneous, it is converted to separable ODE using the
substitution \(u=\frac {Y}{X}\), or \(Y=uX\). Hence \[ \frac { \mathop {\mathrm {d}Y}}{\mathop {\mathrm {d}X}}= \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}X}}X + u \]
Applying the transformation \(Y=uX\) to the above ODE in (1) gives
\begin{align*} \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}X}}X + u &= \frac {A}{u}+1\\ \frac { \mathop {\mathrm {d}u}}{\mathop {\mathrm {d}X}} &= \frac {\frac {A}{u \left (X \right )}+1-u \left (X \right )}{X} \end{align*}
Or
\[ \frac {d}{d X}u \left (X \right )-\frac {\frac {A}{u \left (X \right )}+1-u \left (X \right )}{X} = 0 \]
Or \[ \left (\frac {d}{d X}u \left (X \right )\right ) u \left (X \right ) X +u \left (X \right )^{2}-A -u \left (X \right ) = 0 \]
Which is now solved as separable in \(u \left (X \right )\).
The ode
\begin{equation}
\frac {d}{d X}u \left (X \right ) = \frac {-u \left (X \right )^{2}+A +u \left (X \right )}{u \left (X \right ) X}
\end{equation}
is separable as it can be written as \begin{align*} \frac {d}{d X}u \left (X \right )&= \frac {-u \left (X \right )^{2}+A +u \left (X \right )}{u \left (X \right ) X}\\ &= f(X) g(u) \end{align*}
Where
\begin{align*} f(X) &= \frac {1}{X}\\ g(u) &= \frac {-u^{2}+A +u}{u} \end{align*}
Integrating gives
\begin{align*}
\int { \frac {1}{g(u)} \,du} &= \int { f(X) \,dX} \\
\int { \frac {u}{-u^{2}+A +u}\,du} &= \int { \frac {1}{X} \,dX} \\
\end{align*}
\[
-\frac {\ln \left (-u \left (X \right )^{2}+A +u \left (X \right )\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 u \left (X \right )-1}{\sqrt {4 A +1}}\right )}{\sqrt {4 A +1}}=\ln \left (X \right )+c_1
\]
We now need to find the singular solutions, these are found by finding
for what values \(g(u)\) is zero, since we had to divide by this above. Solving \(g(u)=0\) or \[
\frac {-u^{2}+A +u}{u}=0
\]
for \(u \left (X \right )\) gives
\begin{align*} u \left (X \right )&=\frac {1}{2}-\frac {\sqrt {4 A +1}}{2}\\ u \left (X \right )&=\frac {1}{2}+\frac {\sqrt {4 A +1}}{2} \end{align*}
Now we go over each such singular solution and check if it verifies the ode itself and any initial
conditions given. If it does not then the singular solution will not be used.
Therefore the solutions found are
\begin{align*}
-\frac {\ln \left (-u \left (X \right )^{2}+A +u \left (X \right )\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 u \left (X \right )-1}{\sqrt {4 A +1}}\right )}{\sqrt {4 A +1}} &= \ln \left (X \right )+c_1 \\
u \left (X \right ) &= \frac {1}{2}-\frac {\sqrt {4 A +1}}{2} \\
u \left (X \right ) &= \frac {1}{2}+\frac {\sqrt {4 A +1}}{2} \\
\end{align*}
Converting \(-\frac {\ln \left (-u \left (X \right )^{2}+A +u \left (X \right )\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 u \left (X \right )-1}{\sqrt {4 A +1}}\right )}{\sqrt {4 A +1}} = \ln \left (X \right )+c_1\) back to \(Y \left (X \right )\) gives \begin{align*} -\frac {\ln \left (\frac {A \,X^{2}-Y \left (X \right )^{2}+Y \left (X \right ) X}{X^{2}}\right ) \sqrt {4 A +1}+2 \,\operatorname {arctanh}\left (\frac {-2 Y \left (X \right )+X}{\sqrt {4 A +1}\, X}\right )}{2 \sqrt {4 A +1}} = \ln \left (X \right )+c_1 \end{align*}
Converting \(u \left (X \right ) = \frac {1}{2}-\frac {\sqrt {4 A +1}}{2}\) back to \(Y \left (X \right )\) gives
\begin{align*} Y \left (X \right ) = X \left (\frac {1}{2}-\frac {\sqrt {4 A +1}}{2}\right ) \end{align*}
Converting \(u \left (X \right ) = \frac {1}{2}+\frac {\sqrt {4 A +1}}{2}\) back to \(Y \left (X \right )\) gives
\begin{align*} Y \left (X \right ) = X \left (\frac {1}{2}+\frac {\sqrt {4 A +1}}{2}\right ) \end{align*}
Using the solution for \(Y(X)\)
\begin{align*} -\frac {\ln \left (\frac {A \,X^{2}-Y \left (X \right )^{2}+Y \left (X \right ) X}{X^{2}}\right ) \sqrt {4 A +1}+2 \,\operatorname {arctanh}\left (\frac {-2 Y \left (X \right )+X}{\sqrt {4 A +1}\, X}\right )}{2 \sqrt {4 A +1}} = \ln \left (X \right )+c_1\tag {A} \end{align*}
And replacing back terms in the above solution using
\begin{align*} Y &= y +y_{0}\\ X &= x +x_{0} \end{align*}
Or
\begin{align*} Y &= y\\ X &= x -\frac {B}{A} \end{align*}
Then the solution in \(y\) becomes using EQ (A)
\begin{align*} -\frac {\ln \left (\frac {A \left (x +\frac {B}{A}\right )^{2}-y^{2}+y \left (x +\frac {B}{A}\right )}{\left (x +\frac {B}{A}\right )^{2}}\right ) \sqrt {4 A +1}+2 \,\operatorname {arctanh}\left (\frac {-2 y+x +\frac {B}{A}}{\sqrt {4 A +1}\, \left (x +\frac {B}{A}\right )}\right )}{2 \sqrt {4 A +1}} = \ln \left (x +\frac {B}{A}\right )+c_1 \end{align*}
Using the solution for \(Y(X)\)
\begin{align*} Y \left (X \right ) = X \left (\frac {1}{2}-\frac {\sqrt {4 A +1}}{2}\right )\tag {A} \end{align*}
And replacing back terms in the above solution using
\begin{align*} Y &= y +y_{0}\\ X &= x +x_{0} \end{align*}
Or
\begin{align*} Y &= y\\ X &= x -\frac {B}{A} \end{align*}
Then the solution in \(y\) becomes using EQ (A)
\begin{align*} y = \left (x +\frac {B}{A}\right ) \left (\frac {1}{2}-\frac {\sqrt {4 A +1}}{2}\right ) \end{align*}
Using the solution for \(Y(X)\)
\begin{align*} Y \left (X \right ) = X \left (\frac {1}{2}+\frac {\sqrt {4 A +1}}{2}\right )\tag {A} \end{align*}
And replacing back terms in the above solution using
\begin{align*} Y &= y +y_{0}\\ X &= x +x_{0} \end{align*}
Or
\begin{align*} Y &= y\\ X &= x -\frac {B}{A} \end{align*}
Then the solution in \(y\) becomes using EQ (A)
\begin{align*} y = \left (x +\frac {B}{A}\right ) \left (\frac {1}{2}+\frac {\sqrt {4 A +1}}{2}\right ) \end{align*}
Simplifying the above gives
\begin{align*}
-\frac {\frac {\ln \left (\frac {\left (\left (A x +B \right )^{2}-A y^{2}+y \left (A x +B \right )\right ) A}{\left (A x +B \right )^{2}}\right ) \sqrt {4 A +1}}{2}+\operatorname {arctanh}\left (\frac {-2 A y+A x +B}{\sqrt {4 A +1}\, \left (A x +B \right )}\right )}{\sqrt {4 A +1}} &= \ln \left (x +\frac {B}{A}\right )+c_1 \\
y &= -\frac {\left (A x +B \right ) \left (-1+\sqrt {4 A +1}\right )}{2 A} \\
y &= \frac {\left (A x +B \right ) \left (1+\sqrt {4 A +1}\right )}{2 A} \\
\end{align*}
Summary of solutions found
\begin{align*}
-\frac {\frac {\ln \left (\frac {\left (\left (A x +B \right )^{2}-A y^{2}+y \left (A x +B \right )\right ) A}{\left (A x +B \right )^{2}}\right ) \sqrt {4 A +1}}{2}+\operatorname {arctanh}\left (\frac {-2 A y+A x +B}{\sqrt {4 A +1}\, \left (A x +B \right )}\right )}{\sqrt {4 A +1}} &= \ln \left (x +\frac {B}{A}\right )+c_1 \\
y &= -\frac {\left (A x +B \right ) \left (-1+\sqrt {4 A +1}\right )}{2 A} \\
y &= \frac {\left (A x +B \right ) \left (1+\sqrt {4 A +1}\right )}{2 A} \\
\end{align*}
Entering first order ode abel second kind solver\begin{align*}
y y^{\prime }-y&=A x +B \\
\end{align*}
2.22.2.3 Solved using first_order_ode_abel_second_kind_table_5_lookup
0.180 (sec)
This solution is given by a lookup into table 5 in the book Handbook of exact solutions in
parametric form as follows
\[
y = \frac {\operatorname {RootOf}\left (c_1 \,{\mathrm e}^{\int _{}^{\textit {\_Z}}\frac {\tau }{-\tau ^{2}+A +\tau }d \tau } A -A x -B \right ) \left (A x +B \right )}{A}
\]
The solution \(y = \frac {\operatorname {RootOf}\left (c_1 \,{\mathrm e}^{\int _{}^{\textit {\_Z}}\frac {\tau }{-\tau ^{2}+A +\tau }d \tau } A -A x -B \right ) \left (A x +B \right )}{A}\) simplifies to \begin{align*}
y &= \frac {\operatorname {RootOf}\left (c_1 \,{\mathrm e}^{\int _{}^{\textit {\_Z}}\frac {\tau }{-\tau ^{2}+A +\tau }d \tau } A -A x -B \right ) \left (A x +B \right )}{A} \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= \frac {\operatorname {RootOf}\left (c_1 \,{\mathrm e}^{\int _{}^{\textit {\_Z}}\frac {\tau }{-\tau ^{2}+A +\tau }d \tau } A -A x -B \right ) \left (A x +B \right )}{A} \\
\end{align*}
2.22.2.4 Solved using first_order_ode_abel_second_kind_solved_by_converting_to_first_kind
19.426 (sec)
This is Abel second kind ODE, it has the form
\[ \left (y+g\right )y^{\prime }= f_0(x)+f_1(x) y +f_2(x)y^{2}+f_3(x)y^{3} \]
Comparing the above to given ODE which is
\begin{align*}y y^{\prime }-y = A x +B\tag {1} \end{align*}
Shows that
\begin{align*} g &= 0\\ f_0 &= A x +B\\ f_1 &= 1\\ f_2 &= 0\\ f_3 &= 0 \end{align*}
Applying transformation
\begin{align*} y&=\frac {1}{u(x)}-g \end{align*}
Results in the new ode which is Abel first kind
\begin{align*} u^{\prime }\left (x \right ) = \left (-A x -B \right ) u \left (x \right )^{3}-u \left (x \right )^{2} \end{align*}
Which is now solved. Entering first order ode abel first kind solverThis is Abel first kind ODE, it
has the form
\[ u^{\prime }\left (x \right )= f_0(x)+f_1(x) u \left (x \right ) +f_2(x)u \left (x \right )^{2}+f_3(x)u \left (x \right )^{3} \]
Comparing the above to given ODE which is \begin{align*}u^{\prime }\left (x \right )&=\left (-A x -B \right ) u \left (x \right )^{3}-u \left (x \right )^{2}\tag {1} \end{align*}
Therefore
\begin{align*} f_0 &= 0\\ f_1 &= 0\\ f_2 &= -1\\ f_3 &= -A x -B \end{align*}
Hence
\begin{align*} f'_{0} &= 0\\ f'_{3} &= -A \end{align*}
Since \(f_2(x)=-1\) is not zero, then the followingtransformation is used to remove \(f_2\). Let \(u \left (x \right ) = u(x) - \frac {f_2}{3 f_3}\) or
\begin{align*} u \left (x \right ) &= u(x) - \left ( \frac {-1}{-3 A x -3 B} \right ) \\ &= u \left (x \right )-\frac {1}{3 A x +3 B} \end{align*}
The above transformation applied to (1) gives a new ODE as
\begin{align*} u^{\prime }\left (x \right ) = -\frac {\left (27 A^{3} x^{3}+81 A^{2} B \,x^{2}+81 A \,B^{2} x +27 B^{3}\right ) u \left (x \right )^{3}}{27 \left (A x +B \right )^{2}}-\frac {\left (-9 A x -9 B \right ) u \left (x \right )}{27 \left (A x +B \right )^{2}}-\frac {9 A +2}{27 \left (A x +B \right )^{2}}\tag {2} \end{align*}
The above ODE (2) can now be solved.
Entering first order ode LIE solverWriting the ode as
\begin{align*} u^{\prime }\left (x \right )&=-\frac {27 u^{3} A^{3} x^{3}+81 u^{3} A^{2} B \,x^{2}+81 u^{3} A \,B^{2} x +27 u^{3} B^{3}-9 u A x -9 u B +9 A +2}{27 \left (A x +B \right )^{2}}\\ u^{\prime }\left (x \right )&= \omega \left ( x,u \left (x \right )\right ) \end{align*}
The condition of Lie symmetry is the linearized PDE given by
\begin{align*} \eta _{x}+\omega \left ( \eta _{u \left (x \right )}-\xi _{x}\right ) -\omega ^{2}\xi _{u \left (x \right )}-\omega _{x}\xi -\omega _{u \left (x \right )}\eta =0\tag {A} \end{align*}
To determine \(\xi ,\eta \) then (A) is solved using ansatz. Making bivariate polynomials of degree 1 to use as
anstaz gives
\begin{align*}
\tag{1E} \xi &= u a_{3}+x a_{2}+a_{1} \\
\tag{2E} \eta &= u b_{3}+x b_{2}+b_{1} \\
\end{align*}
Where the unknown coefficients are \[
\{a_{1}, a_{2}, a_{3}, b_{1}, b_{2}, b_{3}\}
\]
Substituting equations (1E,2E) and \(\omega \) into (A)
gives \begin{equation}
\tag{5E} b_{2}-\frac {\left (27 u^{3} A^{3} x^{3}+81 u^{3} A^{2} B \,x^{2}+81 u^{3} A \,B^{2} x +27 u^{3} B^{3}-9 u A x -9 u B +9 A +2\right ) \left (b_{3}-a_{2}\right )}{27 \left (A x +B \right )^{2}}-\frac {\left (27 u^{3} A^{3} x^{3}+81 u^{3} A^{2} B \,x^{2}+81 u^{3} A \,B^{2} x +27 u^{3} B^{3}-9 u A x -9 u B +9 A +2\right )^{2} a_{3}}{729 \left (A x +B \right )^{4}}-\left (-\frac {81 A^{3} u^{3} x^{2}+162 A^{2} B \,u^{3} x +81 A \,u^{3} B^{2}-9 A u}{27 \left (A x +B \right )^{2}}+\frac {2 \left (27 u^{3} A^{3} x^{3}+81 u^{3} A^{2} B \,x^{2}+81 u^{3} A \,B^{2} x +27 u^{3} B^{3}-9 u A x -9 u B +9 A +2\right ) A}{27 \left (A x +B \right )^{3}}\right ) \left (u a_{3}+x a_{2}+a_{1}\right )+\frac {\left (81 A^{3} u^{2} x^{3}+243 A^{2} B \,u^{2} x^{2}+243 A \,B^{2} u^{2} x +81 B^{3} u^{2}-9 A x -9 B \right ) \left (u b_{3}+x b_{2}+b_{1}\right )}{27 \left (A x +B \right )^{2}} = 0
\end{equation}
Putting the above in normal form gives \[
\text {Expression too large to display}
\]
Setting the numerator to zero gives \begin{equation}
\tag{6E} \text {Expression too large to display}
\end{equation}
Looking at the
above PDE shows the following are all the terms with \(\{u, x\}\) in them. \[
\{u, x\}
\]
The following substitution is now
made to be able to collect on all terms with \(\{u, x\}\) in them \[
\{u = v_{1}, x = v_{2}\}
\]
The above PDE (6E) now becomes
\begin{equation}
\tag{7E} \text {Expression too large to display}
\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} \left (729 A \,B^{4} a_{3}+486 B^{4} a_{3}\right ) v_{1}^{4}+\left (729 A \,B^{4} a_{1}+729 B^{5} a_{2}+1458 B^{5} b_{3}-486 A \,B^{3} a_{3}-108 B^{3} a_{3}\right ) v_{1}^{3}+\left (2187 B^{5} b_{1}+243 A \,B^{2} a_{3}-81 B^{2} a_{3}\right ) v_{1}^{2}+\left (-486 A^{2} B a_{3}+243 A \,B^{2} a_{1}-243 B^{3} a_{2}+54 A B a_{3}+36 B a_{3}\right ) v_{1}+\left (729 A^{4} b_{2}-243 A^{3} b_{2}\right ) v_{2}^{4}+\left (2916 A^{3} B b_{2}-243 A^{3} b_{1}-729 A^{2} B b_{2}\right ) v_{2}^{3}+\left (4374 A^{2} B^{2} b_{2}-243 A^{3} a_{2}-243 A^{3} b_{3}-729 A^{2} B b_{1}-729 A \,B^{2} b_{2}-54 A^{2} a_{2}-54 A^{2} b_{3}\right ) v_{2}^{2}+\left (2916 A \,B^{3} b_{2}-486 A^{3} a_{1}-486 A^{2} B b_{3}-729 A \,B^{2} b_{1}-243 B^{3} b_{2}-108 A^{2} a_{1}-108 A B b_{3}\right ) v_{2}-729 B^{6} a_{3} v_{1}^{6}+243 A \,B^{2} a_{2}-243 A \,B^{2} b_{3}-486 A^{2} B a_{1}-108 A B a_{1}+\left (2187 A^{5} b_{1}+10935 A^{4} B b_{2}\right ) v_{1}^{2} v_{2}^{5}+\left (10935 A^{4} B b_{1}+21870 A^{3} B^{2} b_{2}\right ) v_{1}^{2} v_{2}^{4}+\left (21870 A^{3} B^{2} b_{1}+21870 A^{2} B^{3} b_{2}\right ) v_{1}^{2} v_{2}^{3}+\left (21870 A^{2} B^{3} b_{1}+10935 A \,B^{4} b_{2}+243 A^{3} a_{3}-81 A^{2} a_{3}\right ) v_{1}^{2} v_{2}^{2}+\left (10935 A \,B^{4} b_{1}+2187 B^{5} b_{2}+486 A^{2} B a_{3}-162 A B a_{3}\right ) v_{1}^{2} v_{2}+\left (243 A^{3} a_{1}-243 A^{2} B a_{2}\right ) v_{1} v_{2}^{2}+\left (-486 A^{3} a_{3}+486 A^{2} B a_{1}-486 A \,B^{2} a_{2}+54 A^{2} a_{3}+36 A a_{3}\right ) v_{1} v_{2}+\left (729 A^{5} a_{3}+486 A^{4} a_{3}\right ) v_{1}^{4} v_{2}^{4}+\left (2916 A^{4} B a_{3}+1944 A^{3} B a_{3}\right ) v_{1}^{4} v_{2}^{3}+\left (4374 A^{3} B^{2} a_{3}+2916 A^{2} B^{2} a_{3}\right ) v_{1}^{4} v_{2}^{2}+\left (2916 A^{2} B^{3} a_{3}+1944 A \,B^{3} a_{3}\right ) v_{1}^{4} v_{2}+\left (1458 A^{5} a_{2}+1458 A^{5} b_{3}\right ) v_{1}^{3} v_{2}^{5}+\left (729 A^{5} a_{1}+6561 A^{4} B a_{2}+7290 A^{4} B b_{3}\right ) v_{1}^{3} v_{2}^{4}+\left (2916 A^{4} B a_{1}+11664 A^{3} B^{2} a_{2}+14580 A^{3} B^{2} b_{3}-486 A^{4} a_{3}-108 A^{3} a_{3}\right ) v_{1}^{3} v_{2}^{3}+\left (4374 A^{3} B^{2} a_{1}+10206 A^{2} B^{3} a_{2}+14580 A^{2} B^{3} b_{3}-1458 A^{3} B a_{3}-324 A^{2} B a_{3}\right ) v_{1}^{3} v_{2}^{2}+\left (2916 A^{2} B^{3} a_{1}+4374 A \,B^{4} a_{2}+7290 A \,B^{4} b_{3}-1458 A^{2} B^{2} a_{3}-324 A \,B^{2} a_{3}\right ) v_{1}^{3} v_{2}+729 B^{4} b_{2}+54 B^{2} a_{2}-54 B^{2} b_{3}-81 A^{2} a_{3}-36 A a_{3}-243 B^{3} b_{1}-4374 A^{5} B a_{3} v_{1}^{6} v_{2}^{5}-10935 A^{4} B^{2} a_{3} v_{1}^{6} v_{2}^{4}-14580 A^{3} B^{3} a_{3} v_{1}^{6} v_{2}^{3}-10935 A^{2} B^{4} a_{3} v_{1}^{6} v_{2}^{2}-4374 A \,B^{5} a_{3} v_{1}^{6} v_{2}-729 A^{6} a_{3} v_{1}^{6} v_{2}^{6}+2187 A^{5} b_{2} v_{1}^{2} v_{2}^{6}-4 a_{3} = 0
\end{equation}
Setting each coefficients in (8E) to zero gives the following equations to solve
\begin{align*} 2187 A^{5} b_{2}&=0\\ -729 A^{6} a_{3}&=0\\ -729 B^{6} a_{3}&=0\\ -4374 A \,B^{5} a_{3}&=0\\ -10935 A^{2} B^{4} a_{3}&=0\\ -14580 A^{3} B^{3} a_{3}&=0\\ -10935 A^{4} B^{2} a_{3}&=0\\ -4374 A^{5} B a_{3}&=0\\ 729 A^{5} a_{3}+486 A^{4} a_{3}&=0\\ 729 A^{4} b_{2}-243 A^{3} b_{2}&=0\\ 729 A \,B^{4} a_{3}+486 B^{4} a_{3}&=0\\ 2916 A^{2} B^{3} a_{3}+1944 A \,B^{3} a_{3}&=0\\ 4374 A^{3} B^{2} a_{3}+2916 A^{2} B^{2} a_{3}&=0\\ 2916 A^{4} B a_{3}+1944 A^{3} B a_{3}&=0\\ 1458 A^{5} a_{2}+1458 A^{5} b_{3}&=0\\ 243 A^{3} a_{1}-243 A^{2} B a_{2}&=0\\ 21870 A^{3} B^{2} b_{1}+21870 A^{2} B^{3} b_{2}&=0\\ 10935 A^{4} B b_{1}+21870 A^{3} B^{2} b_{2}&=0\\ 2187 A^{5} b_{1}+10935 A^{4} B b_{2}&=0\\ 2187 B^{5} b_{1}+243 A \,B^{2} a_{3}-81 B^{2} a_{3}&=0\\ 2916 A^{3} B b_{2}-243 A^{3} b_{1}-729 A^{2} B b_{2}&=0\\ 729 A^{5} a_{1}+6561 A^{4} B a_{2}+7290 A^{4} B b_{3}&=0\\ 10935 A \,B^{4} b_{1}+2187 B^{5} b_{2}+486 A^{2} B a_{3}-162 A B a_{3}&=0\\ 21870 A^{2} B^{3} b_{1}+10935 A \,B^{4} b_{2}+243 A^{3} a_{3}-81 A^{2} a_{3}&=0\\ -486 A^{2} B a_{3}+243 A \,B^{2} a_{1}-243 B^{3} a_{2}+54 A B a_{3}+36 B a_{3}&=0\\ -486 A^{3} a_{3}+486 A^{2} B a_{1}-486 A \,B^{2} a_{2}+54 A^{2} a_{3}+36 A a_{3}&=0\\ 729 A \,B^{4} a_{1}+729 B^{5} a_{2}+1458 B^{5} b_{3}-486 A \,B^{3} a_{3}-108 B^{3} a_{3}&=0\\ 2916 A^{2} B^{3} a_{1}+4374 A \,B^{4} a_{2}+7290 A \,B^{4} b_{3}-1458 A^{2} B^{2} a_{3}-324 A \,B^{2} a_{3}&=0\\ 4374 A^{3} B^{2} a_{1}+10206 A^{2} B^{3} a_{2}+14580 A^{2} B^{3} b_{3}-1458 A^{3} B a_{3}-324 A^{2} B a_{3}&=0\\ 2916 A^{4} B a_{1}+11664 A^{3} B^{2} a_{2}+14580 A^{3} B^{2} b_{3}-486 A^{4} a_{3}-108 A^{3} a_{3}&=0\\ 2916 A \,B^{3} b_{2}-486 A^{3} a_{1}-486 A^{2} B b_{3}-729 A \,B^{2} b_{1}-243 B^{3} b_{2}-108 A^{2} a_{1}-108 A B b_{3}&=0\\ 4374 A^{2} B^{2} b_{2}-243 A^{3} a_{2}-243 A^{3} b_{3}-729 A^{2} B b_{1}-729 A \,B^{2} b_{2}-54 A^{2} a_{2}-54 A^{2} b_{3}&=0\\ 729 B^{4} b_{2}-486 A^{2} B a_{1}+243 A \,B^{2} a_{2}-243 A \,B^{2} b_{3}-243 B^{3} b_{1}-81 A^{2} a_{3}-108 A B a_{1}+54 B^{2} a_{2}-54 B^{2} b_{3}-36 A a_{3}-4 a_{3}&=0 \end{align*}
Solving the above equations for the unknowns gives
\begin{align*} a_{1}&=-\frac {B b_{3}}{A}\\ a_{2}&=-b_{3}\\ a_{3}&=0\\ b_{1}&=0\\ b_{2}&=0\\ b_{3}&=b_{3} \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 &= -\frac {A x +B}{A} \\
\eta &= u \\
\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,u\right ) \xi \\ &= u - \left (-\frac {27 u^{3} A^{3} x^{3}+81 u^{3} A^{2} B \,x^{2}+81 u^{3} A \,B^{2} x +27 u^{3} B^{3}-9 u A x -9 u B +9 A +2}{27 \left (A x +B \right )^{2}}\right ) \left (-\frac {A x +B}{A}\right ) \\ &= -\frac {\left (\left (A x +B \right )^{2} u^{2}+\left (\frac {A x}{3}+\frac {B}{3}\right ) u -A -\frac {2}{9}\right ) \left (-\frac {1}{3}+\left (A x +B \right ) u \right )}{\left (A x +B \right ) A}\\ \xi &= 0 \end{align*}
The next step is to determine the canonical coordinates \(R,S\). The canonical coordinates map \(\left ( x,u\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 u}{\eta } = dS \tag {1} \end{align*}
The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial x} + \eta \frac {\partial }{\partial u}\right ) S(x,u) = 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 {\left (\left (A x +B \right )^{2} u^{2}+\left (\frac {A x}{3}+\frac {B}{3}\right ) u -A -\frac {2}{9}\right ) \left (-\frac {1}{3}+\left (A x +B \right ) u \right )}{\left (A x +B \right ) A}}} dy \end{align*}
Which results in
\begin{align*} S&= -27 \left (A x +B \right ) A \left (\frac {\frac {\left (3 A x +3 B \right ) \ln \left (9 A^{2} u^{2} x^{2}+18 A B \,u^{2} x +9 B^{2} u^{2}+3 u A x +3 u B -9 A -2\right )}{18 A^{2} x^{2}+36 A B x +18 B^{2}}-\frac {2 \left (2-\frac {\left (3 A x +3 B \right )^{2}}{2 \left (9 A^{2} x^{2}+18 A B x +9 B^{2}\right )}\right ) \operatorname {arctanh}\left (\frac {2 \left (9 A^{2} x^{2}+18 A B x +9 B^{2}\right ) u +3 A x +3 B}{9 \sqrt {4 A^{3} x^{2}+8 A^{2} B x +A^{2} x^{2}+4 A \,B^{2}+2 A B x +B^{2}}}\right )}{9 \sqrt {4 A^{3} x^{2}+8 A^{2} B x +A^{2} x^{2}+4 A \,B^{2}+2 A B x +B^{2}}}}{9 A}-\frac {\ln \left (3 u A x +3 u B -1\right )}{9 A \left (3 A x +3 B \right )}\right ) \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,u) S_{u} }{ R_{x} + \omega (x,u) R_{u} }\tag {2} \end{align*}
Where in the above \(R_{x},R_{u},S_{x},S_{u}\) are all partial derivatives and \(\omega (x,u)\) is the right hand side of the original ode given
by
\begin{align*} \omega (x,u) &= -\frac {27 u^{3} A^{3} x^{3}+81 u^{3} A^{2} B \,x^{2}+81 u^{3} A \,B^{2} x +27 u^{3} B^{3}-9 u A x -9 u B +9 A +2}{27 \left (A x +B \right )^{2}} \end{align*}
Evaluating all the partial derivatives gives
\begin{align*} R_{x} &= 1\\ R_{u} &= 0\\ S_{x} &= -\frac {A^{2} u}{\left (-\frac {2}{9}+\left (A x +B \right )^{2} u^{2}+\frac {\left (A x +B \right ) u}{3}-A \right ) \left (-\frac {1}{3}+\left (A x +B \right ) u \right )}\\ S_{u} &= -\frac {\left (A x +B \right ) A}{\left (\left (A x +B \right )^{2} u^{2}+\left (\frac {A x}{3}+\frac {B}{3}\right ) u -A -\frac {2}{9}\right ) \left (-\frac {1}{3}+\left (A x +B \right ) u \right )} \end{align*}
Substituting all the above in (2) and simplifying gives the ode in canonical coordinates.
\begin{align*} \frac {dS}{dR} &= \frac {A}{A x +B}\tag {2A} \end{align*}
We now need to express the RHS as function of \(R\) only. This is done by solving for \(x,u\) in terms of \(R,S\)
from the result obtained earlier and simplifying. This gives
\begin{align*} \frac {dS}{dR} &= \frac {A}{A R +B} \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 {A}{A R +B}\, dR}\\ S \left (R \right ) &= \ln \left (A R +B \right ) + c_3 \end{align*}
\begin{align*} S \left (R \right )&= \ln \left (A R +B \right )+c_3 \end{align*}
To complete the solution, we just need to transform the above back to \(x,u\) coordinates. This results
in
\begin{align*} \frac {-\ln \left (-2+9 \left (A x +B \right )^{2} u \left (x \right )^{2}+3 u \left (x \right ) \left (A x +B \right )-9 A \right ) \sqrt {4 A +1}+2 \ln \left (-1+3 u \left (x \right ) \left (A x +B \right )\right ) \sqrt {4 A +1}+2 \,\operatorname {arctanh}\left (\frac {1+6 u \left (x \right ) \left (A x +B \right )}{3 \sqrt {4 A +1}}\right )}{2 \sqrt {4 A +1}} = \ln \left (A x +B \right )+c_3 \end{align*}
Substituting \(u=u \left (x \right )-\frac {1}{3 \left (-A x -B \right )}\) in the above solution gives
\begin{align*} \frac {-\ln \left (-2+9 \left (A x +B \right )^{2} \left (u \left (x \right )-\frac {1}{3 \left (-A x -B \right )}\right )^{2}+3 \left (u \left (x \right )-\frac {1}{3 \left (-A x -B \right )}\right ) \left (A x +B \right )-9 A \right ) \sqrt {4 A +1}+2 \ln \left (-1+3 \left (u \left (x \right )-\frac {1}{3 \left (-A x -B \right )}\right ) \left (A x +B \right )\right ) \sqrt {4 A +1}+2 \,\operatorname {arctanh}\left (\frac {1+6 \left (u \left (x \right )-\frac {1}{3 \left (-A x -B \right )}\right ) \left (A x +B \right )}{3 \sqrt {4 A +1}}\right )}{2 \sqrt {4 A +1}} = \ln \left (A x +B \right )+c_3 \end{align*}
Simplifying the above gives
\begin{align*}
\frac {-\sqrt {4 A +1}\, \ln \left (\left (A x +B \right )^{2} u \left (x \right )^{2}+u \left (x \right ) \left (A x +B \right )-A \right )+2 \sqrt {4 A +1}\, \ln \left (u \left (x \right ) \left (A x +B \right )\right )+2 \,\operatorname {arctanh}\left (\frac {1+2 u \left (x \right ) \left (A x +B \right )}{\sqrt {4 A +1}}\right )}{2 \sqrt {4 A +1}} &= \ln \left (A x +B \right )+c_3 \\
\end{align*}
Substituting \(u \left (x \right )=\frac {1}{y}\) in the above solution gives \[
\frac {-\sqrt {4 A +1}\, \ln \left (\frac {\left (A x +B \right )^{2}}{y^{2}}+\frac {A x +B}{y}-A \right )+2 \sqrt {4 A +1}\, \ln \left (\frac {A x +B}{y}\right )+2 \,\operatorname {arctanh}\left (\frac {1+\frac {2 A x +2 B}{y}}{\sqrt {4 A +1}}\right )}{2 \sqrt {4 A +1}} = \ln \left (A x +B \right )+c_3
\]
Simplifying the above gives
\begin{align*}
\frac {-\sqrt {4 A +1}\, \ln \left (\frac {\left (A x +B \right )^{2}}{y^{2}}+\frac {A x +B}{y}-A \right )+2 \sqrt {4 A +1}\, \ln \left (\frac {A x +B}{y}\right )+2 \,\operatorname {arctanh}\left (\frac {2 A x +2 B +y}{y \sqrt {4 A +1}}\right )}{2 \sqrt {4 A +1}} &= \ln \left (A x +B \right )+c_3 \\
\end{align*}
Summary of solutions found
\begin{align*}
\frac {-\sqrt {4 A +1}\, \ln \left (\frac {\left (A x +B \right )^{2}}{y^{2}}+\frac {A x +B}{y}-A \right )+2 \sqrt {4 A +1}\, \ln \left (\frac {A x +B}{y}\right )+2 \,\operatorname {arctanh}\left (\frac {2 A x +2 B +y}{y \sqrt {4 A +1}}\right )}{2 \sqrt {4 A +1}} &= \ln \left (A x +B \right )+c_3 \\
\end{align*}
2.22.2.5 Solved using first_order_ode_LIE
26.573 (sec)
Entering first order ode LIE solver
\begin{align*}
y y^{\prime }-y&=A x +B \\
\end{align*}
Writing the ode as \begin{align*} y^{\prime }&=\frac {A x +B +y}{y}\\ 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 1 to use as
anstaz gives
\begin{align*}
\tag{1E} \xi &= x a_{2}+y a_{3}+a_{1} \\
\tag{2E} \eta &= x b_{2}+y b_{3}+b_{1} \\
\end{align*}
Where the unknown coefficients are \[
\{a_{1}, a_{2}, a_{3}, b_{1}, b_{2}, b_{3}\}
\]
Substituting equations (1E,2E) and \(\omega \) into (A)
gives \begin{equation}
\tag{5E} b_{2}+\frac {\left (A x +B +y \right ) \left (b_{3}-a_{2}\right )}{y}-\frac {\left (A x +B +y \right )^{2} a_{3}}{y^{2}}-\frac {A \left (x a_{2}+y a_{3}+a_{1}\right )}{y}-\left (\frac {1}{y}-\frac {A x +B +y}{y^{2}}\right ) \left (x b_{2}+y b_{3}+b_{1}\right ) = 0
\end{equation}
Putting the above in normal form gives \[
-\frac {A^{2} x^{2} a_{3}+2 A B x a_{3}-A \,x^{2} b_{2}+2 A x y a_{2}+2 A x y a_{3}-2 A x y b_{3}+A \,y^{2} a_{3}-A x b_{1}+A y a_{1}+B^{2} a_{3}-B x b_{2}+B y a_{2}+2 B y a_{3}-2 B y b_{3}+y^{2} a_{2}+y^{2} a_{3}-b_{2} y^{2}-y^{2} b_{3}-B b_{1}}{y^{2}} = 0
\]
Setting the numerator to zero gives \begin{equation}
\tag{6E} -A^{2} x^{2} a_{3}-2 A B x a_{3}+A \,x^{2} b_{2}-2 A x y a_{2}-2 A x y a_{3}+2 A x y b_{3}-A \,y^{2} a_{3}+A x b_{1}-A y a_{1}-B^{2} a_{3}+B x b_{2}-B y a_{2}-2 B y a_{3}+2 B y b_{3}-y^{2} a_{2}-y^{2} a_{3}+b_{2} y^{2}+y^{2} b_{3}+B b_{1} = 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^{2} a_{3} v_{1}^{2}-2 A B a_{3} v_{1}-2 A a_{2} v_{1} v_{2}-2 A a_{3} v_{1} v_{2}-A a_{3} v_{2}^{2}+A b_{2} v_{1}^{2}+2 A b_{3} v_{1} v_{2}-A a_{1} v_{2}+A b_{1} v_{1}-B^{2} a_{3}-B a_{2} v_{2}-2 B a_{3} v_{2}+B b_{2} v_{1}+2 B b_{3} v_{2}-a_{2} v_{2}^{2}-a_{3} v_{2}^{2}+b_{2} v_{2}^{2}+b_{3} v_{2}^{2}+B b_{1} = 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} \left (-A^{2} a_{3}+A b_{2}\right ) v_{1}^{2}+\left (-2 A a_{2}-2 A a_{3}+2 A b_{3}\right ) v_{1} v_{2}+\left (-2 A B a_{3}+A b_{1}+B b_{2}\right ) v_{1}+\left (-A a_{3}-a_{2}-a_{3}+b_{2}+b_{3}\right ) v_{2}^{2}+\left (-A a_{1}-B a_{2}-2 B a_{3}+2 B b_{3}\right ) v_{2}-B^{2} a_{3}+B b_{1} = 0
\end{equation}
Setting each coefficients in (8E) to zero gives the following equations to solve
\begin{align*} -A^{2} a_{3}+A b_{2}&=0\\ -B^{2} a_{3}+B b_{1}&=0\\ -2 A a_{2}-2 A a_{3}+2 A b_{3}&=0\\ -2 A B a_{3}+A b_{1}+B b_{2}&=0\\ -A a_{1}-B a_{2}-2 B a_{3}+2 B b_{3}&=0\\ -A a_{3}-a_{2}-a_{3}+b_{2}+b_{3}&=0 \end{align*}
Solving the above equations for the unknowns gives
\begin{align*} a_{1}&=a_{1}\\ a_{2}&=\frac {A a_{1}}{B}\\ a_{3}&=a_{3}\\ b_{1}&=B a_{3}\\ b_{2}&=A a_{3}\\ b_{3}&=\frac {A a_{1}+B a_{3}}{B} \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 &= \frac {A x +B}{B} \\
\eta &= \frac {A y}{B} \\
\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 \\ &= \frac {A y}{B} - \left (\frac {A x +B +y}{y}\right ) \left (\frac {A x +B}{B}\right ) \\ &= \frac {A y}{B}-\frac {\left (A x +B +y \right ) \left (A x +B \right )}{y B}\\ \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 {A y}{B}-\frac {\left (A x +B +y \right ) \left (A x +B \right )}{y B}}} dy \end{align*}
Which results in
\begin{align*} S&= B \left (\frac {\ln \left (A^{2} x^{2}+2 A B x +A x y -A \,y^{2}+B^{2}+B y \right )}{2 A}+\frac {\left (A x +B \right ) \operatorname {arctanh}\left (\frac {A x -2 A y +B}{\sqrt {4 A^{3} x^{2}+8 A^{2} B x +A^{2} x^{2}+4 A \,B^{2}+2 A B x +B^{2}}}\right )}{A \sqrt {4 A^{3} x^{2}+8 A^{2} B x +A^{2} x^{2}+4 A \,B^{2}+2 A B x +B^{2}}}\right ) \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 {A x +B +y}{y} \end{align*}
Evaluating all the partial derivatives gives
\begin{align*} R_{x} &= 1\\ R_{y} &= 0\\ S_{x} &= \frac {B \left (A x +B +y \right )}{A^{2} x^{2}+\left (2 B x +y \left (x -y \right )\right ) A +B \left (B +y \right )}\\ S_{y} &= -\frac {B y}{A^{2} x^{2}+\left (2 B x +y \left (x -y \right )\right ) A +B \left (B +y \right )} \end{align*}
Substituting all the above in (2) and simplifying gives the ode in canonical coordinates.
\begin{align*} \frac {dS}{dR} &= 0\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} &= 0 \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 {0\, dR} + c_2 \\ S \left (R \right ) &= 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 {B \left (\ln \left (A^{2} x^{2}+\left (2 B x +y \left (-y+x \right )\right ) A +B \left (B +y\right )\right ) \sqrt {4 A +1}+2 \,\operatorname {arctanh}\left (\frac {\left (x -2 y\right ) A +B}{\sqrt {4 A +1}\, \left (A x +B \right )}\right )\right )}{2 \sqrt {4 A +1}\, A} = c_2 \end{align*}
Simplifying the above gives
\begin{align*}
\frac {B \left (\frac {\ln \left (\left (A x +B \right )^{2}-A y^{2}+y \left (A x +B \right )\right ) \sqrt {4 A +1}}{2}+\operatorname {arctanh}\left (\frac {-2 A y+A x +B}{\sqrt {4 A +1}\, \left (A x +B \right )}\right )\right )}{\sqrt {4 A +1}\, A} &= c_2 \\
\end{align*}
Summary of solutions found
\begin{align*}
\frac {B \left (\frac {\ln \left (\left (A x +B \right )^{2}-A y^{2}+y \left (A x +B \right )\right ) \sqrt {4 A +1}}{2}+\operatorname {arctanh}\left (\frac {-2 A y+A x +B}{\sqrt {4 A +1}\, \left (A x +B \right )}\right )\right )}{\sqrt {4 A +1}\, A} &= c_2 \\
\end{align*}
2.22.2.6 Solved using first_order_ode_y_dy
18.196 (sec)
Entering first order ode y dy transformation solver
\begin{align*}
y y^{\prime }-y&=A x +B \\
\end{align*}
Applying the transformation \(h \left (x \right ) = y^{2}\) the ode becomes
\[
\frac {h^{\prime }\left (x \right )}{2}-\sqrt {h \left (x \right )} = A x +B
\]
Which is now solved for \(h \left (x \right )\).
Entering first order ode LIE solverWriting the ode as
\begin{align*} h^{\prime }\left (x \right )&=2 \sqrt {h}+2 A x +2 B\\ h^{\prime }\left (x \right )&= \omega \left ( x,h \left (x \right )\right ) \end{align*}
The condition of Lie symmetry is the linearized PDE given by
\begin{align*} \eta _{x}+\omega \left ( \eta _{h \left (x \right )}-\xi _{x}\right ) -\omega ^{2}\xi _{h \left (x \right )}-\omega _{x}\xi -\omega _{h \left (x \right )}\eta =0\tag {A} \end{align*}
To determine \(\xi ,\eta \) then (A) is solved using ansatz. Making bivariate polynomials of degree 1 to use as
anstaz gives
\begin{align*}
\tag{1E} \xi &= h a_{3}+x a_{2}+a_{1} \\
\tag{2E} \eta &= h b_{3}+x b_{2}+b_{1} \\
\end{align*}
Where the unknown coefficients are \[
\{a_{1}, a_{2}, a_{3}, b_{1}, b_{2}, b_{3}\}
\]
Substituting equations (1E,2E) and \(\omega \) into (A)
gives \begin{equation}
\tag{5E} b_{2}+\left (2 \sqrt {h}+2 A x +2 B \right ) \left (b_{3}-a_{2}\right )-\left (2 \sqrt {h}+2 A x +2 B \right )^{2} a_{3}-2 A \left (h a_{3}+x a_{2}+a_{1}\right )-\frac {h b_{3}+x b_{2}+b_{1}}{\sqrt {h}} = 0
\end{equation}
Putting the above in normal form gives \[
-\frac {4 A^{2} \sqrt {h}\, x^{2} a_{3}+8 A B \sqrt {h}\, x a_{3}+8 A h x a_{3}+2 A \,h^{{3}/{2}} a_{3}+4 A \sqrt {h}\, x a_{2}-2 A \sqrt {h}\, x b_{3}+4 B^{2} \sqrt {h}\, a_{3}+8 B h a_{3}+4 h^{{3}/{2}} a_{3}+2 A \sqrt {h}\, a_{1}+2 B \sqrt {h}\, a_{2}-2 B \sqrt {h}\, b_{3}+2 h a_{2}-h b_{3}-b_{2} \sqrt {h}+x b_{2}+b_{1}}{\sqrt {h}} = 0
\]
Setting the numerator to zero gives \begin{equation}
\tag{6E} -4 A^{2} \sqrt {h}\, x^{2} a_{3}-8 A B \sqrt {h}\, x a_{3}-2 A \,h^{{3}/{2}} a_{3}-4 A \sqrt {h}\, x a_{2}+2 A \sqrt {h}\, x b_{3}-8 A h x a_{3}-4 B^{2} \sqrt {h}\, a_{3}-4 h^{{3}/{2}} a_{3}-2 A \sqrt {h}\, a_{1}-2 B \sqrt {h}\, a_{2}+2 B \sqrt {h}\, b_{3}-8 B h a_{3}+b_{2} \sqrt {h}-2 h a_{2}+h b_{3}-x b_{2}-b_{1} = 0
\end{equation}
Looking at the
above PDE shows the following are all the terms with \(\{h, x\}\) in them. \[
\left \{h, x, \sqrt {h}, h^{{3}/{2}}\right \}
\]
The following substitution is now
made to be able to collect on all terms with \(\{h, x\}\) in them \[
\left \{h = v_{1}, x = v_{2}, \sqrt {h} = v_{3}, h^{{3}/{2}} = v_{4}\right \}
\]
The above PDE (6E) now becomes
\begin{equation}
\tag{7E} -4 A^{2} v_{3} v_{2}^{2} a_{3}-8 A B v_{3} v_{2} a_{3}-4 A v_{3} v_{2} a_{2}-8 A v_{1} v_{2} a_{3}+2 A v_{3} v_{2} b_{3}-4 B^{2} v_{3} a_{3}-2 A v_{3} a_{1}-2 A v_{4} a_{3}-2 B v_{3} a_{2}-8 B v_{1} a_{3}+2 B v_{3} b_{3}-2 v_{1} a_{2}-4 v_{4} a_{3}-v_{2} b_{2}+b_{2} v_{3}+v_{1} b_{3}-b_{1} = 0
\end{equation}
Collecting the above on the terms \(v_i\) introduced, and these are \[
\{v_{1}, v_{2}, v_{3}, v_{4}\}
\]
Equation (7E) now
becomes \begin{equation}
\tag{8E} -8 A v_{1} v_{2} a_{3}+\left (-8 B a_{3}-2 a_{2}+b_{3}\right ) v_{1}-4 A^{2} v_{3} v_{2}^{2} a_{3}+\left (-8 A B a_{3}-4 A a_{2}+2 A b_{3}\right ) v_{2} v_{3}-v_{2} b_{2}+\left (-4 B^{2} a_{3}-2 A a_{1}-2 B a_{2}+2 B b_{3}+b_{2}\right ) v_{3}+\left (-2 A a_{3}-4 a_{3}\right ) v_{4}-b_{1} = 0
\end{equation}
Setting each coefficients in (8E) to zero gives the following equations to solve
\begin{align*} -b_{1}&=0\\ -b_{2}&=0\\ -8 A a_{3}&=0\\ -4 A^{2} a_{3}&=0\\ -2 A a_{3}-4 a_{3}&=0\\ -8 B a_{3}-2 a_{2}+b_{3}&=0\\ -8 A B a_{3}-4 A a_{2}+2 A b_{3}&=0\\ -4 B^{2} a_{3}-2 A a_{1}-2 B a_{2}+2 B b_{3}+b_{2}&=0 \end{align*}
Solving the above equations for the unknowns gives
\begin{align*} a_{1}&=\frac {B a_{2}}{A}\\ a_{2}&=a_{2}\\ a_{3}&=0\\ b_{1}&=0\\ b_{2}&=0\\ b_{3}&=2 a_{2} \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 &= \frac {A x +B}{A} \\
\eta &= 2 h \\
\end{align*}
The next step is to determine the canonical coordinates \(R,S\). The canonical
coordinates map \(\left ( x,h\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 h}{\eta } = dS \tag {1} \end{align*}
The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial x} + \eta \frac {\partial }{\partial h}\right ) S(x,h) = 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)\). Therefore
\begin{align*} \frac {dh}{dx} &= \frac {\eta }{\xi }\\ &= \frac {2 h}{\frac {A x +B}{A}}\\ &= \frac {2 h A}{A x +B} \end{align*}
This is easily solved to give
\begin{align*} h \left (x \right ) = c_1 \left (A x +B \right )^{2} \end{align*}
Where now the coordinate \(R\) is taken as the constant of integration. Hence
\begin{align*} R &= \frac {h}{\left (A x +B \right )^{2}} \end{align*}
And \(S\) is found from
\begin{align*} dS &= \frac {dx}{\xi } \\ &= \frac {dx}{\frac {A x +B}{A}} \end{align*}
Integrating gives
\begin{align*} S &= \int { \frac {dx}{T}}\\ &= \ln \left (A x +B \right ) \end{align*}
Where the constant of integration is set to zero as we just need one solution. 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,h) S_{h} }{ R_{x} + \omega (x,h) R_{h} }\tag {2} \end{align*}
Where in the above \(R_{x},R_{h},S_{x},S_{h}\) are all partial derivatives and \(\omega (x,h)\) is the right hand side of the original ode given
by
\begin{align*} \omega (x,h) &= 2 \sqrt {h}+2 A x +2 B \end{align*}
Evaluating all the partial derivatives gives
\begin{align*} R_{x} &= -\frac {2 h A}{\left (A x +B \right )^{3}}\\ R_{h} &= \frac {1}{\left (A x +B \right )^{2}}\\ S_{x} &= \frac {A}{A x +B}\\ S_{h} &= 0 \end{align*}
Substituting all the above in (2) and simplifying gives the ode in canonical coordinates.
\begin{align*} \frac {dS}{dR} &= \frac {A \left (A x +B \right )^{2}}{\left (2 A x +2 B \right ) \sqrt {h}+2 A^{2} x^{2}+\left (4 B x -2 h \right ) A +2 B^{2}}\tag {2A} \end{align*}
We now need to express the RHS as function of \(R\) only. This is done by solving for \(x,h\) in terms of \(R,S\)
from the result obtained earlier and simplifying. This gives
\begin{align*} \frac {dS}{dR} &= -\frac {A}{2 A R -2 \sqrt {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 {A}{2 \left (A R -\sqrt {R}-1\right )}\, dR}\\ S \left (R \right ) &= \frac {\ln \left (A R +\sqrt {R}-1\right )}{4}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {R}+1}{\sqrt {4 A +1}}\right )}{2 \sqrt {4 A +1}}-\frac {\ln \left (A R -\sqrt {R}-1\right )}{4}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {R}-1}{\sqrt {4 A +1}}\right )}{2 \sqrt {4 A +1}}-\frac {\ln \left (A^{2} R^{2}-2 A R -R +1\right )}{4}+\frac {\operatorname {arctanh}\left (\frac {2 A^{2} R -2 A -1}{\sqrt {4 A +1}}\right )}{2 \sqrt {4 A +1}} + c_2 \end{align*}
\begin{align*} S \left (R \right )&= \frac {\frac {\operatorname {arctanh}\left (\frac {2 A^{2} R -2 A -1}{\sqrt {4 A +1}}\right )}{2}-\frac {\ln \left (1+A^{2} R^{2}+\left (-2 A -1\right ) R \right ) \sqrt {4 A +1}}{4}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {R}-1}{\sqrt {4 A +1}}\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {R}+1}{\sqrt {4 A +1}}\right )}{2}+\sqrt {4 A +1}\, \left (c_2 -\frac {\ln \left (A R -\sqrt {R}-1\right )}{4}+\frac {\ln \left (A R +\sqrt {R}-1\right )}{4}\right )}{\sqrt {4 A +1}} \end{align*}
To complete the solution, we just need to transform the above back to \(x,h\) coordinates. This results
in
\begin{align*} \ln \left (A x +B \right ) = \frac {\frac {\operatorname {arctanh}\left (\frac {\frac {2 A^{2} h \left (x \right )}{\left (A x +B \right )^{2}}-2 A -1}{\sqrt {4 A +1}}\right )}{2}-\frac {\ln \left (1+\frac {A^{2} h \left (x \right )^{2}}{\left (A x +B \right )^{4}}+\frac {\left (-2 A -1\right ) h \left (x \right )}{\left (A x +B \right )^{2}}\right ) \sqrt {4 A +1}}{4}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {\frac {h \left (x \right )}{\left (A x +B \right )^{2}}}-1}{\sqrt {4 A +1}}\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {\frac {h \left (x \right )}{\left (A x +B \right )^{2}}}+1}{\sqrt {4 A +1}}\right )}{2}+\sqrt {4 A +1}\, \left (c_2 -\frac {\ln \left (\frac {A h \left (x \right )}{\left (A x +B \right )^{2}}-\sqrt {\frac {h \left (x \right )}{\left (A x +B \right )^{2}}}-1\right )}{4}+\frac {\ln \left (\frac {A h \left (x \right )}{\left (A x +B \right )^{2}}+\sqrt {\frac {h \left (x \right )}{\left (A x +B \right )^{2}}}-1\right )}{4}\right )}{\sqrt {4 A +1}} \end{align*}
Simplifying the above gives
\begin{align*}
\ln \left (A x +B \right ) &= \frac {-\frac {\operatorname {arctanh}\left (\frac {-2 A^{2} h \left (x \right )+2 \left (A +\frac {1}{2}\right ) \left (A x +B \right )^{2}}{\left (A x +B \right )^{2} \sqrt {4 A +1}}\right )}{2}-\frac {\ln \left (\frac {A^{2} h \left (x \right )^{2}-2 \left (A +\frac {1}{2}\right ) \left (A x +B \right )^{2} h \left (x \right )+\left (A x +B \right )^{4}}{\left (A x +B \right )^{4}}\right ) \sqrt {4 A +1}}{4}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {\frac {h \left (x \right )}{\left (A x +B \right )^{2}}}}{\sqrt {4 A +1}}-\frac {1}{\sqrt {4 A +1}}\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {\frac {h \left (x \right )}{\left (A x +B \right )^{2}}}}{\sqrt {4 A +1}}+\frac {1}{\sqrt {4 A +1}}\right )}{2}+\sqrt {4 A +1}\, \left (c_2 -\frac {\ln \left (\frac {-\left (A x +B \right )^{2} \sqrt {\frac {h \left (x \right )}{\left (A x +B \right )^{2}}}+h \left (x \right ) A -\left (A x +B \right )^{2}}{\left (A x +B \right )^{2}}\right )}{4}+\frac {\ln \left (\frac {\left (A x +B \right )^{2} \sqrt {\frac {h \left (x \right )}{\left (A x +B \right )^{2}}}+h \left (x \right ) A -\left (A x +B \right )^{2}}{\left (A x +B \right )^{2}}\right )}{4}\right )}{\sqrt {4 A +1}} \\
\end{align*}
Converting the solution above back using \(h \left (x \right ) = y^{2}\) gives \begin{align*}
\ln \left (A x +B \right ) &= \frac {-\frac {\operatorname {arctanh}\left (\frac {-2 A^{2} y^{2}+2 \left (A +\frac {1}{2}\right ) \left (A x +B \right )^{2}}{\left (A x +B \right )^{2} \sqrt {4 A +1}}\right )}{2}-\frac {\ln \left (\frac {A^{2} y^{4}-2 \left (A +\frac {1}{2}\right ) \left (A x +B \right )^{2} y^{2}+\left (A x +B \right )^{4}}{\left (A x +B \right )^{4}}\right ) \sqrt {4 A +1}}{4}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {\frac {y^{2}}{\left (A x +B \right )^{2}}}}{\sqrt {4 A +1}}-\frac {1}{\sqrt {4 A +1}}\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {\frac {y^{2}}{\left (A x +B \right )^{2}}}}{\sqrt {4 A +1}}+\frac {1}{\sqrt {4 A +1}}\right )}{2}+\sqrt {4 A +1}\, \left (c_2 -\frac {\ln \left (\frac {-\left (A x +B \right )^{2} \sqrt {\frac {y^{2}}{\left (A x +B \right )^{2}}}+A y^{2}-\left (A x +B \right )^{2}}{\left (A x +B \right )^{2}}\right )}{4}+\frac {\ln \left (\frac {\left (A x +B \right )^{2} \sqrt {\frac {y^{2}}{\left (A x +B \right )^{2}}}+A y^{2}-\left (A x +B \right )^{2}}{\left (A x +B \right )^{2}}\right )}{4}\right )}{\sqrt {4 A +1}} \\
\end{align*}
Summary of solutions found
\begin{align*}
\ln \left (A x +B \right ) &= \frac {-\frac {\operatorname {arctanh}\left (\frac {-2 A^{2} y^{2}+2 \left (A +\frac {1}{2}\right ) \left (A x +B \right )^{2}}{\left (A x +B \right )^{2} \sqrt {4 A +1}}\right )}{2}-\frac {\ln \left (\frac {A^{2} y^{4}-2 \left (A +\frac {1}{2}\right ) \left (A x +B \right )^{2} y^{2}+\left (A x +B \right )^{4}}{\left (A x +B \right )^{4}}\right ) \sqrt {4 A +1}}{4}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {\frac {y^{2}}{\left (A x +B \right )^{2}}}}{\sqrt {4 A +1}}-\frac {1}{\sqrt {4 A +1}}\right )}{2}+\frac {\operatorname {arctanh}\left (\frac {2 A \sqrt {\frac {y^{2}}{\left (A x +B \right )^{2}}}}{\sqrt {4 A +1}}+\frac {1}{\sqrt {4 A +1}}\right )}{2}+\sqrt {4 A +1}\, \left (c_2 -\frac {\ln \left (\frac {-\left (A x +B \right )^{2} \sqrt {\frac {y^{2}}{\left (A x +B \right )^{2}}}+A y^{2}-\left (A x +B \right )^{2}}{\left (A x +B \right )^{2}}\right )}{4}+\frac {\ln \left (\frac {\left (A x +B \right )^{2} \sqrt {\frac {y^{2}}{\left (A x +B \right )^{2}}}+A y^{2}-\left (A x +B \right )^{2}}{\left (A x +B \right )^{2}}\right )}{4}\right )}{\sqrt {4 A +1}} \\
\end{align*}
2.22.2.7 ✓ Maple. Time used: 0.125 (sec). Leaf size: 68
ode:=y(x)*diff(y(x),x)-y(x) = A*x+B;
dsolve(ode,y(x), singsol=all);
\[
y = -\frac {\left (A x +B \right ) \operatorname {RootOf}\left (\textit {\_Z}^{2}-A +\textit {\_Z} +{\mathrm e}^{\operatorname {RootOf}\left (\left (A x +B \right )^{2} \left (-2 \,{\mathrm e}^{\textit {\_Z}} \cosh \left (\left (2 \ln \left (A x +B \right )+\textit {\_Z} +2 c_1 \right ) \sqrt {4 A +1}\right )+4 A -2 \,{\mathrm e}^{\textit {\_Z}}+1\right )\right )}\right )}{A}
\]
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 homogeneous C
trying homogeneous types:
trying homogeneous D
<- homogeneous successful
<- homogeneous successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y \left (x \right ) \left (\frac {d}{d x}y \left (x \right )\right )-y \left (x \right )=A x +B \\ \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 {y \left (x \right )+A x +B}{y \left (x \right )} \end {array} \]
2.22.2.8 ✓ Mathematica. Time used: 0.069 (sec). Leaf size: 88
ode=y[x]*D[y[x],x]-y[x]==A*x+B;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\[
\text {Solve}\left [-\frac {\frac {2 \arctan \left (\frac {\frac {2 A y(x)}{A x+B}-1}{\sqrt {-4 A-1}}\right )}{\sqrt {-4 A-1}}+\log \left (-\frac {A y(x)^2}{(A x+B)^2}+\frac {y(x)}{A x+B}+1\right )}{2 A}=\frac {\log (A x+B)}{A}+c_1,y(x)\right ]
\]
2.22.2.9 ✗ Sympy
from sympy import *
x = symbols("x")
A = symbols("A")
B = symbols("B")
y = Function("y")
ode = Eq(-A*x - B + y(x)*Derivative(y(x), x) - y(x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
TypeError : argument of type Pow is not iterable
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', '1st_power_series', 'lie_group')