3.3.18.2 Integrating factor that depends on \(y\) only
Let
\begin{align} \mu M\left ( x,y\right ) +\mu N\left ( x,y\right ) \frac {dy}{dx} & =d\phi \left ( x,y\right ) \tag {1}\\ & =\frac {\partial \phi }{\partial x}\frac {dx}{dx}+\frac {\partial \phi }{\partial y}\frac {dy}{dx}\nonumber \\ & =\frac {\partial \phi }{\partial x}+\frac {\partial \phi }{\partial y}\frac {dy}{dx} \tag {2}\end{align}
Comparing (1),(2) then
\begin{align*} \frac {\partial \phi }{\partial x} & =\mu M\\ \frac {\partial \phi }{\partial y} & =\mu N \end{align*}
The compatibility condition is \(\frac {\partial ^{2}\phi }{\partial y\partial x}=\frac {\partial ^{2}\phi }{\partial x\partial y}\) then this implies
\begin{align*} \frac {\partial }{\partial y}\left ( \frac {\partial \phi }{\partial x}\right ) & =\frac {\partial }{\partial x}\left ( \frac {\partial \phi }{\partial y}\right ) \\ \frac {\partial \mu M}{\partial y} & =\frac {\partial \mu N}{\partial x}\\ \mu _{y}M+\mu M_{y} & =\mu _{x}N+\mu N_{x}\\ \mu _{y}M & =\mu _{x}N+\mu N_{x}-\mu M_{y}\\ \mu _{y}M & =\mu _{x}N+\mu \left ( N_{x}-M_{y}\right ) \\ \mu _{y} & =\frac {\mu _{x}N}{M}+\frac {1}{M}\mu \left ( N_{x}-M_{y}\right ) \end{align*}
Assuming \(\mu \equiv \mu \left ( y\right ) \) then \(\mu _{x}=0\) and the above simplifies to
\begin{align*} \mu _{y} & =\frac {1}{M}\mu \left ( N_{x}-M_{y}\right ) \\ \frac {d\mu }{dy}\frac {1}{\mu } & =\frac {1}{M}\left ( N_{x}-M_{y}\right ) \end{align*}
Let \(\frac {1}{M}\left ( N_{x}-M_{y}\right ) =B\). If \(B\equiv B\left ( y\right ) \) which depends only on \(y\) then we can solve the above.
\begin{align*} \frac {d\mu }{dy}\frac {1}{\mu } & =B\left ( y\right ) \\ \mu & =e^{\int Bdy}\end{align*}
Let \(\overline {M}=\mu M,\overline {N}=\mu N\) then the ode
\[ \overline {M}\left ( x,y\right ) +\overline {N}\left ( x,y\right ) y^{\prime }=0 \]
is now exact.
3.3.18.2.1 Example 1
Solve
\begin{align*} \frac {dy}{dx} & =\frac {\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}{\left ( x^{2}-1\right ) }\\ dy & =\frac {\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}{\left ( x^{2}-1\right ) }dx\\ -\frac {\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}{\left ( x^{2}-1\right ) }dx+dy & =0 \end{align*}
Comparing to
\[ M\left ( x,y\right ) dx+N\left ( x,y\right ) dy=0 \]
Shows that \(M=-\frac {\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}{\left ( x^{2}-1\right ) },N=1\). We see that \(\frac {\partial M}{\partial y}\neq \frac {\partial N}{\partial x}\). Hence not exact. Lets try
\begin{align*} B & =\frac {1}{M}\left ( \frac {\partial N}{\partial x}-\frac {\partial M}{\partial y}\right ) \\ & =\frac {\left ( 1-x^{2}\right ) }{\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}\left ( 0-\frac {-y}{\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}\right ) \\ & =\frac {\left ( 1-x^{2}\right ) }{\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}\frac {y}{\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}\\ & =\frac {\left ( 1-x^{2}\right ) y}{\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }\\ & =\frac {-y}{\left ( y^{2}-1\right ) }\end{align*}
Since \(B\) does not depend on \(x\) then we can use this for an integrating factor.
\begin{align*} \mu & =e^{\int Bdy}\\ & =e^{-\int \frac {y}{\left ( y^{2}-1\right ) }dy}\\ & =\frac {1}{\sqrt {y-1}\sqrt {y+1}}\end{align*}
Hence the ode now becomes
\begin{align} \mu Mdx+\mu Ndy & =0\nonumber \\ \bar {M}dx+\bar {N}dy & =0 \tag {A1}\end{align}
Where
\begin{align*} \bar {M} & =\mu M\\ & =\frac {1}{\sqrt {y-1}\sqrt {y+1}}\frac {\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}{\left ( x^{2}-1\right ) }\\ & =\frac {\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( x^{2}-1\right ) }\end{align*}
And
\begin{align*} \bar {N} & =\mu N\\ & =\frac {1}{\sqrt {y-1}\sqrt {y+1}}\end{align*}
Now ode (A1) is exact. Now we follow the main method for solving an exact ode on the
above. Let
\begin{align} \frac {\partial \phi }{\partial x} & =\bar {M}\tag {1}\\ \frac {\partial \phi }{\partial y} & =\bar {N} \tag {2}\end{align}
Since \(M\) has both \(y\) and \(x\), in it and \(N\) has only \(y\) in it, then in this case we start differently than
before. We start with (2) and not (1) as it makes things simpler when integrating.
Integrating (2) w.r.t. \(y\) gives
\begin{align} \phi & =\int \bar {N}dy+f\left ( x\right ) \nonumber \\ & =\int \frac {1}{\sqrt {y-1}\sqrt {y+1}}dy+f\left ( x\right ) \nonumber \end{align}
But \(\int \frac {1}{\sqrt {y-1}\sqrt {y+1}}dy=\frac {\sqrt {\left ( y-1\right ) \left ( y+1\right ) }\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}=\frac {\sqrt {y^{2}-1}\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}\), hence the above becomes
\begin{equation} \phi =\frac {\sqrt {y^{2}-1}\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}+f\left ( x\right ) \tag {3}\end{equation}
Taking derivative of (3) w.r.t. \(x\) gives
\begin{align} \frac {\partial \phi }{\partial x} & =\frac {d}{dx}\left ( \frac {\sqrt {y^{2}-1}\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}\right ) +f^{\prime }\left ( x\right ) \nonumber \\ \frac {\partial \phi }{\partial x} & =f^{\prime }\left ( x\right ) \tag {4}\end{align}
But \(\frac {\partial \phi }{\partial x}=\bar {M}\). Hence the above becomes
\begin{align*} \bar {M} & =f^{\prime }\left ( x\right ) \\ \frac {\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( x^{2}-1\right ) } & =f^{\prime }\left ( x\right ) \end{align*}
To solve for \(f\left ( x\right ) \) we now integrate the above w.r.t. \(x\) which gives
\begin{equation} \int ^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }d\tau =f\left ( x\right ) \nonumber \end{equation}
No need to add constant of
integration, as that will be absorbed anyway. Substituting the above back into (3) gives
\[ \phi =\frac {\sqrt {y^{2}-1}\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}+\int ^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }d\tau \]
\(\phi =c\),
hence the solution is
\begin{equation} \frac {\sqrt {y^{2}-1}\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}+\int ^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }d\tau +c=0 \tag {4A}\end{equation}
Lets now see what happens if after Eq (2), we started with \(M\) and not \(N\) as we always do.
Integrating (1) w.r.t. \(x\) gives
\begin{align} \phi & =\int \bar {M}dx+f\left ( y\right ) \nonumber \\ & =\int \frac {\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( x^{2}-1\right ) }dx+f\left ( y\right ) \nonumber \\ & =\int ^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }d\tau +f\left ( y\right ) \tag {5}\end{align}
Taking derivative w.r.t. \(y\) the above becomes
\begin{align*} \frac {\partial \phi }{\partial y} & =\frac {d}{dy}\int ^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }d\tau +f^{\prime }\left ( y\right ) \\ & =\int ^{x}\frac {\partial }{\partial y}\left ( \frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }\right ) d\tau +f^{\prime }\left ( y\right ) \\ & =0+f^{\prime }\left ( y\right ) \\ & =f^{\prime }\left ( y\right ) \end{align*}
But \(\frac {\partial \phi }{\partial y}=\bar {N}\), hence the above becomes
\[ \frac {1}{\sqrt {y-1}\sqrt {y+1}}=f^{\prime }\left ( y\right ) \]
Integrating w.r.t. \(y\) gives
\begin{align*} f\left ( y\right ) & =\int \frac {1}{\sqrt {y-1}\sqrt {y+1}}dy+c\\ f\left ( y\right ) & =\frac {\sqrt {\left ( y-1\right ) \left ( y+1\right ) }\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}+c \end{align*}
Substituting this into (5) gives the solution as (after combining constants)
\[ c_{1}=\int ^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }d\tau +\frac {\sqrt {\left ( y-1\right ) \left ( y+1\right ) }\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}\]
Which is same answer as (4A). So starting with \(M\) or \(N\) gives same result. But if \(N\) depends on
\(x,y\,\) and \(M\) depends on only one of these, it can be simpler to pick \(M\). Same for the other way
around. If \(N\) depends on only one, and \(M\) depends on both \(x,y\), then it will be easier to start with \(N\).
But in both cases, same result should be obtained.
3.3.18.2.2 Example 2
This is same example as above but with initial conditions \(y\left ( x_{0}\right ) =y_{0}\) to show how to handle IC when
unable to do the integration.
\begin{align*} -\frac {\sqrt {\left ( x^{2}-1\right ) \left ( y^{2}-1\right ) }}{\left ( x^{2}-1\right ) }dx+dy & =0\\ y\left ( x_{0}\right ) & =y_{0}\end{align*}
The solution found in above example is
\[ \frac {\sqrt {y^{2}-1}\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}+\int ^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }d\tau +c=0 \]
At \(y\left ( x_{0}\right ) =y_{0}\) the above becomes
\[ \frac {\sqrt {y_{0}^{2}-1}\ln \left ( y_{0}+\sqrt {y_{0}^{2}-1}\right ) }{\sqrt {y_{0}-1}\sqrt {y_{0}+1}}+\int _{x_{0}}^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y_{0}-1}\sqrt {y_{0}+1}\left ( \tau ^{2}-1\right ) }d\tau +c=0 \]
Substituting this value of \(c\) in
the solution gives
\[ \frac {\sqrt {y^{2}-1}\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}+\int _{x0}^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }d\tau =\frac {\sqrt {y_{0}^{2}-1}\ln \left ( y_{0}+\sqrt {y_{0}^{2}-1}\right ) }{\sqrt {y_{0}-1}\sqrt {y_{0}+1}}+\int _{x_{0}}^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y_{0}-1}\sqrt {y_{0}+1}\left ( \tau ^{2}-1\right ) }d\tau \]
Or
\[ \left ( \frac {\sqrt {y^{2}-1}\ln \left ( y+\sqrt {y^{2}-1}\right ) }{\sqrt {y-1}\sqrt {y+1}}-\frac {\sqrt {y_{0}^{2}-1}\ln \left ( y_{0}+\sqrt {y_{0}^{2}-1}\right ) }{\sqrt {y_{0}-1}\sqrt {y_{0}+1}}\right ) +\int _{x0}^{x}\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y-1}\sqrt {y+1}\left ( \tau ^{2}-1\right ) }-\frac {\sqrt {\left ( \tau ^{2}-1\right ) \left ( y^{2}-1\right ) }}{\sqrt {y_{0}-1}\sqrt {y_{0}+1}\left ( \tau ^{2}-1\right ) }d\tau =0 \]