2.25.3 Problem 4
Internal
problem
ID
[13618]
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.4-2.
Problem
number
:
4
Date
solved
:
Wednesday, December 31, 2025 at 10:02:51 PM
CAS
classification
:
[_exact, _rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], [_Abel, `2nd type`, `class A`]]
2.25.3.1 Solved using first_order_ode_exact
3.306 (sec)
Entering first order ode exact solver
\begin{align*}
\left (y+A \,x^{n}+a \right ) y^{\prime }+n A \,x^{n -1} y+k \,x^{m}+b&=0 \\
\end{align*}
To solve an ode of the form
\begin{equation} M\left ( x,y\right ) +N\left ( x,y\right ) \frac {dy}{dx}=0\tag {A}\end{equation}
We assume there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant, that
satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives\[ \frac {d}{dx}\phi \left ( x,y\right ) =0 \]
Hence\begin{equation} \frac {\partial \phi }{\partial x}+\frac {\partial \phi }{\partial y}\frac {dy}{dx}=0\tag {B}\end{equation}
Comparing (A,B) shows
that\begin{align*} \frac {\partial \phi }{\partial x} & =M\\ \frac {\partial \phi }{\partial y} & =N \end{align*}
But since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid, we require that
\[ \frac {\partial M}{\partial y}=\frac {\partial N}{\partial x}\]
If the above condition is satisfied, then
the original ode is called exact. We still need to determine \(\phi \left ( x,y\right ) \) but at least we know now that we can
do that since the condition \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) is satisfied. If this condition is not satisfied then this method will not
work and we have to now look for an integrating factor to force this condition, which might or
might not exist. The first step is to write the ODE in standard form to check for exactness, which
is \[ M(x,y) \mathop {\mathrm {d}x}+ N(x,y) \mathop {\mathrm {d}y}=0 \tag {1A} \]
Therefore \begin{align*} \left (y +A \,x^{n}+a\right )\mathop {\mathrm {d}y} &= \left (-n A \,x^{n -1} y -k \,x^{m}-b\right )\mathop {\mathrm {d}x}\\ \left (n A \,x^{n -1} y +k \,x^{m}+b\right )\mathop {\mathrm {d}x} + \left (y +A \,x^{n}+a\right )\mathop {\mathrm {d}y} &= 0 \tag {2A} \end{align*}
Comparing (1A) and (2A) shows that
\begin{align*} M(x,y) &= n A \,x^{n -1} y +k \,x^{m}+b\\ N(x,y) &= y +A \,x^{n}+a \end{align*}
The next step is to determine if the ODE is is exact or not. The ODE is exact when the following
condition is satisfied
\[ \frac {\partial M}{\partial y} = \frac {\partial N}{\partial x} \]
Using result found above gives \begin{align*} \frac {\partial M}{\partial y} &= \frac {\partial }{\partial y} \left (n A \,x^{n -1} y +k \,x^{m}+b\right )\\ &= A \,x^{n -1} n \end{align*}
And
\begin{align*} \frac {\partial N}{\partial x} &= \frac {\partial }{\partial x} \left (y +A \,x^{n}+a\right )\\ &= A \,x^{n -1} n \end{align*}
Since \(\frac {\partial M}{\partial y}= \frac {\partial N}{\partial x}\), then the ODE is exact The following equations are now set up to solve for the function \(\phi \left (x,y\right )\)
\begin{align*} \frac {\partial \phi }{\partial x } &= M\tag {1} \\ \frac {\partial \phi }{\partial y } &= N\tag {2} \end{align*}
Integrating (1) w.r.t. \(x\) gives
\begin{align*}
\int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int M\mathop {\mathrm {d}x} \\
\int \frac {\partial \phi }{\partial x} \mathop {\mathrm {d}x} &= \int n A \,x^{n -1} y +k \,x^{m}+b\mathop {\mathrm {d}x} \\
\tag{3} \phi &= b x +\frac {k \,x^{1+m}}{1+m}+A y \,x^{n}+ f(y) \\
\end{align*}
Where \(f(y)\) is used for the constant of integration since \(\phi \) is a function of
both \(x\) and \(y\). Taking derivative of equation (3) w.r.t \(y\) gives \begin{equation}
\tag{4} \frac {\partial \phi }{\partial y} = A \,x^{n}+f'(y)
\end{equation}
But equation (2) says that \(\frac {\partial \phi }{\partial y} = y +A \,x^{n}+a\). Therefore
equation (4) becomes \begin{equation}
\tag{5} y +A \,x^{n}+a = A \,x^{n}+f'(y)
\end{equation}
Solving equation (5) for \( f'(y)\) gives \[
f'(y) = a +y
\]
Integrating the above w.r.t \(y\)
gives \begin{align*}
\int f'(y) \mathop {\mathrm {d}y} &= \int \left ( a +y\right ) \mathop {\mathrm {d}y} \\
f(y) &= a y +\frac {1}{2} y^{2}+ c_1 \\
\end{align*}
\[
\phi = b x +\frac {k \,x^{1+m}}{1+m}+A y \,x^{n}+a y +\frac {y^{2}}{2}+ c_1
\]
But since \(\phi \) itself is a constant function, then let \(\phi =c_2\) where \(c_2\) is new constant and
combining \(c_1\) and \(c_2\) constants into the constant \(c_1\) gives the solution as \[
c_1 = b x +\frac {k \,x^{1+m}}{1+m}+A y \,x^{n}+a y +\frac {y^{2}}{2}
\]
Solving for \(y\) gives
\begin{align*}
y &= -\frac {A m \,x^{n}+A \,x^{n}+a m -\sqrt {A^{2} x^{2 n} m^{2}+2 A^{2} x^{2 n} m +2 A \,x^{n} a \,m^{2}+A^{2} x^{2 n}+4 A \,x^{n} a m +a^{2} m^{2}-2 b \,m^{2} x +2 A \,x^{n} a -2 x^{1+m} k m +2 c_1 \,m^{2}+2 a^{2} m -4 b x m -2 x^{1+m} k +4 c_1 m +a^{2}-2 b x +2 c_1}+a}{1+m} \\
y &= -\frac {A m \,x^{n}+A \,x^{n}+a m +\sqrt {A^{2} x^{2 n} m^{2}+2 A^{2} x^{2 n} m +2 A \,x^{n} a \,m^{2}+A^{2} x^{2 n}+4 A \,x^{n} a m +a^{2} m^{2}-2 b \,m^{2} x +2 A \,x^{n} a -2 x^{1+m} k m +2 c_1 \,m^{2}+2 a^{2} m -4 b x m -2 x^{1+m} k +4 c_1 m +a^{2}-2 b x +2 c_1}+a}{1+m} \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= -\frac {A m \,x^{n}+A \,x^{n}+a m -\sqrt {A^{2} x^{2 n} m^{2}+2 A^{2} x^{2 n} m +2 A \,x^{n} a \,m^{2}+A^{2} x^{2 n}+4 A \,x^{n} a m +a^{2} m^{2}-2 b \,m^{2} x +2 A \,x^{n} a -2 x^{1+m} k m +2 c_1 \,m^{2}+2 a^{2} m -4 b x m -2 x^{1+m} k +4 c_1 m +a^{2}-2 b x +2 c_1}+a}{1+m} \\
y &= -\frac {A m \,x^{n}+A \,x^{n}+a m +\sqrt {A^{2} x^{2 n} m^{2}+2 A^{2} x^{2 n} m +2 A \,x^{n} a \,m^{2}+A^{2} x^{2 n}+4 A \,x^{n} a m +a^{2} m^{2}-2 b \,m^{2} x +2 A \,x^{n} a -2 x^{1+m} k m +2 c_1 \,m^{2}+2 a^{2} m -4 b x m -2 x^{1+m} k +4 c_1 m +a^{2}-2 b x +2 c_1}+a}{1+m} \\
\end{align*}
Entering first order ode abel second kind solver\begin{align*}
\left (y+A \,x^{n}+a \right ) y^{\prime }+n A \,x^{n -1} y+k \,x^{m}+b&=0 \\
\end{align*}
2.25.3.2 Solved using first_order_ode_abel_second_kind_case_5
2.408 (sec)
Simplifying the above gives
\begin{align*}
y &= -A \,x^{n}+\sqrt {\frac {-2 x^{1+m} k +\left (1+m \right ) \left (A^{2} x^{2 n}+2 A \,x^{n} a -2 b x +c_1 \right )}{1+m}}-a \\
y &= -A \,x^{n}-\sqrt {\frac {-2 x^{1+m} k +\left (1+m \right ) \left (A^{2} x^{2 n}+2 A \,x^{n} a -2 b x +c_1 \right )}{1+m}}-a \\
\end{align*}
Summary of solutions found
\begin{align*}
y &= -A \,x^{n}-\sqrt {\frac {-2 x^{1+m} k +\left (1+m \right ) \left (A^{2} x^{2 n}+2 A \,x^{n} a -2 b x +c_1 \right )}{1+m}}-a \\
y &= -A \,x^{n}+\sqrt {\frac {-2 x^{1+m} k +\left (1+m \right ) \left (A^{2} x^{2 n}+2 A \,x^{n} a -2 b x +c_1 \right )}{1+m}}-a \\
\end{align*}
2.25.3.3 ✓ Maple. Time used: 0.009 (sec). Leaf size: 147
ode:=(y(x)+A*x^n+a)*diff(y(x),x)+n*A*x^(n-1)*y(x)+k*x^m+b = 0;
dsolve(ode,y(x), singsol=all);
\begin{align*}
y &= \frac {\sqrt {\left (-2 x^{m +1} k +\left (m +1\right ) \left (x^{2 n} A^{2}+2 A \,x^{n} a +a^{2}-2 b x -2 c_1 \right )\right ) \left (m +1\right )}-A \left (m +1\right ) x^{n}-a m -a}{m +1} \\
y &= \frac {-A \left (m +1\right ) x^{n}-a m -\sqrt {\left (-2 x^{m +1} k +\left (m +1\right ) \left (x^{2 n} A^{2}+2 A \,x^{n} a +a^{2}-2 b x -2 c_1 \right )\right ) \left (m +1\right )}-a}{m +1} \\
\end{align*}
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
<- exact successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left (y \left (x \right )+A \,x^{13618}+a \right ) \left (\frac {d}{d x}y \left (x \right )\right )+13618 A \,x^{13617} y \left (x \right )+k \,x^{m}+b =0 \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \square & {} & \textrm {Check if ODE is exact}\hspace {3pt} \\ {} & \circ & \textrm {ODE is exact if the lhs is the total derivative of a}\hspace {3pt} C^{2}\hspace {3pt}\textrm {function}\hspace {3pt} \\ {} & {} & \frac {d}{d x}G \left (x , y \left (x \right )\right )=0 \\ {} & \circ & \textrm {Compute derivative of lhs}\hspace {3pt} \\ {} & {} & \frac {\partial }{\partial x}G \left (x , y\right )+\left (\frac {\partial }{\partial y}G \left (x , y\right )\right ) \left (\frac {d}{d x}y \left (x \right )\right )=0 \\ {} & \circ & \textrm {Evaluate derivatives}\hspace {3pt} \\ {} & {} & 13618 A \,x^{13617}=13618 A \,x^{13617} \\ {} & \circ & \textrm {Condition met, ODE is exact}\hspace {3pt} \\ \bullet & {} & \textrm {Exact ODE implies solution will be of this form}\hspace {3pt} \\ {} & {} & \left [G \left (x , y\right )=\mathit {C1} , M \left (x , y\right )=\frac {\partial }{\partial x}G \left (x , y\right ), N \left (x , y\right )=\frac {\partial }{\partial y}G \left (x , y\right )\right ] \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} G \left (x , y\right )\hspace {3pt}\textrm {by integrating}\hspace {3pt} M \left (x , y\right )\hspace {3pt}\textrm {with respect to}\hspace {3pt} x \\ {} & {} & G \left (x , y\right )=\int \left (13618 A \,x^{13617} y +k \,x^{m}+b \right )d x +\textit {\_F1} \left (y \right ) \\ \bullet & {} & \textrm {Evaluate integral}\hspace {3pt} \\ {} & {} & G \left (x , y\right )=x b +\frac {k \,x^{m +1}}{m +1}+A y \,x^{13618}+\textit {\_F1} \left (y \right ) \\ \bullet & {} & \textrm {Take derivative of}\hspace {3pt} G \left (x , y\right )\hspace {3pt}\textrm {with respect to}\hspace {3pt} y \\ {} & {} & N \left (x , y\right )=\frac {\partial }{\partial y}G \left (x , y\right ) \\ \bullet & {} & \textrm {Compute derivative}\hspace {3pt} \\ {} & {} & y +A \,x^{13618}+a =A \,x^{13618}+\frac {d}{d y}\textit {\_F1} \left (y \right ) \\ \bullet & {} & \textrm {Isolate for}\hspace {3pt} \frac {d}{d y}\textit {\_F1} \left (y \right ) \\ {} & {} & \frac {d}{d y}\textit {\_F1} \left (y \right )=y +a \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} \textit {\_F1} \left (y \right ) \\ {} & {} & \textit {\_F1} \left (y \right )=\frac {1}{2} y^{2}+a y \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \textit {\_F1} \left (y \right )\hspace {3pt}\textrm {into equation for}\hspace {3pt} G \left (x , y\right ) \\ {} & {} & G \left (x , y\right )=x b +\frac {k \,x^{m +1}}{m +1}+A y \,x^{13618}+\frac {y^{2}}{2}+a y \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} G \left (x , y\right )\hspace {3pt}\textrm {into the solution of the ODE}\hspace {3pt} \\ {} & {} & x b +\frac {k \,x^{m +1}}{m +1}+A y \,x^{13618}+\frac {y^{2}}{2}+a y =\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (x \right ) \\ {} & {} & \left \{y \left (x \right )=-\frac {A \,x^{13618} m +A \,x^{13618}+a m +a -\sqrt {A^{2} x^{27236} m^{2}+2 A^{2} x^{27236} m +2 A \,x^{13618} m^{2} a +4 A \,x^{13618} m a +A^{2} x^{27236}+2 A \,x^{13618} a +a^{2} m^{2}+2 a^{2} m +a^{2}-2 b \,m^{2} x -2 x^{m +1} k m +2 \mathit {C1} \,m^{2}-4 x b m -2 k \,x^{m +1}+4 \mathit {C1} m -2 x b +2 \mathit {C1}}}{m +1}, y \left (x \right )=-\frac {A \,x^{13618} m +A \,x^{13618}+a m +a +\sqrt {A^{2} x^{27236} m^{2}+2 A^{2} x^{27236} m +2 A \,x^{13618} m^{2} a +4 A \,x^{13618} m a +A^{2} x^{27236}+2 A \,x^{13618} a +a^{2} m^{2}+2 a^{2} m +a^{2}-2 b \,m^{2} x -2 x^{m +1} k m +2 \mathit {C1} \,m^{2}-4 x b m -2 k \,x^{m +1}+4 \mathit {C1} m -2 x b +2 \mathit {C1}}}{m +1}\right \} \end {array} \]
2.25.3.4 ✓ Mathematica. Time used: 17.685 (sec). Leaf size: 118
ode=(y[x]+A*x^n+a)*D[y[x],x]+n*A*x^(n-1)*y[x]+k*x^m+b==0;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*} y(x)&\to -\sqrt {\frac {1}{x}} \sqrt {x \left (\left (a+A x^n\right )^2-\frac {2 x \left (b m+b+k x^m\right )}{m+1}+c_1\right )}-a-A x^n\\ y(x)&\to \sqrt {\frac {1}{x}} \sqrt {x \left (\left (a+A x^n\right )^2-\frac {2 x \left (b m+b+k x^m\right )}{m+1}+c_1\right )}-a-A x^n \end{align*}
2.25.3.5 ✗ Sympy
from sympy import *
x = symbols("x")
A = symbols("A")
a = symbols("a")
b = symbols("b")
k = symbols("k")
m = symbols("m")
n = symbols("n")
y = Function("y")
ode = Eq(A*n*x**(n - 1)*y(x) + b + k*x**m + (A*x**n + a + y(x))*Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
Timed Out