3.9.8.4 Example 4. \(\left ( 1-x^{2}\right ) y^{\prime \prime }-xy^{\prime }+y=0\)

Writing the ode in normal form gives

\begin{align*} y^{\prime \prime }+p\left ( x\right ) y^{\prime }+q\left ( x\right ) y & =r\qquad \\ p & =\frac {-x}{\left ( 1-x^{2}\right ) }\qquad x\neq 1,x\neq -1\\ q & =\frac {1}{\left ( 1-x^{2}\right ) }\end{align*}

Trying change of variable on the independent variable as above.  Let \(\tau =g\left ( x\right ) \) where \(\tau \) will be the new independent variable. Applying this transformation results in

\begin{equation} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y=r_{1} \tag {1}\end{equation}
Where
\begin{align} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\left ( x\right ) \tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {2}\\ q_{1}\left ( \tau \right ) & =\frac {q\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\tag {3}\\ r_{1}\left ( \tau \right ) & =\frac {r\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} \tag {4}\end{align}

Approach 1. Let \(q_{1}=c^{2}\) where \(c^{2}\) is some constant. This implies

\begin{align} \frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}} & =c^{2}\nonumber \\ \tau & =\frac {1}{c}\int \sqrt {q}dx \tag {5}\end{align}

If with this \(\tau \), then \(p_{1}\) turns out to be constant, then it means (1) is second order constant coefficient ode which is easily solved. Using the given ode (5) becomes

\begin{align*} \tau & =\frac {1}{c}\int \sqrt {\frac {1}{\left ( 1-x^{2}\right ) }}dx\\ & =\frac {i}{c}\ln \left ( x+\sqrt {x^{2}-1}\right ) \end{align*}

Hence (2) now becomes

\begin{align*} p_{1}\left ( \tau \right ) & =\frac {\tau ^{\prime \prime }\left ( x\right ) +p\tau ^{\prime }\left ( x\right ) }{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =0 \end{align*}

Which is constant. Hence this transformation worked.  Therefore the ode (1) becomes (since \(q_{1}=c^{2}\) is constant \(c^{2}\))

\begin{align*} y^{\prime \prime }\left ( \tau \right ) +p_{1}y^{\prime }\left ( \tau \right ) +q_{1}y\left ( \tau \right ) & =r_{1}\\ y^{\prime \prime }+c^{2}y & =0 \end{align*}

The solution is

\[ y\left ( \tau \right ) =A\cos \left ( c\tau \right ) +B\sin \left ( c\tau \right ) \]
Using \(\tau =\frac {i}{c}\ln \left ( x+\sqrt {x^{2}-1}\right ) \) the above becomes
\[ y\left ( x\right ) =A\cos \left ( i\ln \left ( x+\sqrt {x^{2}-1}\right ) \right ) +B\sin \left ( i\ln \left ( x+\sqrt {x^{2}-1}\right ) \right ) \]
Approach 2  Let \(p_{1}=0\). If with this choice now \(q_{1}\) becomes constant or a constant divided by \(\tau ^{2}\) then (2) can be integrated.  \(p_{1}=0\) implies from (2) that
\begin{align*} \tau ^{\prime \prime }+p\tau ^{\prime } & =0\\ \tau & =\int e^{-\int pdx}dx\\ \tau & =\int e^{\int \frac {x}{\left ( 1-x^{2}\right ) }dx}dx\\ \tau & =\int \frac {1}{\sqrt {x-1}\sqrt {x+1}}dx \end{align*}

Therefore

\begin{align*} q_{1} & =\frac {q}{\left ( \tau ^{\prime }\left ( x\right ) \right ) ^{2}}\\ & =\frac {\frac {1}{\left ( 1-x^{2}\right ) }}{\left ( \frac {1}{\sqrt {x-1}\sqrt {x+1}}\right ) ^{2}}\\ & =\frac {\frac {1}{\left ( 1-x^{2}\right ) }}{\frac {1}{\left ( x-1\right ) \left ( x+1\right ) }}\\ & =\frac {\frac {1}{\left ( 1-x^{2}\right ) }}{\frac {1}{x^{2}-1}}\\ & =-1 \end{align*}

Which is a constant. This transformation also worked. Eq (1) becomes

\begin{align*} y^{\prime \prime }+p_{1}y^{\prime }+q_{1}y & =r_{1}\\ y^{\prime \prime }\left ( \tau \right ) -y\left ( \tau \right ) & =0\\ y\left ( \tau \right ) & =Ae^{-\tau }+Be^{\tau }\end{align*}

Using \(\tau =\int \frac {1}{\sqrt {x-1}\sqrt {x+1}}dx=\ln \left ( x+\sqrt {x^{2}-1}\right ) \), \(\left ( x>1\right ) \) the above

\begin{align*} y\left ( x\right ) & =Ae^{-\tau }+Be^{\tau }\\ & =Ae^{-\ln \left ( x+\sqrt {x^{2}-1}\right ) }+Be^{\ln \left ( x+\sqrt {x^{2}-1}\right ) }\\ & =\frac {A}{x+\sqrt {x^{2}-1}}+B\left ( x+\sqrt {x^{2}-1}\right ) \end{align*}

This solution looks different from the solution found above using approach 1, but can be shown to be the same. This was an example where both methods of change of variable on the independent variable work.