2.4.4 Problem 4
Internal
problem
ID
[19726]
Book
:
Elementary
Differential
Equations.
By
Thornton
C.
Fry.
D
Van
Nostrand.
NY.
First
Edition
(1929)
Section
:
Chapter
IV.
Methods
of
solution:
First
order
equations.
section
31.
Problems
at
page
85
Problem
number
:
4
Date
solved
:
Thursday, December 11, 2025 at 01:50:27 PM
CAS
classification
:
[_linear]
2.4.4.1 Solved using first_order_ode_linear
0.110 (sec)
Entering first order ode linear solver
\begin{align*}
p^{\prime }&=\frac {p+a \,t^{3}-2 p t^{2}}{t \left (-t^{2}+1\right )} \\
\end{align*}
In canonical form a linear first order is \begin{align*} p^{\prime } + q(t)p &= p(t) \end{align*}
Comparing the above to the given ode shows that
\begin{align*} q(t) &=-\frac {2 t^{2}-1}{t^{3}-t}\\ p(t) &=-\frac {t^{2} a}{t^{2}-1} \end{align*}
The integrating factor \(\mu \) is
\begin{align*} \mu &= e^{\int {q\,dt}}\\ &= {\mathrm e}^{\int -\frac {2 t^{2}-1}{t^{3}-t}d t}\\ &= \frac {1}{t \sqrt {1+t}\, \sqrt {t -1}} \end{align*}
The ode becomes
\begin{align*}
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}}\left ( \mu p\right ) &= \mu p \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}}\left ( \mu p\right ) &= \left (\mu \right ) \left (-\frac {t^{2} a}{t^{2}-1}\right ) \\
\frac {\mathop {\mathrm {d}}}{ \mathop {\mathrm {d}t}} \left (\frac {p}{t \sqrt {1+t}\, \sqrt {t -1}}\right ) &= \left (\frac {1}{t \sqrt {1+t}\, \sqrt {t -1}}\right ) \left (-\frac {t^{2} a}{t^{2}-1}\right ) \\
\mathrm {d} \left (\frac {p}{t \sqrt {1+t}\, \sqrt {t -1}}\right ) &= \left (-\frac {t a}{\left (t^{2}-1\right ) \sqrt {1+t}\, \sqrt {t -1}}\right )\, \mathrm {d} t \\
\end{align*}
Integrating gives \begin{align*} \frac {p}{t \sqrt {1+t}\, \sqrt {t -1}}&= \int {-\frac {t a}{\left (t^{2}-1\right ) \sqrt {1+t}\, \sqrt {t -1}} \,dt} \\ &=\frac {\sqrt {t -1}\, \sqrt {1+t}\, a}{t^{2}-1} + c_1 \end{align*}
Dividing throughout by the integrating factor \(\frac {1}{t \sqrt {1+t}\, \sqrt {t -1}}\) gives the final solution
\[ p = \frac {t \left (\sqrt {t -1}\, \sqrt {1+t}\, a +c_1 \left (t^{2}-1\right )\right ) \sqrt {t -1}\, \sqrt {1+t}}{t^{2}-1} \]
Summary of solutions found
\begin{align*}
p &= \frac {t \left (\sqrt {t -1}\, \sqrt {1+t}\, a +c_1 \left (t^{2}-1\right )\right ) \sqrt {t -1}\, \sqrt {1+t}}{t^{2}-1} \\
\end{align*}
2.4.4.2 Solved using first_order_ode_exact
0.200 (sec)
Entering first order ode exact solver
\begin{align*}
p^{\prime }&=\frac {p+a \,t^{3}-2 p t^{2}}{t \left (-t^{2}+1\right )} \\
\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(t,p) \mathop {\mathrm {d}t}+ N(t,p) \mathop {\mathrm {d}p}=0 \tag {1A} \]
Therefore \begin{align*} \mathop {\mathrm {d}p} &= \left (\frac {a \,t^{3}-2 p \,t^{2}+p}{t \left (-t^{2}+1\right )}\right )\mathop {\mathrm {d}t}\\ \left (-\frac {a \,t^{3}-2 p \,t^{2}+p}{t \left (-t^{2}+1\right )}\right ) \mathop {\mathrm {d}t} + \mathop {\mathrm {d}p} &= 0 \tag {2A} \end{align*}
Comparing (1A) and (2A) shows that
\begin{align*} M(t,p) &= -\frac {a \,t^{3}-2 p \,t^{2}+p}{t \left (-t^{2}+1\right )}\\ N(t,p) &= 1 \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 p} = \frac {\partial N}{\partial t} \]
Using result found above gives \begin{align*} \frac {\partial M}{\partial p} &= \frac {\partial }{\partial p} \left (-\frac {a \,t^{3}-2 p \,t^{2}+p}{t \left (-t^{2}+1\right )}\right )\\ &= \frac {-2 t^{2}+1}{t^{3}-t} \end{align*}
And
\begin{align*} \frac {\partial N}{\partial t} &= \frac {\partial }{\partial t} \left (1\right )\\ &= 0 \end{align*}
Since \(\frac {\partial M}{\partial p} \neq \frac {\partial N}{\partial t}\), then the ODE is not exact. Since the ODE is not exact, we will try to find an integrating
factor to make it exact. Let
\begin{align*} A &= \frac {1}{N} \left (\frac {\partial M}{\partial p} - \frac {\partial N}{\partial t} \right ) \\ &=1\left ( \left ( -\frac {-2 t^{2}+1}{t \left (-t^{2}+1\right )}\right ) - \left (0 \right ) \right ) \\ &=\frac {-2 t^{2}+1}{t^{3}-t} \end{align*}
Since \(A\) does not depend on \(p\), then it can be used to find an integrating factor. The integrating
factor \(\mu \) is
\begin{align*} \mu &= e^{ \int A \mathop {\mathrm {d}t} } \\ &= e^{\int \frac {-2 t^{2}+1}{t^{3}-t}\mathop {\mathrm {d}t} } \end{align*}
The result of integrating gives
\begin{align*} \mu &= e^{-\ln \left (t \right )-\frac {\ln \left (1+t \right )}{2}-\frac {\ln \left (t -1\right )}{2} } \\ &= \frac {1}{t \sqrt {1+t}\, \sqrt {t -1}} \end{align*}
\(M\) and \(N\) are multiplied by this integrating factor, giving new \(M\) and new \(N\) which are called \(\overline {M}\) and \(\overline {N}\) for
now so not to confuse them with the original \(M\) and \(N\).
\begin{align*} \overline {M} &=\mu M \\ &= \frac {1}{t \sqrt {1+t}\, \sqrt {t -1}}\left (-\frac {a \,t^{3}-2 p \,t^{2}+p}{t \left (-t^{2}+1\right )}\right ) \\ &= \frac {a \,t^{3}-2 p \,t^{2}+p}{t^{2} \left (t^{2}-1\right ) \sqrt {1+t}\, \sqrt {t -1}} \end{align*}
And
\begin{align*} \overline {N} &=\mu N \\ &= \frac {1}{t \sqrt {1+t}\, \sqrt {t -1}}\left (1\right ) \\ &= \frac {1}{t \sqrt {1+t}\, \sqrt {t -1}} \end{align*}
Now a modified ODE is ontained from the original ODE, which is exact and can be solved. The
modified ODE is
\begin{align*} \overline {M} + \overline {N} \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}t}} &= 0 \\ \left (\frac {a \,t^{3}-2 p \,t^{2}+p}{t^{2} \left (t^{2}-1\right ) \sqrt {1+t}\, \sqrt {t -1}}\right ) + \left (\frac {1}{t \sqrt {1+t}\, \sqrt {t -1}}\right ) \frac { \mathop {\mathrm {d}p}}{\mathop {\mathrm {d}t}} &= 0 \end{align*}
The following equations are now set up to solve for the function \(\phi \left (t,p\right )\)
\begin{align*} \frac {\partial \phi }{\partial t } &= \overline {M}\tag {1} \\ \frac {\partial \phi }{\partial p } &= \overline {N}\tag {2} \end{align*}
Integrating (2) w.r.t. \(p\) gives
\begin{align*}
\int \frac {\partial \phi }{\partial p} \mathop {\mathrm {d}p} &= \int \overline {N}\mathop {\mathrm {d}p} \\
\int \frac {\partial \phi }{\partial p} \mathop {\mathrm {d}p} &= \int \frac {1}{t \sqrt {1+t}\, \sqrt {t -1}}\mathop {\mathrm {d}p} \\
\tag{3} \phi &= \frac {p}{t \sqrt {1+t}\, \sqrt {t -1}}+ f(t) \\
\end{align*}
Where \(f(t)\) is used for the constant of integration since \(\phi \) is a function of
both \(t\) and \(p\). Taking derivative of equation (3) w.r.t \(t\) gives \begin{align*}
\tag{4} \frac {\partial \phi }{\partial t} &= -\frac {p}{t^{2} \sqrt {1+t}\, \sqrt {t -1}}-\frac {p}{2 t \left (1+t \right )^{{3}/{2}} \sqrt {t -1}}-\frac {p}{2 t \sqrt {1+t}\, \left (t -1\right )^{{3}/{2}}}+f'(t) \\
&=-\frac {2 p \left (t^{2}-\frac {1}{2}\right )}{\left (t -1\right )^{{3}/{2}} \left (1+t \right )^{{3}/{2}} t^{2}}+f'(t) \\
\end{align*}
But equation (1) says that \(\frac {\partial \phi }{\partial t} = \frac {a \,t^{3}-2 p \,t^{2}+p}{t^{2} \left (t^{2}-1\right ) \sqrt {1+t}\, \sqrt {t -1}}\). Therefore
equation (4) becomes \begin{equation}
\tag{5} \frac {a \,t^{3}-2 p \,t^{2}+p}{t^{2} \left (t^{2}-1\right ) \sqrt {1+t}\, \sqrt {t -1}} = -\frac {2 p \left (t^{2}-\frac {1}{2}\right )}{\left (t -1\right )^{{3}/{2}} \left (1+t \right )^{{3}/{2}} t^{2}}+f'(t)
\end{equation}
Solving equation (5) for \( f'(t)\) gives \[
f'(t) = \frac {a t}{\left (t -1\right )^{{3}/{2}} \left (1+t \right )^{{3}/{2}}}
\]
Integrating the above w.r.t \(t\) gives \begin{align*}
\int f'(t) \mathop {\mathrm {d}t} &= \int \left ( \frac {a t}{\left (t -1\right )^{{3}/{2}} \left (1+t \right )^{{3}/{2}}}\right ) \mathop {\mathrm {d}t} \\
f(t) &= -\frac {a}{\sqrt {t -1}\, \sqrt {1+t}}+ c_1 \\
\end{align*}
Where \(c_1\)
is constant of integration. Substituting result found above for \(f(t)\) into equation (3) gives \(\phi \) \[
\phi = \frac {p}{t \sqrt {1+t}\, \sqrt {t -1}}-\frac {a}{\sqrt {t -1}\, \sqrt {1+t}}+ 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 = \frac {p}{t \sqrt {1+t}\, \sqrt {t -1}}-\frac {a}{\sqrt {t -1}\, \sqrt {1+t}}
\]
Simplifying the above gives \begin{align*}
\frac {-a t +p}{t \sqrt {1+t}\, \sqrt {t -1}} &= c_1 \\
\end{align*}
Solving for \(p\) gives
\begin{align*}
p &= c_1 t \sqrt {t -1}\, \sqrt {1+t}+a t \\
\end{align*}
Summary of solutions found
\begin{align*}
p &= c_1 t \sqrt {t -1}\, \sqrt {1+t}+a t \\
\end{align*}
2.4.4.3 Solved using first_order_ode_homog_type_D2
0.124 (sec)
Entering first order ode homog type D2 solver
\begin{align*}
p^{\prime }&=\frac {p+a \,t^{3}-2 p t^{2}}{t \left (-t^{2}+1\right )} \\
\end{align*}
Applying change of variables \(p = u \left (t \right ) t\), then the ode
becomes \begin{align*} u^{\prime }\left (t \right ) t +u \left (t \right ) = \frac {u \left (t \right ) t +a \,t^{3}-2 u \left (t \right ) t^{3}}{t \left (-t^{2}+1\right )} \end{align*}
Which is now solved The ode
\begin{equation}
u^{\prime }\left (t \right ) = \frac {t \left (u \left (t \right )-a \right )}{\left (t -1\right ) \left (1+t \right )}
\end{equation}
is separable as it can be written as \begin{align*} u^{\prime }\left (t \right )&= \frac {t \left (u \left (t \right )-a \right )}{\left (t -1\right ) \left (1+t \right )}\\ &= f(t) g(u) \end{align*}
Where
\begin{align*} f(t) &= \frac {t}{\left (t -1\right ) \left (1+t \right )}\\ g(u) &= -a +u \end{align*}
Integrating gives
\begin{align*}
\int { \frac {1}{g(u)} \,du} &= \int { f(t) \,dt} \\
\int { \frac {1}{-a +u}\,du} &= \int { \frac {t}{\left (t -1\right ) \left (1+t \right )} \,dt} \\
\end{align*}
\[
\ln \left (u \left (t \right )-a \right )=\ln \left (\sqrt {t^{2}-1}\right )+c_1
\]
Taking the exponential of both sides the solution becomes\[
u \left (t \right )-a = c_1 \sqrt {t^{2}-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 \[
-a +u=0
\]
for \(u \left (t \right )\) gives \begin{align*} u \left (t \right )&=a \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*}
u \left (t \right )-a &= c_1 \sqrt {t^{2}-1} \\
u \left (t \right ) &= a \\
\end{align*}
Converting \(u \left (t \right )-a = c_1 \sqrt {t^{2}-1}\) back to \(p\) gives \begin{align*} \frac {p}{t}-a = c_1 \sqrt {t^{2}-1} \end{align*}
Converting \(u \left (t \right ) = a\) back to \(p\) gives
\begin{align*} p = a t \end{align*}
Solving for \(p\) gives
\begin{align*}
p &= a t \\
p &= \left (c_1 \sqrt {t^{2}-1}+a \right ) t \\
\end{align*}
Summary of solutions found
\begin{align*}
p &= a t \\
p &= \left (c_1 \sqrt {t^{2}-1}+a \right ) t \\
\end{align*}
2.4.4.4 Solved using first_order_ode_LIE
0.902 (sec)
Entering first order ode LIE solver
\begin{align*}
p^{\prime }&=\frac {p+a \,t^{3}-2 p t^{2}}{t \left (-t^{2}+1\right )} \\
\end{align*}
Writing the ode as \begin{align*} p^{\prime }&=\frac {-a \,t^{3}+2 p \,t^{2}-p}{t \left (t^{2}-1\right )}\\ p^{\prime }&= \omega \left ( t,p\right ) \end{align*}
The condition of Lie symmetry is the linearized PDE given by
\begin{align*} \eta _{t}+\omega \left ( \eta _{p}-\xi _{t}\right ) -\omega ^{2}\xi _{p}-\omega _{t}\xi -\omega _{p}\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 &= p a_{3}+t a_{2}+a_{1} \\
\tag{2E} \eta &= p b_{3}+t 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 (-a \,t^{3}+2 p \,t^{2}-p \right ) \left (b_{3}-a_{2}\right )}{t \left (t^{2}-1\right )}-\frac {\left (-a \,t^{3}+2 p \,t^{2}-p \right )^{2} a_{3}}{t^{2} \left (t^{2}-1\right )^{2}}-\left (\frac {-3 t^{2} a +4 t p}{t \left (t^{2}-1\right )}-\frac {-a \,t^{3}+2 p \,t^{2}-p}{t^{2} \left (t^{2}-1\right )}-\frac {2 \left (-a \,t^{3}+2 p \,t^{2}-p \right )}{\left (t^{2}-1\right )^{2}}\right ) \left (p a_{3}+t a_{2}+a_{1}\right )-\frac {\left (2 t^{2}-1\right ) \left (p b_{3}+t b_{2}+b_{1}\right )}{t \left (t^{2}-1\right )} = 0
\end{equation}
Putting the above in normal form gives \[
-\frac {a^{2} t^{6} a_{3}-4 a p \,t^{5} a_{3}-a \,t^{6} a_{2}+a \,t^{6} b_{3}+2 p^{2} t^{4} a_{3}+t^{6} b_{2}+4 a p \,t^{3} a_{3}+3 a \,t^{4} a_{2}-a \,t^{4} b_{3}-2 p \,t^{4} a_{1}+2 t^{5} b_{1}+2 a \,t^{3} a_{1}-3 p^{2} t^{2} a_{3}-2 p \,t^{3} a_{2}-t^{4} b_{2}+p \,t^{2} a_{1}-3 t^{3} b_{1}-p a_{1}+t b_{1}}{t^{2} \left (t^{2}-1\right )^{2}} = 0
\]
Setting the numerator to zero gives \begin{equation}
\tag{6E} -a^{2} t^{6} a_{3}+4 a p \,t^{5} a_{3}+a \,t^{6} a_{2}-a \,t^{6} b_{3}-2 p^{2} t^{4} a_{3}-t^{6} b_{2}-4 a p \,t^{3} a_{3}-3 a \,t^{4} a_{2}+a \,t^{4} b_{3}+2 p \,t^{4} a_{1}-2 t^{5} b_{1}-2 a \,t^{3} a_{1}+3 p^{2} t^{2} a_{3}+2 p \,t^{3} a_{2}+t^{4} b_{2}-p \,t^{2} a_{1}+3 t^{3} b_{1}+p a_{1}-t b_{1} = 0
\end{equation}
Looking at
the above PDE shows the following are all the terms with \(\{p, t\}\) in them. \[
\{p, t\}
\]
The following substitution is
now made to be able to collect on all terms with \(\{p, t\}\) in them \[
\{p = v_{1}, t = v_{2}\}
\]
The above PDE (6E) now becomes \begin{equation}
\tag{7E} -a^{2} a_{3} v_{2}^{6}+a a_{2} v_{2}^{6}+4 a a_{3} v_{1} v_{2}^{5}-a b_{3} v_{2}^{6}-2 a_{3} v_{1}^{2} v_{2}^{4}-b_{2} v_{2}^{6}-3 a a_{2} v_{2}^{4}-4 a a_{3} v_{1} v_{2}^{3}+a b_{3} v_{2}^{4}+2 a_{1} v_{1} v_{2}^{4}-2 b_{1} v_{2}^{5}-2 a a_{1} v_{2}^{3}+2 a_{2} v_{1} v_{2}^{3}+3 a_{3} v_{1}^{2} v_{2}^{2}+b_{2} v_{2}^{4}-a_{1} v_{1} v_{2}^{2}+3 b_{1} v_{2}^{3}+a_{1} v_{1}-b_{1} v_{2} = 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 a_{3} v_{1}^{2} v_{2}^{4}+3 a_{3} v_{1}^{2} v_{2}^{2}+4 a a_{3} v_{1} v_{2}^{5}+2 a_{1} v_{1} v_{2}^{4}+\left (-4 a a_{3}+2 a_{2}\right ) v_{1} v_{2}^{3}-a_{1} v_{1} v_{2}^{2}+a_{1} v_{1}+\left (-a^{2} a_{3}+a a_{2}-a b_{3}-b_{2}\right ) v_{2}^{6}-2 b_{1} v_{2}^{5}+\left (-3 a a_{2}+a b_{3}+b_{2}\right ) v_{2}^{4}+\left (-2 a a_{1}+3 b_{1}\right ) v_{2}^{3}-b_{1} v_{2} = 0
\end{equation}
Setting each coefficients in (8E) to zero gives the following equations to solve
\begin{align*} a_{1}&=0\\ -a_{1}&=0\\ 2 a_{1}&=0\\ -2 a_{3}&=0\\ 3 a_{3}&=0\\ -2 b_{1}&=0\\ -b_{1}&=0\\ 4 a a_{3}&=0\\ -2 a a_{1}+3 b_{1}&=0\\ -4 a a_{3}+2 a_{2}&=0\\ -3 a a_{2}+a b_{3}+b_{2}&=0\\ -a^{2} a_{3}+a a_{2}-a b_{3}-b_{2}&=0 \end{align*}
Solving the above equations for the unknowns gives
\begin{align*} a_{1}&=0\\ a_{2}&=0\\ a_{3}&=0\\ b_{1}&=0\\ b_{2}&=-a b_{3}\\ 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 &= 0 \\
\eta &= -a t +p \\
\end{align*}
The next step is to determine the canonical coordinates \(R,S\). The canonical
coordinates map \(\left ( t,p\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 t}{\xi } &= \frac {d p}{\eta } = dS \tag {1} \end{align*}
The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial t} + \eta \frac {\partial }{\partial p}\right ) S(t,p) = 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 = t \end{align*}
\(S\) is found from
\begin{align*} S &= \int { \frac {1}{\eta }} dy\\ &= \int { \frac {1}{-a t +p}} dy \end{align*}
Which results in
\begin{align*} S&= \ln \left (-a t +p \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_{t} + \omega (t,p) S_{p} }{ R_{t} + \omega (t,p) R_{p} }\tag {2} \end{align*}
Where in the above \(R_{t},R_{p},S_{t},S_{p}\) are all partial derivatives and \(\omega (t,p)\) is the right hand side of the original ode
given by
\begin{align*} \omega (t,p) &= \frac {-a \,t^{3}+2 p \,t^{2}-p}{t \left (t^{2}-1\right )} \end{align*}
Evaluating all the partial derivatives gives
\begin{align*} R_{t} &= 1\\ R_{p} &= 0\\ S_{t} &= \frac {a}{a t -p}\\ S_{p} &= \frac {1}{-a t +p} \end{align*}
Substituting all the above in (2) and simplifying gives the ode in canonical coordinates.
\begin{align*} \frac {dS}{dR} &= \frac {2 t^{2}-1}{t^{3}-t}\tag {2A} \end{align*}
We now need to express the RHS as function of \(R\) only. This is done by solving for \(t,p\) in terms of \(R,S\)
from the result obtained earlier and simplifying. This gives
\begin{align*} \frac {dS}{dR} &= \frac {2 R^{2}-1}{R^{3}-R} \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 {2 R^{2}-1}{R \left (R^{2}-1\right )}\, dR}\\ S \left (R \right ) &= \ln \left (R \right )+\frac {\ln \left (R +1\right )}{2}+\frac {\ln \left (R -1\right )}{2} + c_2 \end{align*}
To complete the solution, we just need to transform the above back to \(t,p\) coordinates. This results
in
\begin{align*} \ln \left (-a t +p\right ) = \ln \left (t \right )+\frac {\ln \left (1+t \right )}{2}+\frac {\ln \left (t -1\right )}{2}+c_2 \end{align*}
Solving for \(p\) gives
\begin{align*}
p &= t \left ({\mathrm e}^{-\frac {\ln \left (t -1\right )}{2}-\frac {\ln \left (1+t \right )}{2}-c_2} a +1\right ) {\mathrm e}^{\ln \left (\sqrt {t -1}\right )+\ln \left (\sqrt {1+t}\right )+c_2} \\
\end{align*}
Summary of solutions found
\begin{align*}
p &= t \left ({\mathrm e}^{-\frac {\ln \left (t -1\right )}{2}-\frac {\ln \left (1+t \right )}{2}-c_2} a +1\right ) {\mathrm e}^{\ln \left (\sqrt {t -1}\right )+\ln \left (\sqrt {1+t}\right )+c_2} \\
\end{align*}
2.4.4.5 ✓ Maple. Time used: 0.001 (sec). Leaf size: 20
ode:=diff(p(t),t) = (p(t)+a*t^3-2*p(t)*t^2)/t/(-t^2+1);
dsolve(ode,p(t), singsol=all);
\[
p = t \left (c_1 \sqrt {t +1}\, \sqrt {t -1}+a \right )
\]
Maple trace
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \frac {d}{d t}p \left (t \right )=\frac {p \left (t \right )+a \,t^{3}-2 p \left (t \right ) t^{2}}{t \left (-t^{2}+1\right )} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d t}p \left (t \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d t}p \left (t \right )=\frac {p \left (t \right )+a \,t^{3}-2 p \left (t \right ) t^{2}}{t \left (-t^{2}+1\right )} \\ \bullet & {} & \textrm {Collect w.r.t.}\hspace {3pt} p \left (t \right )\hspace {3pt}\textrm {and simplify}\hspace {3pt} \\ {} & {} & \frac {d}{d t}p \left (t \right )=\frac {\left (2 t^{2}-1\right ) p \left (t \right )}{t \left (t^{2}-1\right )}-\frac {t^{2} a}{t^{2}-1} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} p \left (t \right )\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & \frac {d}{d t}p \left (t \right )-\frac {\left (2 t^{2}-1\right ) p \left (t \right )}{t \left (t^{2}-1\right )}=-\frac {t^{2} a}{t^{2}-1} \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (t \right ) \\ {} & {} & \mu \left (t \right ) \left (\frac {d}{d t}p \left (t \right )-\frac {\left (2 t^{2}-1\right ) p \left (t \right )}{t \left (t^{2}-1\right )}\right )=-\frac {\mu \left (t \right ) t^{2} a}{t^{2}-1} \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d t}\left (p \left (t \right ) \mu \left (t \right )\right ) \\ {} & {} & \mu \left (t \right ) \left (\frac {d}{d t}p \left (t \right )-\frac {\left (2 t^{2}-1\right ) p \left (t \right )}{t \left (t^{2}-1\right )}\right )=\left (\frac {d}{d t}p \left (t \right )\right ) \mu \left (t \right )+p \left (t \right ) \left (\frac {d}{d t}\mu \left (t \right )\right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \frac {d}{d t}\mu \left (t \right ) \\ {} & {} & \frac {d}{d t}\mu \left (t \right )=-\frac {\mu \left (t \right ) \left (2 t^{2}-1\right )}{t \left (t^{2}-1\right )} \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (t \right )=\frac {1}{\sqrt {t +1}\, \sqrt {t -1}\, t} \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \left (\frac {d}{d t}\left (p \left (t \right ) \mu \left (t \right )\right )\right )d t =\int -\frac {\mu \left (t \right ) t^{2} a}{t^{2}-1}d t +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & p \left (t \right ) \mu \left (t \right )=\int -\frac {\mu \left (t \right ) t^{2} a}{t^{2}-1}d t +\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} p \left (t \right ) \\ {} & {} & p \left (t \right )=\frac {\int -\frac {\mu \left (t \right ) t^{2} a}{t^{2}-1}d t +\mathit {C1}}{\mu \left (t \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (t \right )=\frac {1}{\sqrt {t +1}\, \sqrt {t -1}\, t} \\ {} & {} & p \left (t \right )=\sqrt {t +1}\, \sqrt {t -1}\, t \left (\int -\frac {t a}{\sqrt {t +1}\, \sqrt {t -1}\, \left (t^{2}-1\right )}d t +\mathit {C1} \right ) \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & p \left (t \right )=\sqrt {t +1}\, \sqrt {t -1}\, t \left (\frac {\sqrt {t -1}\, \sqrt {t +1}\, a}{t^{2}-1}+\mathit {C1} \right ) \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & p \left (t \right )=\frac {\sqrt {t +1}\, \sqrt {t -1}\, \left (\sqrt {t -1}\, \sqrt {t +1}\, a +\mathit {C1} \left (t^{2}-1\right )\right ) t}{t^{2}-1} \end {array} \]
2.4.4.6 ✓ Mathematica. Time used: 0.032 (sec). Leaf size: 23
ode=D[p[t],t]==(p[t]+a*t^3-2*p[t]*t^2 )/(t*(1-t^2));
ic={};
DSolve[{ode,ic},p[t],t,IncludeSingularSolutions->True]
\begin{align*} p(t)&\to t \left (a+c_1 \sqrt {1-t^2}\right ) \end{align*}
2.4.4.7 ✓ Sympy. Time used: 24.190 (sec). Leaf size: 338
from sympy import *
t = symbols("t")
a = symbols("a")
p = Function("p")
ode = Eq(Derivative(p(t), t) - (a*t**3 - 2*t**2*p(t) + p(t))/(t*(1 - t**2)),0)
ics = {}
dsolve(ode,func=p(t),ics=ics)
\[
p{\left (t \right )} = \begin {cases} \frac {C_{1} \sqrt {1 - t^{2}} \sqrt {t^{2} - 1}}{2 t \sqrt {1 - t^{2}} + 2 i t \sqrt {t^{2} - 1} - 2 \sqrt {1 - t^{2}} \sqrt {t^{2} - 1} \left (\begin {cases} - \frac {t}{\sqrt {t^{2} - 1}} & \text {for}\: \left |{t^{2}}\right | > 1 \\\frac {i t}{\sqrt {1 - t^{2}}} & \text {otherwise} \end {cases}\right ) + \sqrt {1 - t^{2}} \sqrt {t^{2} - 1} \left (\begin {cases} - \frac {2 t}{\sqrt {t^{2} - 1}} + \frac {1}{t \sqrt {t^{2} - 1}} & \text {for}\: \left |{t^{2}}\right | > 1 \\- \frac {2 i t^{2} \sqrt {1 - t^{2}}}{t^{3} - t} + \frac {i \sqrt {1 - t^{2}}}{t^{3} - t} & \text {otherwise} \end {cases}\right )} + \frac {a \sqrt {1 - t^{2}}}{2 t \sqrt {1 - t^{2}} + 2 i t \sqrt {t^{2} - 1} - 2 \sqrt {1 - t^{2}} \sqrt {t^{2} - 1} \left (\begin {cases} - \frac {t}{\sqrt {t^{2} - 1}} & \text {for}\: \left |{t^{2}}\right | > 1 \\\frac {i t}{\sqrt {1 - t^{2}}} & \text {otherwise} \end {cases}\right ) + \sqrt {1 - t^{2}} \sqrt {t^{2} - 1} \left (\begin {cases} - \frac {2 t}{\sqrt {t^{2} - 1}} + \frac {1}{t \sqrt {t^{2} - 1}} & \text {for}\: \left |{t^{2}}\right | > 1 \\- \frac {2 i t^{2} \sqrt {1 - t^{2}}}{t^{3} - t} + \frac {i \sqrt {1 - t^{2}}}{t^{3} - t} & \text {otherwise} \end {cases}\right )} & \text {for}\: t > -1 \wedge t < 1 \\\text {NaN} & \text {otherwise} \end {cases}
\]