4.1 Worked examples

4.1.1 Example 1 case one
4.1.2 Example 2 case one
4.1.3 Example 3 case one
4.1.4 Example 4 case one
4.1.5 Example 5 case one
4.1.6 Example 6 case one
4.1.7 Example 7 case two
4.1.8 Example 8 case two
4.1.9 Example 9 case two
4.1.10 Example 10 case two
4.1.11 Example 11 case one
4.1.12 Example 12 case one
4.1.13 Example 13 case one

4.1.1 Example 1 case one

Solve \[ \left ( 1-x^{2}\right ) y^{\prime \prime }-2xy^{\prime }+6y=0 \] Normalizing so that coefficient of \(u^{\prime \prime }\) is one gives (assuming \(x\neq 1\))\begin {align} y^{\prime \prime }-2\frac {x}{\left ( 1-x^{2}\right ) }y^{\prime }+\frac {6}{\left ( 1-x^{2}\right ) }y & =0\nonumber \\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0 \tag {1} \end {align}

Hence \begin {align*} a & =\frac {-2x}{\left ( 1-x^{2}\right ) }\\ b & =\frac {6}{\left ( 1-x^{2}\right ) } \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {1}{4}\left ( \frac {-2x}{\left ( 1-x^{2}\right ) }\right ) ^{2}+\frac {1}{2}\frac {d}{dx}\left ( \frac {-2x}{\left ( 1-x^{2}\right ) }\right ) -\frac {6}{\left ( 1-x^{2}\right ) }\nonumber \\ & =\frac {6x^{2}-7}{\left ( x^{2}-1\right ) ^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {6x^{2}-7}{\left ( x^{2}-1\right ) ^{2}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\). The free square factorization of \(t\) is \(t=t_{1}t_{2}^{2}\). Hence \begin {equation} m=2 \tag {6} \end {equation} And \(t_{1}=1,t_{2}=\left ( x^{2}-1\right ) \). Now \(O\left ( \infty \right ) =\deg \left ( t\right ) -\deg \left ( s\right ) =4-2=2\). The poles of \(r\) are \(x=1,-1\) each of order \(2\).  Looking at the cases table giving up, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that all cases are possible. Hence \(L=\left \{ 1,2,4,6,12\right \} \). So \(n=1,n=2,n=4,n=6,n=12\) will be tried until one is successful.

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =2,t=\left ( x^{2}-1\right ) ^{2},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 2,2\right ) -4-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 2-4\right ) \\ & =-\frac {1}{2}\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( \left ( x^{2}-1\right ) ^{2}\right ) }{\left ( x^{2}-1\right ) ^{2}}+3\left ( 0\right ) \right ) \\ & =\frac {x}{x^{2}-1} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}\). In other words, the number of poles of \(r\) that are of order \(2\). These will be the zeros of \(t_{2}\) in the above square free factorization of \(t\). From above we found that \(t_{2}=x^{2}-1\). Label these poles \(c_{1},c_{2},\cdots ,c_{k_{2}}\). The zeros of \(t_{2}\) are \(\left \{ 1,-1\right \} \) therefore \(c_{1}=1,c_{2}=-1\) and \(k_{2}=2\). For each \(c_{i}\) then \(e_{i}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{\left ( x-c_{i}\right ) ^{2}}\) in the partial fraction expansion of \(r\) which is\begin {align*} \frac {6x^{2}-7}{\left ( x^{2}-1\right ) ^{2}} & =\left ( \sum _{i}\frac {\alpha _{i}}{\left ( x-c_{i}\right ) ^{2}}\right ) +\left ( \sum _{j}\frac {\beta _{j}}{x-d_{j}}\right ) \\ & =\left ( -\frac {1}{4}\frac {1}{\left ( x-1\right ) ^{2}}-\frac {1}{4}\frac {1}{\left ( x+1\right ) ^{2}}\right ) +\left ( \frac {13}{4}\frac {1}{\left ( x-1\right ) }-\frac {13}{4}\frac {1}{x+1}\right ) \end {align*}

Therefore for \(c_{1}=1\), looking at the above, we see that the coefficient of \(\frac {1}{\left ( x-1\right ) ^{2}}\) is \(\frac {-1}{4}\). Hence \(b=\frac {-1}{4}\) and \(e_{1}=\sqrt {1+4b}=\sqrt {1-4\frac {1}{4}}=0\). For \(c_{2}=-1\ \)looking at the above, we see that the coefficient of \(\frac {1}{\left ( x+1\right ) ^{2}}\) is \(\frac {-1}{4}\). Hence \(b=\frac {-1}{4}\) and \(e_{2}=\sqrt {1+4b}=\sqrt {1-4\frac {1}{4}}=0\). Therefore\begin {align*} e_{1} & =0\\ e_{2} & =0 \end {align*}

Now, \(\theta _{i}=\frac {e_{i}}{x-c_{i}}\). For \(c_{1}=1\) this gives \(\theta _{1}=\frac {e_{1}}{x-1}=0\) since \(e_{1}=0\). And \(\theta _{2}=\frac {e_{2}}{x-c_{2}}\). For \(c_{2}=-1\) this gives \(\theta _{2}=\frac {e_{2}}{x+1}=0\) since \(e_{2}=0\). Hence\begin {align*} \theta _{1} & =0\\ \theta _{2} & =0 \end {align*}

Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots ,M\) if any exist. Since non exist here. This is skipped. This means \[ M=2 \] since \(2\) is the number of poles of order 2.

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). But if \(O\left ( \infty \right ) =2\) then \(\theta _{0}=0\) and \(e_{0}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{x^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). Since in this example \(O\left ( \infty \right ) =2\) then \begin {align*} e_{0} & =\sqrt {1+4b}\\ \theta _{0} & =0 \end {align*}

Now we need to find \(b\). The Laurent series expansion of \(r\) at \(\infty \) is \(\frac {6}{x^{2}}+\frac {5}{x^{4}}+\frac {4}{x^{6}}+\cdots \). Hence \(b=6\). Therefore\begin {align*} e_{0} & =\sqrt {1+4\left ( 6\right ) }\\ & =\sqrt {25}\\ & =5 \end {align*}

Now we have found all \(e_{i},\theta _{i}\). They are\begin {align*} e & =\left \{ 5,0,0\right \} \\ \theta & =\left \{ 0,0,0\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\). Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i} \tag {7} \end {equation} Where \(n\) is the case number. For case 1, it will be \(n=1\). For case 2 it will be \(n=2\). For case 3 it will be \(4\) and \(6\) and \(12.\) If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{M}s_{i}\theta _{i} \tag {8} \end {equation} We need to first generate \(s\) sets. For \(n=1\) and since \(M=2\) in this example (number of poles of order 2), then these these are given by\[ \Lambda =\begin {bmatrix} -\frac {1}{2} & -\frac {1}{2} & -\frac {1}{2}\\ -\frac {1}{2} & -\frac {1}{2} & +\frac {1}{2}\\ -\frac {1}{2} & +\frac {1}{2} & -\frac {1}{2}\\ -\frac {1}{2} & +\frac {1}{2} & +\frac {1}{2}\\ +\frac {1}{2} & -\frac {1}{2} & -\frac {1}{2}\\ +\frac {1}{2} & -\frac {1}{2} & +\frac {1}{2}\\ +\frac {1}{2} & +\frac {1}{2} & -\frac {1}{2}\\ +\frac {1}{2} & +\frac {1}{2} & +\frac {1}{2}\end {bmatrix} \] We go over each row one at a time. Trying the first row \(s=\left \{ \frac {-1}{2},\frac {-1}{2},\frac {-1}{2}\right \} \) which means \(s_{0}=\frac {-1}{2},s_{1}=\frac {-1}{2},s_{2}=-\frac {1}{2}\). Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-\frac {1}{2},\theta _{fixed}=\frac {x}{x^{2}-1}\) then\begin {align*} d & =\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 5\right ) -\left ( s_{1}e_{1}+s_{2}e_{2}\right ) \\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 5\right ) -\left ( \frac {-1}{2}\left ( 0\right ) -\frac {1}{2}\left ( 0\right ) \right ) \\ & =-3 \end {align*}

Since this is negative, then we skip this set \(s\). Now we try the second row of \(\Lambda \) which is \(s=\left \{ \frac {-1}{2},\frac {-1}{2},\frac {+1}{2}\right \} \). Then above now gives\begin {align*} d & =\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 5\right ) -\left ( s_{1}e_{1}+s_{2}e_{2}\right ) \\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 5\right ) -\left ( \frac {-1}{2}\left ( 0\right ) +\frac {1}{2}\left ( 0\right ) \right ) \\ & =-3 \end {align*}

Since this is negative, then we skip this set \(s\). Now we try the third row of \(\Lambda \) which is \(s=\left \{ \frac {-1}{2},\frac {+1}{2},\frac {-1}{2}\right \} \). Then above now gives\begin {align*} d & =\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 5\right ) -\left ( s_{1}e_{1}+s_{2}e_{2}\right ) \\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 5\right ) -\left ( \frac {+1}{2}\left ( 0\right ) -\frac {1}{2}\left ( 0\right ) \right ) \\ & =-3 \end {align*}

Since this is negative, then we skip this set \(s\). Now we try the row 4 of \(\Lambda \) which is \(s=\left \{ \frac {-1}{2},\frac {+1}{2},\frac {+1}{2}\right \} \). Then above now gives\begin {align*} d & =\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 5\right ) -\left ( s_{1}e_{1}+s_{2}e_{2}\right ) \\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 5\right ) -\left ( \frac {+1}{2}\left ( 0\right ) +\frac {1}{2}\left ( 0\right ) \right ) \\ & =-3 \end {align*}

Since this is negative, then we skip this set \(s\). Now we try the row 5 of \(\Lambda \) which is \(s=\left \{ \frac {+1}{2},\frac {-1}{2},\frac {-1}{2}\right \} \). Then above now gives\begin {align*} d & =\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {+1}{2}\right ) \left ( 5\right ) -\left ( s_{1}e_{1}+s_{2}e_{2}\right ) \\ & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {+1}{2}\right ) \left ( 5\right ) -\left ( \frac {+1}{2}\left ( 0\right ) +\frac {1}{2}\left ( 0\right ) \right ) \\ & =+2 \end {align*}

Since \(d\geq 0\), then we can use it. Now  using Eq (8) gives\begin {align*} \Theta & =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{M}s_{i}\theta _{i}\\ & =\left ( 1\right ) \left ( \frac {x}{x^{2}-1}\right ) +\left ( s_{0}\theta _{0}+s_{1}\theta _{1}+s_{2}\theta _{2}\right ) \\ & =\frac {x}{x^{2}-1}+\left ( \frac {+1}{2}\theta _{0}-\frac {1}{2}\theta _{1}-\frac {1}{2}\theta _{2}\right ) \end {align*}

But all \(\theta _{i}=0\). Therefore \[ \Theta =\frac {x}{x^{2}-1}\] Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(\omega \) if possible.

Step 3

The input to this step is the integer \(d=2\) and \(\Theta =\frac {x}{x^{2}-1}\) found from step 2 and also \(r=\frac {6x^{2}-7}{\left ( x^{2}-1\right ) ^{2}}\) which comes from \(z^{\prime \prime }=rz\). This step is broken into these parts. First we find the \(p_{-1}\left ( x\right ) \) polynomial. If we are to solve for its coefficients, then next we build the minimal polynomial from the \(p_{i}\left ( x\right ) \) polynomials constructed during finding \(p_{-1}\left ( x\right ) \). The minimal polynomial \(p_{\min }\left ( x\right ) \) will be a function of \(\omega \). Next we solve for \(\omega \) from \(p_{\min }\left ( x\right ) =0\). If this is successful, then we have found \(\omega \) and the first solution to the ode \(z^{\prime \prime }=rz\) is \(z=e^{\int \omega dx}\,\). Below shows how this is done.

We start by forming a polynomial\begin {align*} p\left ( x\right ) & =x^{d}+a_{d-1}x^{d-1}+\cdots +a_{0}\\ & =x^{2}+a_{1}x+a_{0} \end {align*}

The goal is to solve for the \(a_{i}\) coefficient. Now depending on case  number \(n\), we do the following. Since we are in case \(n=1\) then\begin {align*} p_{1} & =-p\\ & =-x^{2}-a_{1}x-a_{0}\\ p_{0} & =-p_{1}^{\prime }-\Theta p_{1}\\ & =-\left ( -x^{2}-a_{1}x-a_{0}\right ) ^{\prime }-\left ( \frac {x}{x^{2}-1}\right ) \left ( -x^{2}-a_{1}x-a_{0}\right ) \\ & =\frac {\left ( xa_{0}-a_{1}-2x+2x^{2}a_{1}+3x^{3}\right ) }{x^{2}-1}\\ p_{-1} & =-p_{0}^{\prime }-\Theta p_{0}-\left ( 1\right ) \left ( 1\right ) rp_{1}\\ & =-\left ( \frac {\left ( xa_{0}-a_{1}-2x+2x^{2}a_{1}+3x^{3}\right ) }{x^{2}-1}\right ) ^{\prime }-\left ( \frac {x}{x^{2}-1}\right ) \left ( \frac {\left ( xa_{0}-a_{1}-2x+2x^{2}a_{1}+3x^{3}\right ) }{x^{2}-1}\right ) -\frac {6x^{2}-7}{\left ( x^{2}-1\right ) ^{2}}\left ( -x^{2}-a_{1}x-a_{0}\right ) \\ & =2\frac {\left ( 2xa_{1}+3a_{0}+1\right ) }{x^{2}-1} \end {align*}

Now we try to solve for \(a_{i}\) using \(p_{-1}\left ( x\right ) =0\). This gives \(2xa_{1}+3a_{0}+1=0\) which gives \(a_{1}=0,a_{0}=-\frac {1}{3}\).  Hence this implies\begin {align*} p\left ( x\right ) & =x^{2}+a_{1}x+a_{0}\\ & =x^{2}-\frac {1}{3} \end {align*}

Since this is case \(n=1\) then\begin {align*} \omega & =\frac {p^{\prime }}{p}+\Theta \\ & =\frac {2x}{x^{2}-\frac {1}{3}}+\frac {x}{x^{2}-1}\\ & =x\frac {9x^{2}-7}{3x^{4}-4x^{2}+1} \end {align*}

Before using this, we will verify it is correct. For case 1 the above should satisfy\[ \omega ^{\prime }+\omega ^{2}=r \] Let us see if this is the case or not.\begin {align*} \frac {d}{dx}\left ( x\frac {9x^{2}-7}{3x^{4}-4x^{2}+1}\right ) +\left ( x\frac {9x^{2}-7}{3x^{4}-4x^{2}+1}\right ) ^{2} & =\frac {6x^{2}-7}{\left ( x^{2}-1\right ) ^{2}}\\ \frac {6x^{2}-7}{\left ( x^{2}-1\right ) ^{2}} & =\frac {6x^{2}-7}{\left ( x^{2}-1\right ) ^{2}} \end {align*}

Verified. Since solution \(\omega \) is found and verified, then first solution to the ode is \begin {align*} z & =e^{\int \omega dx}\\ & =e^{\int \frac {x\left ( 9x^{2}-7\right ) }{3x^{4}-4x^{2}+1}dx}\\ & =e^{\frac {1}{2}\ln \left ( x^{2}-1\right ) +\ln \left ( x^{2}-\frac {1}{3}\right ) }\\ & =\sqrt {x^{2}-1}\left ( x^{2}-\frac {1}{3}\right ) \end {align*}

Hence first solution to the original ode is\begin {align*} y & =ze^{\frac {-1}{2}\int adx}\\ & =\sqrt {x^{2}-1}\left ( x^{2}-\frac {1}{3}\right ) e^{\frac {-1}{2}\int \frac {-2x}{\left ( 1-x^{2}\right ) }dx}\\ & =\sqrt {x^{2}-1}\left ( x^{2}-\frac {1}{3}\right ) e^{\int \frac {x}{\left ( 1-x^{2}\right ) }dx}\\ & =\sqrt {x^{2}-1}\left ( x^{2}-\frac {1}{3}\right ) e^{\frac {-1}{2}\ln \left ( x^{2}-1\right ) }\\ & =\frac {\sqrt {x^{2}-1}\left ( x^{2}-\frac {1}{3}\right ) }{\sqrt {x^{2}-1}}\\ & =\left ( x^{2}-\frac {1}{3}\right ) \end {align*}

4.1.2 Example 2 case one

Solve \[ x\left ( x-1\right ) ^{2}y^{\prime \prime }-2y=0 \] Normalizing so that coefficient of \(u^{\prime \prime }\) is one gives (assuming \(x\neq 1\) and \(x\neq 0\))\begin {align} y^{\prime \prime }-\frac {2}{x\left ( x-1\right ) ^{2}}y & =0\nonumber \\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0 \tag {1} \end {align}

Hence \begin {align*} a & =0\\ b & =-\frac {2}{x\left ( x-1\right ) ^{2}} \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {2}{x\left ( x-1\right ) ^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {2}{x\left ( x-1\right ) ^{2}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\). The free square factorization of \(t\) is \(t=t_{1}t_{2}^{2}\). Hence \begin {equation} m=2 \tag {6} \end {equation} And\begin {align*} t_{1} & =x\\ t_{2} & =x-1 \end {align*}

Now \(O\left ( \infty \right ) =\deg \left ( t\right ) -\deg \left ( s\right ) =3-0=3\). The poles of \(r\) are \(x=0\) of order 1 and \(x=1\) of order 2.  Looking at the cases table giving up, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that all cases are possible. Hence \(L=\left \{ 1,2,4,6,12\right \} \). So \(n=1,n=2,n=4,n=6,n=12\) will be tried until one is successful. Starting with \(n=1\).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =3,t=x\left ( x-1\right ) ^{2},t_{1}=x\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 3,2\right ) -3-3\left ( 1\right ) \right ) \\ & =\frac {1}{4}\left ( 2-3-3\right ) \\ & =-1\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( x\left ( x-1\right ) ^{2}\right ) }{x\left ( x-1\right ) ^{2}}+3\left ( \frac {x^{\prime }}{x}\right ) \right ) \\ & =\frac {1}{4}\left ( \frac {3x^{2}-4x+1}{x\left ( x-1\right ) ^{2}}+\frac {3}{x}\right ) \\ & =\frac {1}{2x}\frac {3x-2}{x-1} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}\). In other words, the number of poles of \(r\) that are of order \(2\). These will be the zeros of \(t_{2}\) in the above square free factorization of \(t\). From above we found that \(t_{2}=x-1\). Label these poles \(c_{1},c_{2},\cdots ,c_{k_{2}}\). The zeros of \(t_{2}\) are \(\left \{ 1\right \} \) therefore \(c_{1}=1\) and \(k_{2}=1\) since one zero. Hence \[ M=1 \] For each \(c_{i}\) then \(e_{i}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{\left ( x-c_{i}\right ) ^{2}}\) in the partial fraction expansion of \(r\) which is\begin {align*} r & =\frac {2}{x\left ( x-1\right ) ^{2}}\\ & =\left ( \sum _{i}\frac {\alpha _{i}}{\left ( x-c_{i}\right ) ^{2}}\right ) +\left ( \sum _{j}\frac {\beta _{j}}{x-d_{j}}\right ) \\ & =\left ( \frac {2}{\left ( x-1\right ) ^{2}}\right ) +\left ( -\frac {2}{x-1}+\frac {2}{x}\right ) \end {align*}

Therefore for \(c_{1}=1\), looking at the above, we see that the coefficient of \(\frac {1}{\left ( x-1\right ) ^{2}}\) is \(2\). Hence \(b=2\) and \(e_{1}=\sqrt {1+4b}=\sqrt {1+8}=3\). Hence\[ e_{1}=3 \] Now, \(\theta _{i}=\frac {e_{i}}{x-c_{i}}\). For \(c_{1}=1\) this gives \(\theta _{1}=\frac {e_{1}}{x-1}=\frac {3}{x-1}\). Hence\[ \theta _{1}=\frac {3}{x-1}\] Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots ,M\) if any exist. Since non exist here. This is skipped. Hence \(M\) stays \(1\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). But if \(O\left ( \infty \right ) =2\) then \(\theta _{0}=0\) and \(e_{0}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{x^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). Since in this example \(O\left ( \infty \right ) =3\) then \begin {align*} e_{0} & =1\\ \theta _{0} & =0 \end {align*}

Now we have found all \(e_{i},\theta _{i}\). They are\begin {align*} e & =\left \{ 1,3\right \} \\ \theta & =\left \{ 0,\frac {3}{x-1}\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\). Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i} \tag {7} \end {equation} Where \(n\) is the case number. For case 1, it will be \(n=1\). For case 2 it will be \(n=2\). For case 3 it will be \(4\) and \(6\) and \(12.\) If \(d\geq 0\), then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{M}s_{i}\theta _{i} \tag {8} \end {equation} We need to first generate \(s\) sets. For \(n=1\) and since \(M=1\) in this example, then these these are given by\[ \Lambda =\begin {bmatrix} -\frac {1}{2} & -\frac {1}{2}\\ -\frac {1}{2} & +\frac {1}{2}\\ +\frac {1}{2} & -\frac {1}{2}\\ +\frac {1}{2} & +\frac {1}{2}\end {bmatrix} \] We go over each row one at a time. Trying the first row \(s=\left \{ \frac {-1}{2},\frac {-1}{2}\right \} \) which means \(s_{0}=\frac {-1}{2},s_{1}=\frac {-1}{2}\). Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-1,\theta _{fixed}=\frac {1}{2x}\frac {3x-2}{x-1}\) then\begin {align*} d & =\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\\ & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {-1}{2}\right ) \left ( 1\right ) -\left ( s_{1}e_{1}\right ) \\ & =-1-\frac {1}{2}-\left ( \frac {-1}{2}\left ( 3\right ) \right ) \\ & =0 \end {align*}

Since \(d\geq 0\), then we can use it. Now  using Eq (8) gives\begin {align*} \Theta & =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{M}s_{i}\theta _{i}\\ & =\left ( 1\right ) \left ( \frac {1}{2x}\frac {3x-2}{x-1}\right ) +\left ( s_{0}\theta _{0}+s_{1}\theta _{1}\right ) \\ & =\frac {1}{2x}\frac {3x-2}{x-1}+\left ( \frac {-1}{2}\theta _{0}-\frac {1}{2}\theta _{1}\right ) \\ & =\frac {1}{2x}\frac {3x-2}{x-1}-\frac {1}{2}\left ( 0\right ) -\frac {1}{2}\frac {3}{x-1} \end {align*}

Therefore\[ \Theta =-\frac {1}{x\left ( x-1\right ) }\] Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(\omega \) if possible.

Step 3

The input to this step is the integer \(d=0\) and \(\Theta =-\frac {1}{x\left ( x-1\right ) }\) found from step 2 and also \(r=\frac {2}{x\left ( x-1\right ) ^{2}}\) which comes from \(z^{\prime \prime }=rz\). This step is broken into these parts. First we find the \(p_{-1}\left ( x\right ) \) polynomial. If we are to solve for its coefficients, then next we build the minimal polynomial from the \(p_{i}\left ( x\right ) \) polynomials constructed during finding \(p_{-1}\left ( x\right ) \). The minimal polynomial \(p_{\min }\left ( x\right ) \) will be a function of \(\omega \). Next we solve for \(\omega \) from \(p_{\min }\left ( x\right ) =0\). If this is successful, then we have found \(\omega \) and the first solution to the ode \(z^{\prime \prime }=rz\) is \(z=e^{\int \omega dx}\,\). Below shows how this is done.

We start by forming a polynomial\begin {align*} p\left ( x\right ) & =x^{d}+a_{d-1}x^{d-1}+\cdots +a_{0}\\ & =1 \end {align*}

Since this is case \(n=1\) then\begin {align*} \omega & =\frac {p^{\prime }}{p}+\Theta \\ & =0-\frac {1}{x\left ( x-1\right ) }\\ & =\frac {-1}{x\left ( x-1\right ) } \end {align*}

Before using this, we will verify it is correct. For case 1 the above should satisfy\[ \omega ^{\prime }+\omega ^{2}=r \] Let us see if this is the case or not.\begin {align*} \frac {d}{dx}\left ( -\frac {1}{x\left ( x-1\right ) }\right ) +\left ( -\frac {1}{x\left ( x-1\right ) }\right ) ^{2} & =\frac {2}{x\left ( x-1\right ) ^{2}}\\ \frac {1}{x^{2}}\frac {2x-1}{\left ( x-1\right ) ^{2}}+\left ( -\frac {1}{x\left ( x-1\right ) }\right ) ^{2} & =\frac {2}{x\left ( x-1\right ) ^{2}}\\ \frac {2}{x\left ( x-1\right ) ^{2}} & =\frac {2}{x\left ( x-1\right ) ^{2}} \end {align*}

Verified. Since solution \(\omega \) is found and verified, then first solution to the ode is \begin {align*} z & =e^{\int -\frac {1}{x\left ( x-1\right ) }dx}\\ & =e^{\ln x-\ln \left ( x-1\right ) }\\ & =\frac {x}{x-1} \end {align*}

Hence first solution to given ODE is\begin {align*} y & =ze^{\frac {-1}{2}\int adx}\\ & =\frac {x}{x-1}e^{-\frac {1}{2}\int 0dx}\\ & =\frac {x}{x-1} \end {align*}

4.1.3 Example 3 case one

Solve \begin {align} y^{\prime \prime }-x^{2}y^{\prime }-x^{2}y & =0\tag {1}\\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0\nonumber \end {align}

Hence \begin {align*} a & =-x^{2}\\ b & =-x^{2} \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {1}{4}x^{4}-x+x^{2}\nonumber \\ & =\frac {x^{4}+4x^{2}-4x}{4} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\left ( \frac {x^{4}+4x^{2}-4x}{4}\right ) z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =x^{4}+4x^{2}-4x\\ t & =4 \end {align*}

The free square factorization of \(t\) is \(t=\left [ \left [ {}\right ] \right ] \). Hence \begin {equation} m=0 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this special case we set\begin {align*} t_{1} & =1\\ t_{2} & =1 \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =0-4\\ & =-4 \end {align*}

There are no poles. Looking at the cases table giving up, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that only case 1 meets the necessary conditions. Hence \(L=\left [ 1\right ] \). So \(n=1.\)

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =-4,t=4,t_{1}=4\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( -4,2\right ) -0-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( -4\right ) \\ & =-1\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( 4\right ) }{\left ( 4\right ) }+3\left ( \frac {\left ( 4\right ) ^{\prime }}{4}\right ) \right ) \\ & =0 \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}\). In other words, the number of poles of \(r\) that are of order \(2\). These will be the zeros of \(t_{2}\) in the above square free factorization of \(t\). From above we found that \(t_{2}=1\). Label these poles \(c_{1},c_{2},\cdots ,c_{k_{2}}\). The zeros of \(t_{2}\) are \(\left \{ {}\right \} \). There are no zeros since constant. Therefore \(k_{2}=0\) since one zero. Hence \[ M=0 \] No \(e_{i},\theta _{i}\) are generated. i.e. \(e=\left \{ {}\right \} ,\theta =\left \{ {}\right \} \) so far.

Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots ,M\) if any exist. Since non exist here. This is skipped. Hence \(M\) stays \(0\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). But if \(O\left ( \infty \right ) =2\) then \(\theta _{0}=0\) and \(e_{0}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{x^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). Since in this example \(O\left ( \infty \right ) =-4\) then none of these cases apply. We fall into the case that handles \(n=1\) only which is the current case which results in \(e_{0}=-2,\theta _{0}=2+x^{2}\). Hence\begin {align*} e & =\left \{ -2\right \} \\ \theta & =\left \{ 2+x^{2}\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\). Since \(n=1\) and \(M=0\) then we have \(\left ( n+1\right ) ^{M+1}=2^{1}=2\) sets \(s\) to try. These are given by\[ \Lambda =\begin {bmatrix} -\frac {1}{2}\\ +\frac {1}{2}\end {bmatrix} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\nonumber \end {equation} Since \(M=0\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{M}s_{i}\theta _{i} \tag {8} \end {equation} Since \(M=0\). Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-1,\theta _{fixed}=0\) then\begin {align*} d & =\left ( n\right ) \left ( e_{fix}\right ) +\left ( \frac {-1}{2}\right ) \left ( -2\right ) \\ & =\left ( 1\right ) \left ( -1\right ) +1\\ & =0 \end {align*}

Since \(d\geq 0\), then we can use it. Using Eq (8) gives\begin {align*} \Theta & =\left ( n\right ) \left ( \theta _{fix}\right ) +s_{0}\theta _{0}\\ & =0-\frac {1}{2}\left ( 2+x^{2}\right ) \\ & =-1-\frac {1}{2}x^{2} \end {align*}

Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(\omega \) if possible.

Step 3

The input to this step is the integer \(d=0\) and \(\Theta =-1-\frac {1}{2}x^{2}\) found from step 2 and also \(r=\frac {x^{4}+4x^{2}-4x}{4}\) which comes from \(z^{\prime \prime }=rz\). This step is broken into these parts. First we find the \(p_{-1}\left ( x\right ) \) polynomial. If we are to solve for its coefficients, then next we build the minimal polynomial from the \(p_{i}\left ( x\right ) \) polynomials constructed during finding \(p_{-1}\left ( x\right ) \). The minimal polynomial \(p_{\min }\left ( x\right ) \) will be a function of \(\omega \). Next we solve for \(\omega \) from \(p_{\min }\left ( x\right ) =0\). If this is successful, then we have found \(\omega \) and the first solution to the ode \(y^{\prime \prime }=ry\) is \(e^{\int \omega dx}\,\). Below shows how this is done.

We start by forming a polynomial\begin {align*} p\left ( x\right ) & =x^{d}+a_{d-1}x^{d-1}+\cdots +a_{0}\\ & =1 \end {align*}

Since this is case \(n=1\) then\begin {align*} \omega & =\frac {p^{\prime }}{p}+\Theta \\ & =-1-\frac {1}{2}x^{2} \end {align*}

Before using this, we will verify it is correct. For case 1 the above should satisfy\[ \omega ^{\prime }+\omega ^{2}=r \] Let us see if this is the case or not.\begin {align*} \frac {d}{dx}\left ( -1-\frac {1}{2}x^{2}\right ) +\left ( -1-\frac {1}{2}x^{2}\right ) ^{2} & =\left ( \frac {x^{4}+4x^{2}-4x}{4}\right ) \\ -x+\frac {1}{4}x^{4}+x^{2}+1 & =\frac {x^{4}+4x^{2}-4x}{4}\\ \frac {x^{4}+4x^{2}-4x}{4}+\frac {1}{4} & =\frac {x^{4}+4x^{2}-4x}{4} \end {align*}

It did not verify. This means this solution can not be used. If we try the next row in \(\Lambda \) we will find it gives negative \(d\). This means there is no Liouvillian solution. This is an example where even if we find \(d\geq 0\) we still can end up not finding a solution.

4.1.4 Example 4 case one

Solve \begin {align} \left ( x^{3}+1\right ) y^{\prime \prime }+7x^{2}y^{\prime }+9xy & =0\tag {1}\\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0\nonumber \end {align}

Hence \begin {align*} a & =\frac {7x^{2}}{\left ( x^{3}+1\right ) }\\ b & =\frac {9x}{\left ( x^{3}+1\right ) } \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {1}{4}\left ( \frac {7x^{2}}{\left ( x^{3}+1\right ) }\right ) ^{2}+\frac {1}{2}\left ( \frac {d}{dx}\left ( \frac {7x^{2}}{\left ( x^{3}+1\right ) }\right ) \right ) -\frac {9x}{\left ( x^{3}+1\right ) }\nonumber \\ & =\frac {1}{4}\left ( \frac {7x^{2}}{\left ( x^{3}+1\right ) }\right ) ^{2}+\frac {1}{2}\left ( \frac {-7x\left ( x^{3}-2\right ) }{\left ( x^{3}+1\right ) ^{2}}\right ) -\frac {9x}{\left ( x^{3}+1\right ) }\nonumber \\ & =\frac {-x\left ( x^{3}+8\right ) }{4\left ( x^{3}+1\right ) ^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=-\frac {x\left ( x^{3}+8\right ) }{4\left ( x^{3}+1\right ) ^{2}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =-x\left ( x^{3}+8\right ) \\ t & =4\left ( x^{3}+1\right ) ^{2} \end {align*}

The free square factorization of \(t\) is \(t=\left [ 1,x^{3}+1\right ] \). Hence\begin {equation} m=2 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this special case we set\begin {align*} t_{1} & =1\\ t_{2} & =x^{3}+1 \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =6-4\\ & =2 \end {align*}

There are three poles each of order 2. Looking at the cases table giving up, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that all three cases are possible. Hence \(L=\left [ 1,2,4,6,12\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =2,t=4\left ( x^{3}+1\right ) ^{2},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 2,2\right ) -6-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 2-6\right ) \\ & =-1\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( 4\left ( x^{3}+1\right ) ^{2}\right ) }{4\left ( x^{3}+1\right ) ^{2}}+3\left ( 0\right ) \right ) \\ & =\frac {3}{2}\frac {x^{2}}{x^{3}+1} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}\). In other words, the number of poles of \(r\) that are of order \(2\).

\[ r=-\frac {x\left ( x^{3}+8\right ) }{4\left ( x^{3}+1\right ) ^{2}}\] These will be the zeros of \(t_{2}\) in the above square free factorization of \(t\). From above we found that \[ t_{2}=x^{3}+1 \] Label these zeros of \(t_{2}\) as \(c_{1},c_{2},\cdots ,c_{k_{2}}\). The zeros of \(t_{2}\) are \(\left \{ -1,\left ( -1\right ) ^{\frac {1}{3}},-\left ( -1\right ) ^{\frac {1}{3}}\right \} =\left \{ -1,\frac {1}{2}-\frac {1}{2}i\sqrt {3},\frac {1}{2}+\frac {1}{2}i\sqrt {3}\right \} \). Therefore \(k_{2}=3\). Hence \[ M=3 \] Now we iterate over each zero \(c_{i}\) times finding \(e_{i}\) and \(\theta _{i}\) from each. These are found to be (following formula in paper) to be \begin {align*} b_{1} & =\frac {7}{36}\\ e_{1} & =\frac {4}{3}\\ b_{2} & =\frac {7}{36}\\ e_{2} & =\frac {4}{3}\\ b_{3} & =\frac {7}{36}\\ e_{3} & =\frac {4}{3} \end {align*}

And\begin {align*} \theta _{1} & =\frac {4}{3\left ( x+1\right ) }\\ \theta _{2} & =\frac {8}{3\left ( i\sqrt {3}+2x-1\right ) }\\ \theta _{3} & =\frac {-8}{3\left ( i\sqrt {3}-2x+1\right ) } \end {align*}

Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots ,M\) if any exist. Since non exist here. This is skipped. Hence \(M\) stays \(3\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). But if \(O\left ( \infty \right ) =2\) then \(\theta _{0}=0\) and \(e_{0}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{x^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). Since in this example \(O\left ( \infty \right ) =2\) then this case applies. \(b=\frac {lcoeff\left ( s\right ) }{lcoeff\left ( t\right ) }\) where \(lcoeff\) gives the leading coefficient. Since \(s=-x\left ( x^{3}+8\right ) =-x^{4}-8x\) then \(lcoeff\left ( s\right ) \) \(=-1\). And since \(t=4\left ( x^{3}+1\right ) ^{2}=4x^{6}+8x^{3}+4\) then \(lcoeff\left ( t\right ) =4\). Therefore \(b=\frac {-1}{4}\) and therefore

\begin {align*} e_{0} & =\sqrt {1+4b}\\ & =0 \end {align*}

Hence now we have\begin {align*} e & =\left \{ 0,\frac {4}{3},\frac {4}{3},\frac {4}{3}\right \} \\ \theta & =\left \{ 0,\frac {4}{3\left ( x+1\right ) },\frac {8}{3\left ( i\sqrt {3}+2x-1\right ) },\frac {-8}{3\left ( i\sqrt {3}-2x+1\right ) }\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=1\). And since we have \(M=3\) then there are \(\left ( n+1\right ) ^{M+1}=2^{4}=16\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2},\frac {-n}{2},\frac {-n}{2}\right \} =\left \{ \frac {-1}{2},\frac {-1}{2},\frac {-1}{2},\frac {-1}{2}\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\nonumber \end {equation} Since \(M=3\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1}-s_{2}e_{2}-s_{3}e_{3} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{M}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-1,\theta _{fixed}=\frac {3}{2}\frac {x^{2}}{x^{3}+1}\) gives\begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {-1}{2}\right ) \left ( 0\right ) -\left ( \frac {-1}{2}\right ) \left ( \frac {4}{3}\right ) -\left ( -\frac {1}{2}\right ) \left ( \frac {4}{3}\right ) -\left ( -\frac {1}{2}\right ) \left ( \frac {4}{3}\right ) \\ & =1 \end {align*}

Since \(d\geq 0\), then we can use it. Using Eq (8) gives (using \(M=3\))\begin {align*} \Theta & =\left ( n\right ) \left ( \theta _{fix}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}+s_{2}\theta _{2}+s_{3}\theta _{3}\\ & =\left ( 1\right ) \left ( \frac {3}{2}\frac {x^{2}}{x^{3}+1}\right ) +\left ( \frac {-1}{2}\right ) \left ( 0\right ) +\left ( \frac {-1}{2}\right ) \left ( \frac {4}{3\left ( x+1\right ) }\right ) +\left ( \frac {-1}{2}\right ) \left ( \frac {8}{3\left ( i\sqrt {3}+2x-1\right ) }\right ) +\left ( \frac {-1}{2}\right ) \left ( \frac {-8}{3\left ( i\sqrt {3}-2x+1\right ) }\right ) \\ & =\left ( \frac {3}{2}\frac {x^{2}}{x^{3}+1}\right ) -\frac {2}{3\left ( x+1\right ) }-\frac {4}{3\left ( i\sqrt {3}+2x-1\right ) }+\frac {4}{3\left ( i\sqrt {3}-2x+1\right ) }\\ & =\frac {2x^{2}}{\left ( x+1\right ) \left ( i\sqrt {3}+2x-1\right ) \left ( i\sqrt {3}-2x+1\right ) }\\ & =\frac {-x^{2}}{2x^{3}+2} \end {align*}

Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(\omega \) if possible.

Step 3

The input to this step is the integer \(d=1\) and \(\Theta =\frac {-x^{2}}{2x^{3}+2}\) found from step 2 and also \(r=-\frac {x\left ( x^{3}+8\right ) }{4\left ( x^{3}+1\right ) ^{2}}\) which comes from \(z^{\prime \prime }=rz\). This step is broken into these parts. First we find the \(p_{-1}\left ( x\right ) \) polynomial. If we are to solve for its coefficients, then next we build the minimal polynomial from the \(p_{i}\left ( x\right ) \) polynomials constructed during finding \(p_{-1}\left ( x\right ) \). The minimal polynomial \(p_{\min }\left ( x\right ) \) will be a function of \(\omega \). Next we solve for \(\omega \) from \(p_{\min }\left ( x\right ) =0\). If this is successful, then we have found \(\omega \) and the first solution to the ode \(y^{\prime \prime }=ry\) is \(e^{\int \omega dx}\,\). Below shows how this is done.

We start by forming a polynomial\begin {align*} p\left ( x\right ) & =x^{d}+a_{d-1}x^{d-1}+\cdots +a_{0}\\ & =x \end {align*}

Since this is case \(n=1\) then\begin {align*} \omega & =\frac {p^{\prime }}{p}+\Theta \\ & =\frac {1}{x}-\frac {x^{2}}{2x^{3}+2}\\ & =\frac {x^{3}+2}{2x\left ( x^{3}+1\right ) } \end {align*}

Before using this, we will verify it is correct. For case 1 the above should satisfy

\[ \omega ^{\prime }+\omega ^{2}=r \] Let us see if this is the case or not.\begin {align*} \frac {d}{dx}\left ( \frac {x^{3}+2}{2x\left ( x^{3}+1\right ) }\right ) +\left ( \frac {x^{3}+2}{2x\left ( x^{3}+1\right ) }\right ) ^{2} & =-\frac {x\left ( x^{3}+8\right ) }{4\left ( x^{3}+1\right ) ^{2}}\\ -\frac {\left ( x^{6}+6x^{3}+2\right ) }{2x^{2}\left ( x^{3}+1\right ) ^{2}}+\frac {\left ( x^{3}+2\right ) ^{2}}{4x^{2}\left ( x^{3}+1\right ) ^{2}} & =-\frac {x\left ( x^{3}+8\right ) }{4\left ( x^{3}+1\right ) ^{2}}\\ -\frac {x\left ( x^{3}+8\right ) }{4\left ( x^{3}+1\right ) ^{2}} & =-\frac {x\left ( x^{3}+8\right ) }{4\left ( x^{3}+1\right ) ^{2}} \end {align*}

Verified. Since solution \(\omega \) is found and verified, then first solution to the ode is \begin {align*} z & =e^{\int \omega dx}\\ & =e^{\int \frac {x^{3}+2}{2x\left ( x^{3}+1\right ) }dx}\\ & =\frac {x}{\sqrt [6]{x^{3}+1}} \end {align*}

Hence first solution to given ODE is\begin {align*} y & =ze^{\frac {-1}{2}\int adx}\\ & =\frac {x}{\sqrt [6]{x^{3}+1}}e^{-\frac {1}{2}\int \frac {7x^{2}}{\left ( x^{3}+1\right ) }dx}\\ & =\frac {x}{\sqrt [6]{x^{3}+1}}\frac {1}{\left ( x^{3}+1\right ) ^{\frac {7}{6}}}\\ & =\frac {x}{\left ( x^{3}+1\right ) ^{\frac {4}{3}}} \end {align*}

4.1.5 Example 5 case one

Solve Bessel ode (from Kovacic original paper) \begin {align} y^{\prime \prime }-\frac {4\left ( m^{2}-x^{2}\right ) -1}{4x^{2}}y & =0\tag {1}\\ y^{\prime \prime }+ay^{\prime }+by & =0\nonumber \end {align}

Hence \begin {align*} a & =0\\ b & =\frac {4\left ( m^{2}-x^{2}\right ) -1}{4x^{2}} \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {4\left ( m^{2}-x^{2}\right ) -1}{4x^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {4\left ( m^{2}-x^{2}\right ) -1}{4x^{2}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =4\left ( m^{2}-x^{2}\right ) -1\\ t & =4x^{2} \end {align*}

The free square factorization of \(t\) is \(t=\left [ 1,x\right ] \). Hence\begin {equation} m=2 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this case we set\begin {align*} t_{1} & =1\\ t_{2} & =x \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =2-2\\ & =0 \end {align*}

There is one pole at \(x=0\) of order 2. Looking at the cases table giving up, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that only case 1,2 are possible. \(L=\left [ 1,2\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =0,t=4x^{2},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 0,2\right ) -2-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 0-2\right ) \\ & =-\frac {1}{2}\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( 4x^{2}\right ) }{4x^{2}}+3\left ( 0\right ) \right ) \\ & =\frac {1}{2x} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}\). In other words, the number of poles of \(r\) that are of order \(2\).

\[ r=\frac {4\left ( m^{2}-x^{2}\right ) -1}{4x^{2}}\] These will be the zeros of \(t_{2}\) in the above square free factorization of \(t\). From above we found that \[ t_{2}=x \] Label these zeros of \(t_{2}\) as \(c_{1},c_{2},\cdots ,c_{k_{2}}\). The zeros of \(t_{2}\) are \(\left \{ 0\right \} \). Therefore \(k_{2}=1\). Hence \[ M=1 \] Now we iterate over each zero \(c_{i}\) times finding \(e_{i}\) and \(\theta _{i}\) from each. These are found to be (following formula in paper) to be \begin {align*} b_{1} & =m^{2}-\frac {1}{4}\\ e_{1} & =\sqrt {1+4b}=\sqrt {1+4\left ( m^{2}-\frac {1}{4}\right ) }=2m\qquad m>0 \end {align*}

Where \(b_{1}\) is the coefficient of \(\frac {1}{\left ( x-c_{1}\right ) ^{2}}\) in the partial fractions decomposition of \(r\) which is \(r=-1+\left ( m^{2}-\frac {1}{4}\right ) \frac {1}{x^{2}}\).  And\[ \theta _{1}=\frac {e_{1}}{x-c_{1}}=\frac {2m}{x}\] Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots ,M\) if any exist. Since non exist here. This is skipped. Hence \(M\) stays \(1\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). But if \(O\left ( \infty \right ) =2\) then \(\theta _{0}=0\) and \(e_{0}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{x^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). Since \(O\left ( \infty \right ) =0\) here then none of these cases applies. For case 1 \(\left ( n=1\right ) \) following the method in the paper we find\begin {align*} e_{0} & =0\\ \theta _{0} & =2i \end {align*}

Hence now we have\begin {align*} e & =\left \{ 0,2m\right \} \\ \theta & =\left \{ 2i,\frac {2m}{x}\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=1\). And since we have \(M=1\) then there are \(\left ( n+1\right ) ^{M+1}=2^{2}=4\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2}\right \} =\left \{ \frac {-1}{2},\frac {-1}{2}\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\nonumber \end {equation} Since \(M=1\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{M}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-\frac {1}{2},\theta _{fixed}=\frac {1}{2x}\) gives\begin {align*} d & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 0\right ) -\left ( \frac {-1}{2}\right ) \left ( 2m\right ) \\ & =m-\frac {1}{2} \end {align*}

We now have to assume something about \(m\) to be to continue otherwise we will not be able to decide if \(d\) is integer and \(d\geq 0\). If we assume that \(m\) is half of all positive odd integers (\(\frac {1}{2},\frac {3}{2},\frac {5}{2},\cdots \)) then \(d\geq 0\). We can also assume that \(m\) is half of all negative odd integers and the other \(s\) set will match. So under the assumption that \(m\) is half of all positive odd integers the above \(d\) can be used for the next step.  To continue, we assume \(m\) takes some specific value to simplify the steps. Let \(m=\frac {3}{2}\) from now on. Hence \(d=1\). Therefore \(e,\theta \) become

\begin {align*} e & =\left \{ 0,3\right \} \\ \theta & =\left \{ 2i,\frac {3}{x}\right \} \end {align*}

Using Eq (8) gives (using \(M=1\))\begin {align*} \Theta & =\left ( n\right ) \left ( \theta _{fix}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}\\ & =\left ( 1\right ) \left ( \frac {1}{2x}\right ) +\left ( \frac {-1}{2}\right ) \left ( 2i\right ) +\left ( \frac {-1}{2}\right ) \left ( \frac {3}{x}\right ) \\ & =-\frac {1}{x}\left ( ix+1\right ) \end {align*}

Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(\omega \) if possible.

Step 3

The input to this step is the integer \(d=1\) and \(\Theta =-\frac {1}{x}\left ( ix+1\right ) \) found from step 2 and also \(r=\frac {4\left ( n^{2}-x^{2}\right ) -1}{4x^{2}}\) which comes from \(z^{\prime \prime }=rz\). This step is broken into these parts. First we find the \(p_{-1}\left ( x\right ) \) polynomial. If we are to solve for its coefficients, then next we build the minimal polynomial from the \(p_{i}\left ( x\right ) \) polynomials constructed during finding \(p_{-1}\left ( x\right ) \). The minimal polynomial \(p_{\min }\left ( x\right ) \) will be a function of \(\omega \). Next we solve for \(\omega \) from \(p_{\min }\left ( x\right ) =0\). If this is successful, then we have found \(\omega \) and the first solution to the ode \(y^{\prime \prime }=ry\) is \(e^{\int \omega dx}\,\). Below shows how this is done.

We start by forming a polynomial \begin {align*} p\left ( x\right ) & =x^{d}+a_{d-1}x^{d-1}+\cdots +a_{0}\\ & =x+a_{0} \end {align*}

The goal is to solve for the \(a_{0}\) coefficient. Now depending on case  number \(n\), we do the following. Since we are in case \(n=1\) then\begin {align*} p_{1} & =-p\\ & =-x-a_{0}\\ p_{0} & =-p_{1}^{\prime }-\Theta p_{1}\\ & =-\left ( -x-a_{0}\right ) ^{\prime }-\left ( -\frac {1}{x}\left ( ix+1\right ) \right ) \left ( -x-a_{0}\right ) \\ & =1-\left ( -\frac {1}{x}\left ( ix+1\right ) \right ) \left ( -x-a_{0}\right ) \\ & =-\frac {1}{x}\left ( ix^{2}+ia_{0}x+a_{0}\right ) \\ p_{-1} & =-p_{0}^{\prime }-\Theta p_{0}-\left ( 1\right ) \left ( 1\right ) rp_{1}\\ & =-\left ( -\frac {1}{x}\left ( ix^{2}+ia_{0}x+a_{0}\right ) \right ) ^{\prime }-\left ( -\frac {1}{x}\left ( ix+1\right ) \right ) \left ( -\frac {1}{x}\left ( ix^{2}+ia_{0}x+a_{0}\right ) \right ) -\frac {4\left ( n^{2}-x^{2}\right ) -1}{4x^{2}}\left ( -x-a_{0}\right ) \\ & =-\frac {2}{x}\left ( ia_{0}-1\right ) \end {align*}

Now we try to solve for \(a_{i}\) using \(p_{-1}\left ( x\right ) =0\). This gives \(a_{0}=-i\).  Hence this implies\[ p\left ( x\right ) =x-i \] Since this is case \(n=1\) then\begin {align*} \omega & =\frac {p^{\prime }}{p}+\Theta \\ & =\frac {\left ( x-i\right ) ^{\prime }}{x-i}-\frac {1}{x}\left ( ix+1\right ) \\ & =\frac {-i\left ( ix-x^{2}+1\right ) }{\left ( -x+i\right ) x}\\ & =-\frac {\left ( ix^{3}+1\right ) }{x^{3}+x} \end {align*}

Before using this, we will verify it is correct. For case 1 the above should satisfy\[ \omega ^{\prime }+\omega ^{2}=r \] Let us see if this is the case or not. \begin {align*} \frac {d}{dx}\left ( \frac {-i\left ( ix-x^{2}+1\right ) }{\left ( -x+i\right ) x}\right ) +\left ( \frac {-i\left ( ix-x^{2}+1\right ) }{\left ( -x+i\right ) x}\right ) ^{2} & =\frac {4\left ( \left ( \frac {3}{2}\right ) ^{2}-x^{2}\right ) -1}{4x^{2}}\\ \frac {\left ( -2ix^{3}+3x^{2}+1\right ) }{x^{2}\left ( x^{2}+1\right ) ^{2}}+\frac {\left ( ix^{2}+x-i\right ) ^{2}}{x^{2}\left ( x-i\right ) ^{2}} & =-\frac {1}{x^{2}}\left ( x^{2}-2\right ) \\ -\frac {1}{x^{2}}\left ( x^{2}-2\right ) & =-\frac {1}{x^{2}}\left ( x^{2}-2\right ) \end {align*}

Verified. Hence \(\omega =\frac {-i\left ( ix-x^{2}+1\right ) }{\left ( -x+i\right ) x}=-\frac {\left ( ix^{3}+1\right ) }{x^{3}+x}\) will give the solution to the ode \(y^{\prime \prime }-\frac {4\left ( m^{2}-x^{2}\right ) -1}{4x^{2}}y=0\) when \(m=\frac {3}{2}\). Since solution \(\omega \) is found and verified, then first solution to the ode is \begin {align*} z & =e^{\int \omega dx}\\ & =e^{\int -\frac {\left ( ix^{3}+1\right ) }{x^{3}+x}dx}\\ & =\frac {1}{x}e^{-ix}\left ( x-i\right ) \end {align*}

Hence first solution to given ODE is\begin {align*} y & =ze^{\frac {-1}{2}\int adx}\\ & =\frac {1}{x}e^{-ix}\left ( x-i\right ) e^{-\frac {1}{2}\int 0dx}\\ & =\frac {1}{x}e^{-ix}\left ( x-i\right ) \end {align*}

One difficulty in implementation of Kovacic algorithm using an ode with a parameter \(m\) like in this Bessel ode example, is that it makes it hard to decide if \(d\geq 0\) or not. So in practice, it is better to use this algorithm for specific values of any parameters that can be involved.

4.1.6 Example 6 case one

Solve \begin {equation} y^{\prime \prime }=\frac {4x^{6}-8x^{5}+12x^{4}+4x^{3}+7x^{2}-20x+4}{4x^{4}}y \tag {1} \end {equation} Hence \begin {align*} a & =0\\ b & =-\frac {4x^{6}-8x^{5}+12x^{4}+4x^{3}+7x^{2}-20x+4}{4x^{4}} \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {4x^{6}-8x^{5}+12x^{4}+4x^{3}+7x^{2}-20x+4}{4x^{4}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {4x^{6}-8x^{5}+12x^{4}+4x^{3}+7x^{2}-20x+4}{4x^{4}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =4x^{6}-8x^{5}+12x^{4}+4x^{3}+7x^{2}-20x+4\\ t & =4x^{4} \end {align*}

The free square factorization of \(t\) is \(t=\left [ 1,1,1,x\right ] \). Hence\begin {equation} m=4 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this case we set\begin {align*} t_{1} & =1\\ t_{2} & =1 \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =4-6\\ & =-2 \end {align*}

There is one pole at \(x=0\) of order 4. Looking at the cases table

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that only case 1 is possible. \(L=\left [ 1\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =0,t=4x^{4},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( -2,2\right ) -4-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( -2-4\right ) \\ & =-\frac {3}{2}\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( 4x^{4}\right ) }{4x^{4}}+3\left ( 0\right ) \right ) \\ & =\frac {1}{x} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}\). In other words, the number of poles of \(r\) that are of order \(2\). Since \(t_{2}=1\) then there are poles. Hence \(k_{2}=0\) and \[ M=0 \] Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots ,M\) if any exist. Here we have pole \(x=0\) of order 4. Following the paper (need to document), we find \(e_{1}=-5,\theta _{1}=\frac {2}{x^{2}}-\frac {5}{x}\). We start from index \(1\) since \(k_{2}=0\) from part (b). Now \(k_{1}=1\). Note that for case 1, we use \(k_{1}\). Hence \[ M=1 \] And now not \(M=0\) (for case 1 only). For other cases, we use \(k_{2}\) for \(M\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). But if \(O\left ( \infty \right ) =2\) then \(\theta _{0}=0\) and \(e_{0}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{x^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). Since \(O\left ( \infty \right ) =0\) here then none of these cases applies. For case 1 \(\left ( n=1\right ) \) following the method in the paper we find (need to document)\begin {align*} e_{0} & =2\\ \theta _{0} & =-2+2x \end {align*}

Hence now we have\begin {align*} e & =\left \{ 2,-5\right \} \\ \theta & =\left \{ -2+2x,\frac {2}{x^{2}}-\frac {5}{x}\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=1\). And since we have \(M=k_{1}=1\) then there are \(\left ( n+1\right ) ^{M+1}=2^{2}=4\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2}\right \} =\left \{ \frac {-1}{2},\frac {-1}{2}\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\nonumber \end {equation} Since \(M=1\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{M}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-\frac {3}{2},\theta _{fixed}=\frac {1}{x}\) gives\begin {align*} d & =\left ( 1\right ) \left ( -\frac {3}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 2\right ) -\left ( \frac {-1}{2}\right ) \left ( -5\right ) \\ & =-5 \end {align*}

Since this is not \(\geq 0\), we go to next set \(s\) \(\left \{ \frac {+1}{2},\frac {+1}{2}\right \} \) and try again\begin {align*} d & =\left ( 1\right ) \left ( -\frac {3}{2}\right ) +\left ( \frac {+1}{2}\right ) \left ( 2\right ) -\left ( \frac {+1}{2}\right ) \left ( -5\right ) \\ & =2 \end {align*}

This works. Using Eq (8) gives (using \(M=1\))\begin {align*} \Theta & =\left ( n\right ) \left ( \theta _{fix}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}\\ & =\left ( 1\right ) \left ( \frac {1}{x}\right ) +\left ( \frac {+1}{2}\right ) \left ( -2+2x\right ) +\left ( \frac {+1}{2}\right ) \left ( \frac {2}{x^{2}}-\frac {5}{x}\right ) \\ & =-\frac {\left ( -2x^{3}+2x^{2}+3x-2\right ) }{2x^{2}}\\ & =x-1-\frac {3}{2x}+\frac {1}{x^{2}} \end {align*}

Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(P\left ( x\right ) \) if possible.

Step 3

The input to this step is the integer \(d=2\) and \(\Theta =x-1-\frac {3}{2x}+\frac {1}{x^{2}}\) found from step 2 and also \(r=\frac {4x^{6}-8x^{5}+12x^{4}+4x^{3}+7x^{2}-20x+4}{4x^{4}}\) which comes from \(z^{\prime \prime }=rz\).  Since degree \(d=2\), then let \(p\left ( x\right ) =x^{2}+ax+b\). Therefore we need to now find \(P\left ( x\right ) \) that solves

\begin {align*} P^{\prime \prime }+2\Theta P^{\prime }+\left ( \Theta ^{\prime }+\Theta ^{2}-r\right ) P & =0\\ 2+2\Theta \left ( 2x+a\right ) +\left ( \Theta ^{\prime }+\Theta ^{2}-r\right ) \left ( x^{2}+ax+b\right ) & =0\\ 2+2\left ( x-1-\frac {3}{2x}+\frac {1}{x^{2}}\right ) \left ( 2x+a\right ) +\left ( \left ( x-1-\frac {3}{2x}+\frac {1}{x^{2}}\right ) ^{\prime }+\left ( x-1-\frac {3}{2x}+\frac {1}{x^{2}}\right ) ^{2}-\frac {4x^{6}-8x^{5}+12x^{4}+4x^{3}+7x^{2}-20x+4}{4x^{4}}\right ) \left ( x^{2}+ax+b\right ) & =0 \end {align*}

Which simplifies to\begin {align*} -\frac {1}{x^{2}}\left ( 2ax^{3}-4x-2ax^{2}-2a+4bx^{2}+3ax-4bx+4x^{2}\right ) & =0\\ -2ax+\frac {4}{x}+2a+2\frac {a}{x^{2}}-4b-3a\frac {1}{x}+4\frac {b}{x}-4 & =0 \end {align*}

Hence by comparing coefficients\[ x\left ( -2a\right ) +\frac {1}{x}\left ( 4-3a+4b\right ) +\frac {1}{x^{2}}\left ( 2a\right ) +\left ( 2a-4b-4\right ) =0 \] Therefore \(a=0\). And \(4-3a+4b=0\) gives \(b=-1\). Same if we used \(2a-4b-4=0\), So consistent equations. Therefore \[ P\left ( x\right ) =x^{2}-1 \] And the solution is\begin {align*} z & =P\left ( x\right ) e^{\int \Theta dx}\\ & =\left ( x^{2}-1\right ) e^{\int x-1-\frac {3}{2x}+\frac {1}{x^{2}}dx}\\ & =\left ( x^{2}-1\right ) x^{-\frac {3}{2}}e^{-\frac {1}{x}+\frac {x^{2}}{2}-x} \end {align*}

Hence first solution to given ODE is\begin {align*} y & =\left ( x^{2}-1\right ) x^{-\frac {3}{2}}e^{-\frac {1}{x}+\frac {x^{2}}{2}-x}e^{\frac {-1}{2}\int adx}\\ & =\left ( x^{2}-1\right ) x^{-\frac {3}{2}}e^{-\frac {1}{x}+\frac {x^{2}}{2}-x}e^{-\frac {1}{2}\int 0dx}\\ & =\left ( x^{2}-1\right ) x^{-\frac {3}{2}}e^{-\frac {1}{x}+\frac {x^{2}}{2}-x} \end {align*}

4.1.7 Example 7 case two

Solve \begin {align} y^{\prime \prime } & =\frac {16x-3}{16x^{2}}y\tag {1}\\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0\nonumber \end {align}

Hence \begin {align*} a & =0\\ b & =-\frac {16x-3}{16x^{2}} \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {16x-3}{16x^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {16x-3}{16x^{2}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =16x-3\\ t & =16x^{2} \end {align*}

The free square factorization of \(t\) is \(t=\left [ 1,x\right ] \). Hence\begin {equation} m=2 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this special case we set\begin {align*} t_{1} & =1\\ t_{2} & =x \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =2-1\\ & =1 \end {align*}

There is pole \(x=0\) of order 2. Looking at the cases table, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that only case 2 is possible (due to \(O\left ( \infty \right ) =1\) which is not allowed other than for case 2). Hence \(L=\left [ 2\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =1,t=16x^{2},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 1,2\right ) -2-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 1-2\right ) \\ & =-\frac {1}{4}\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( 16x^{2}\right ) }{16x^{2}}+3\left ( 0\right ) \right ) \\ & =\frac {1}{2x} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}\). In other words, the number of poles of \(r\) that are of order \(2\).\[ r=\frac {16x-3}{16x^{2}}\] These will be the zeros of \(t_{2}\) in the above square free factorization of \(t\). From above we found that \[ t_{2}=x \] Label these zeros of \(t_{2}\) as \(c_{1},c_{2},\cdots ,c_{k_{2}}\). The zeros of \(t_{2}\) are \(\left \{ 0\right \} \). Therefore \(k_{2}=1\). Hence \[ M=1 \] Now we iterate over each zero \(c_{i}\) times finding \(e_{i}\) and \(\theta _{i}\) from each. These are found to be (following formula in paper) to be \[ e_{1}=\frac {1}{2}\] And\[ \theta _{1}=\frac {1}{2x}\] Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots ,M\) if any exist. Since only case 2 exist in this example. This is skipped. Hence \(M\) stays \(1\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). But if \(O\left ( \infty \right ) =2\) then \(\theta _{0}=0\) and \(e_{0}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{x^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). None of these apply, and this is not case 1. Hence \begin {align*} e_{0} & =0\\ \theta _{0} & =0 \end {align*}

Hence now we have\begin {align*} e & =\left \{ 0,\frac {1}{2}\right \} \\ \theta & =\left \{ 0,\frac {1}{2x}\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=2\).  Since case 2 only applies here. And since we have \(M=1\) then there are \(\left ( n+1\right ) ^{M+1}=3^{2}=9\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2}\right \} =\left \{ -1,-1\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{M}s_{i}e_{i}\nonumber \end {equation} Since \(M=1\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{M}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-\frac {1}{4},\theta _{fixed}=\frac {1}{2x}\) gives\begin {align*} d & =\left ( 2\right ) \left ( -\frac {1}{4}\right ) +\left ( -1\right ) \left ( 0\right ) -\left ( -1\right ) \left ( \frac {1}{2}\right ) \\ & =0 \end {align*}

Since \(d\geq 0\), then we can use it. Using Eq (8) gives (using \(M=1\))\begin {align*} \Theta & =\left ( n\right ) \left ( \theta _{fix}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}\\ & =\left ( 2\right ) \left ( \frac {1}{2x}\right ) +\left ( -1\right ) \left ( 0\right ) +\left ( -1\right ) \left ( \frac {1}{2x}\right ) \\ & =\frac {1}{2x} \end {align*}

Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(P\left ( x\right ) \) if possible.

Step 3

The input to this step is the integer \(d=0\) and \(\Theta =\frac {1}{2x}\) found from step 2 and also \(r=\frac {16x-3}{16x^{2}}\) which comes from \(z^{\prime \prime }=rz\). We need now to find \(P\left ( x\right ) \) of degree \(d=0\) which is a constant such that \[ P^{\prime \prime \prime }+3\Theta P^{\prime \prime }+\left ( 3\Theta ^{2}+3\Theta ^{\prime }-4r\right ) P^{\prime }+\left ( \Theta ^{\prime \prime }+3\Theta \Theta ^{\prime }+\Theta ^{3}-4r\Theta -2r^{\prime }\right ) P=0 \] Since \(P=1\) then above simplifies to\[ \left ( \Theta ^{\prime \prime }+3\Theta \Theta ^{\prime }+\Theta ^{3}-4r\Theta -2r^{\prime }\right ) =0 \] We know \(\Theta \) and \(r\). If this verifies, then we can use \(P=1\). Substituting the above becomes\begin {align*} \left ( \left ( \frac {1}{2x}\right ) ^{\prime \prime }+3\frac {1}{2x}\left ( \frac {1}{2x}\right ) ^{\prime }+\left ( \frac {1}{2x}\right ) ^{3}-4\left ( \frac {16x-3}{16x^{2}}\right ) \left ( \frac {1}{2x}\right ) -2\left ( \frac {16x-3}{16x^{2}}\right ) ^{\prime }\right ) & =0\\ \left ( \frac {d^{2}}{dx^{2}}\left ( \frac {1}{2x}\right ) +3\frac {1}{2x}\frac {d}{dx}\left ( \frac {1}{2x}\right ) +\left ( \frac {1}{2x}\right ) ^{3}-4\left ( \frac {16x-3}{16x^{2}}\right ) \left ( \frac {1}{2x}\right ) -2\frac {d}{dx}\left ( \frac {16x-3}{16x^{2}}\right ) \right ) & =0\\ 0 & =0 \end {align*}

Verified. Hence \[ P\left ( x\right ) =1 \] Let \begin {align*} \phi & =\Theta +\frac {P^{\prime }}{P}\\ & =\frac {1}{2x} \end {align*}

Now we solve for \(\omega \) from \begin {align*} \omega ^{2}-\phi \omega +\left ( \frac {1}{2}\phi ^{\prime }+\frac {1}{2}\phi -r\right ) & =0\\ \omega ^{2}-\frac {1}{2x}\omega +\left ( \frac {1}{2}\left ( \frac {1}{2x}\right ) ^{\prime }+\frac {1}{2}\left ( \frac {1}{2x}\right ) -\frac {16x-3}{16x^{2}}\right ) & =0\\ \omega ^{2}-\frac {1}{2x}\omega +\frac {1}{16x^{2}}-\frac {1}{x} & =0 \end {align*}

The solution \(\ \omega =\frac {1}{4x}\pm \frac {1}{\sqrt {x}}\). We pick either solution. Hence the solution is\begin {align*} z & =e^{\int \omega dx}\\ & =e^{\int \frac {1}{4x}+\frac {1}{\sqrt {x}}dx}\\ & =x^{\frac {1}{4}}e^{2\sqrt {x}} \end {align*}

Hence first solution to given ODE is\begin {align*} y & =ze^{\frac {-1}{2}\int adx}\\ & =x^{\frac {1}{4}}e^{2\sqrt {x}}e^{-\frac {1}{2}\int 0dx}\\ & =x^{\frac {1}{4}}e^{2\sqrt {x}} \end {align*}

4.1.8 Example 8 case two

Solve \begin {align} y^{\prime \prime } & =\frac {1}{x^{3}}y\tag {1}\\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0\nonumber \end {align}

Hence \begin {align*} a & =0\\ b & =-\frac {1}{x^{3}} \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {1}{x^{3}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {1}{x^{3}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =1\\ t & =x^{3} \end {align*}

The free square factorization of \(t\) is \(t=\left [ 1,1,x\right ] \). Hence\begin {equation} m=3 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this special case we set\begin {align*} t_{1} & =1\\ t_{2} & =1 \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =3-0\\ & =3 \end {align*}

There is pole \(x=0\) of order 3. Looking at the cases table, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that only case 2 is possible (since odd pole is only allowed in case 2). Hence \(L=\left [ 2\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =1,t=x^{3},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 3,2\right ) -3-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 2-3\right ) \\ & =-\frac {1}{4}\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( x^{3}\right ) }{x^{3}}+3\left ( 0\right ) \right ) \\ & =\frac {3}{4x} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}\). In other words, the number of poles of \(r\) that are of order \(2\). There are no poles of order 2. Hence \(k_{2}=0\).

Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots \) if any exist. Since only case 2 exist in this example. This is skipped. Hence \(k_{2}\) stays \(0\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). Hence \begin {align*} e_{0} & =1\\ \theta _{0} & =0 \end {align*}

Hence now we have\begin {align*} e & =\left \{ 1\right \} \\ \theta & =\left \{ 0\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=2\).  Since case 2 only applies here. And since we have \(k_{2}=0\) then there are \(\left ( n+1\right ) ^{k_{2}+1}=3\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2}\right \} =\left \{ -1\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{k_{2}}s_{i}e_{i}\nonumber \end {equation} Since \(k_{2}=0\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{k_{2}}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-\frac {1}{4},\theta _{fixed}=\frac {3}{4x}\) gives\begin {align*} d & =\left ( 2\right ) \left ( -\frac {1}{4}\right ) +\left ( -1\right ) \left ( 1\right ) \\ & =-\frac {3}{2} \end {align*}

Since negative then we can not use it. Now we try the next set \(s=\left \{ 0\right \} \). Then Eq(7) gives\begin {align*} d & =\left ( 2\right ) \left ( -\frac {1}{4}\right ) +\left ( 0\right ) \left ( 1\right ) \\ & =-\frac {1}{2} \end {align*}

Since negative then we can not use it. Now we try the last set \(s=\left \{ +1\right \} \). Then Eq(7) gives\begin {align*} d & =\left ( 2\right ) \left ( -\frac {1}{4}\right ) +\left ( +1\right ) \left ( 1\right ) \\ & =\frac {1}{2} \end {align*}

Since not an integer, then we can not use it. We are run out of sets \(s\) to try. Therefore there is no Liouvillian solution.

4.1.9 Example 9 case two

Solve \begin {align} 2x^{2}y^{\prime \prime }-xy^{\prime }+\left ( 1-2x\right ) y & =0\tag {1}\\ y^{\prime \prime }-\frac {1}{2x}y^{\prime }+\frac {\left ( 1-2x\right ) }{2x^{2}}y & =0\qquad x\neq 0\nonumber \\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0\nonumber \end {align}

Hence \begin {align*} a & =-\frac {1}{2x}\\ b & =\frac {\left ( 1-2x\right ) }{2x^{2}} \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {1}{4}\left ( -\frac {1}{2x}\right ) ^{2}+\frac {1}{2}\frac {d}{dx}\left ( -\frac {1}{2x}\right ) -\frac {\left ( 1-2x\right ) }{2x^{2}}\nonumber \\ & =\frac {16x-3}{16x^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {16x-3}{16x^{2}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =16x-3\\ t & =16x^{2} \end {align*}

The free square factorization of \(t\) is \(t=\left [ 1,x\right ] \). Hence\begin {equation} m=2 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this special case we set\begin {align*} t_{1} & =1\\ t_{2} & =x \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =2-1\\ & =1 \end {align*}

There is pole \(x=0\) of order 2. Looking at the cases table, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that only case 2 is possible (\(O\left ( \infty \right ) =1\) is only possible for case 2). Hence \(L=\left [ 2\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =1,t=16x^{2},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 1,2\right ) -2-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 1-2\right ) \\ & =-\frac {1}{4}\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( 16x^{2}\right ) }{16x^{2}}+3\left ( 0\right ) \right ) \\ & =\frac {1}{2x} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}=x\). In other words, the number of poles of \(r\) that are of order \(2\). There is one pole of order \(2.\) Hence \(k_{2}=1\). the coefficient of \(\frac {1}{\left ( x-0\right ) ^{2}}\) in the partial fractions of \(r=\frac {16x-3}{16x^{2}}=\frac {1}{x}-\frac {3}{16}\frac {1}{\left ( x-0\right ) ^{2}}\). Therefore \(b=-\frac {3}{16}\). Hence \(e_{1}=\sqrt {1+4b}=\sqrt {1+4\left ( -\frac {3}{16}\right ) }=\allowbreak \frac {1}{2}\) and \(\theta _{1}=\frac {e_{1}}{x-0}=\frac {1}{2x}\). Hence\begin {align*} e & =\left \{ \frac {1}{2}\right \} \\ \theta & =\left \{ \frac {1}{2x}\right \} \end {align*}

Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots \) if any exist. Since only case 2 exist in this example. This is skipped. Hence \(k_{2}\) stays \(0\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). Since this is not case 1 and since it is not \(O\left ( \infty \right ) >2\) and not \(O\left ( \infty \right ) =2\), then\begin {align*} e_{0} & =0\\ \theta _{0} & =0 \end {align*}

Hence now we have\begin {align*} e & =\left \{ 0,\frac {1}{2}\right \} \\ \theta & =\left \{ 0,\frac {1}{2x}\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=2\).  Since case 2 only applies here. And since we have \(k_{2}=1\) then there are \(\left ( n+1\right ) ^{k_{2}+1}=3^{2}=9\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2}\right \} =\left \{ -1,-1\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{k_{2}}s_{i}e_{i}\nonumber \end {equation} Since \(k_{2}=1\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{k_{2}}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-\frac {1}{4},\theta _{fixed}=\frac {1}{2x}\) gives\begin {align*} d & =\left ( 2\right ) \left ( -\frac {1}{4}\right ) +\left ( -1\right ) \left ( 0\right ) -\left ( -1\right ) \left ( \frac {1}{2}\right ) \\ & =0 \end {align*}

We can use this \(d.\)From Eq (8)\begin {align*} \Theta & =\left ( 2\right ) \left ( \frac {1}{2x}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}\\ & =\left ( 2\right ) \left ( \frac {1}{2x}\right ) +\left ( -1\right ) \left ( 0\right ) +\left ( -1\right ) \frac {1}{2x}\\ & =\frac {1}{2x} \end {align*}

Since this is case 2 (\(n=2\)) then we need to first find \(P\left ( x\right ) \). The degree is \(d=0\). Hence constant. Say \(P=1\). But we need to verify this is valid. Setting up the equation\[ P^{\prime \prime \prime }+3\Theta P^{\prime \prime }+\left ( 3\Theta ^{2}+3\Theta ^{\prime }-4r\right ) P^{\prime }+\left ( \Theta ^{\prime \prime }+3\Theta \Theta ^{\prime }+\Theta ^{3}-4r\Theta -2r^{\prime }\right ) P=0 \] Which simplifies to (since \(P=1\))\[ \Theta ^{\prime \prime }+3\Theta \Theta ^{\prime }+\Theta ^{3}-4r\Theta -2r^{\prime }=0 \] Using \(\Theta =\frac {1}{2x},r=\frac {16x-3}{16x^{2}}\) the above reduces to \[ 0=0 \] Hence \(P\left ( x\right ) =1\) can be used. Now let \begin {align*} \phi & =\Theta +\frac {P^{\prime }}{P}\\ & =\frac {1}{2x} \end {align*}

We now need to solve for \(\omega \) from (notice that original Kovacic paper has \(+\) and not \(-\) after first term in the following equation. The \(+\) is from Smith paper. It seems to have been a typo in original paper as this version gives the correct solution).\begin {align*} \omega ^{2}-\phi \omega +\left ( \frac {1}{2}\phi ^{\prime }+\frac {1}{2}\phi ^{2}-r\right ) & =0\\ \omega ^{2}-\frac {1}{2x}\omega -\frac {1}{8x^{2}}-\frac {1}{16x^{2}}\left ( 16x-3\right ) & =0 \end {align*}

Solving (and picking first root) gives \[ \omega =\frac {1}{4x}\left ( 1+4\sqrt {x}\right ) \] Before using this, we verify it satisfies \(\omega ^{\prime }+\omega ^{2}=r\)\begin {align*} \frac {d}{dx}\left ( \frac {1}{4x}\left ( 1+4\sqrt {x}\right ) \right ) +\left ( \frac {1}{4x}\left ( 1+4\sqrt {x}\right ) \right ) ^{2} & =\frac {16x-3}{16x^{2}}\\ \frac {1}{16x^{2}}\left ( 16x-3\right ) & =\frac {16x-3}{16x^{2}} \end {align*}

Verified OK. Hence solution is \begin {align*} z & =e^{\int \omega dx}\\ & =x^{\frac {1}{4}}e^{2\sqrt {x}} \end {align*}

Hence first solution to given ODE is\begin {align*} y_{1} & =ze^{\frac {-1}{2}\int adx}\\ & =x^{\frac {1}{4}}e^{2\sqrt {x}}e^{-\frac {1}{2}\int -\frac {1}{2x}dx}\\ & =\sqrt {x}e^{2\sqrt {x}} \end {align*}

Second solution \(y_{2}\) can now be find by reduction of order.

4.1.10 Example 10 case two

Solve \begin {align} \left ( x^{2}+2\right ) y^{\prime \prime }+3xy^{\prime }-y & =0\tag {1}\\ y^{\prime \prime }+\frac {3x}{\left ( x^{2}+2\right ) }y^{\prime }-\frac {1}{\left ( x^{2}+2\right ) }y & =0\nonumber \\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0\nonumber \end {align}

Hence \begin {align*} a & =\frac {3x}{\left ( x^{2}+2\right ) }\\ b & =-\frac {1}{\left ( x^{2}+2\right ) } \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {1}{4}\left ( \frac {3x}{\left ( x^{2}+2\right ) }\right ) ^{2}+\frac {1}{2}\frac {d}{dx}\left ( \frac {3x}{\left ( x^{2}+2\right ) }\right ) +\frac {1}{\left ( x^{2}+2\right ) }\nonumber \\ & =\frac {7x^{2}+20}{4\left ( x^{2}+2\right ) ^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {7x^{2}+20}{4\left ( x^{2}+2\right ) ^{2}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =7x^{2}+20\\ t & =4\left ( x^{2}+2\right ) ^{2}=16+16x^{2}+4x^{4} \end {align*}

The free square factorization of \(t\) is \(t=\left [ 1,\left ( x^{2}+2\right ) \right ] \). Hence\begin {equation} m=2 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this special case we set\begin {align*} t_{1} & =1\\ t_{2} & =\left ( x^{2}+2\right ) \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =4-2\\ & =2 \end {align*}

There is pole \(x=\pm i\sqrt {2}\) of order 2. Looking at the cases table, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that all cases are possible. Hence \(L=\left [ 1,2,4,6,12\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =2,t=4\left ( x^{2}+2\right ) ^{2},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 2,2\right ) -4-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 2-4\right ) \\ & =-\frac {1}{2}\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( 4\left ( x^{2}+2\right ) ^{2}\right ) }{4\left ( x^{2}+2\right ) ^{2}}+3\left ( 0\right ) \right ) \\ & =\frac {x}{x^{2}+2} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}=\left ( x^{2}+2\right ) \). In other words, the number of poles of \(r\) that are of order \(2\). There are two poles of order \(2.\) Hence \(k_{2}=2\). These poles at \(x=\pm i\sqrt {2}\). The coefficient of \(\frac {1}{\left ( x-c_{1}\right ) ^{2}}\) where \(c_{1}\) is first pole is \(b_{1}=-\frac {3}{16}\). Hence \(e_{1}=\sqrt {1+4b}=\sqrt {1+4\left ( -\frac {3}{16}\right ) }=\frac {1}{2}\) and \(\theta _{1}=\frac {e_{1}}{x-c_{1}}=\frac {1}{2\left ( x-i\sqrt {2}\right ) }\). The coefficient of \(\frac {1}{\left ( x-c_{2}\right ) ^{2}}\) where \(c_{2}\) is second pole is \(b_{2}=-\frac {3}{16}\). Hence \(e_{2}=\sqrt {1+4b}=\sqrt {1+4\left ( -\frac {3}{16}\right ) }=\frac {1}{2}\) and \(\theta _{2}=\frac {e_{1}}{x-c_{2}}=\frac {1}{2\left ( x+i\sqrt {2}\right ) }\) Hence\begin {align*} e & =\left \{ \frac {1}{2},\frac {1}{2}\right \} \\ \theta & =\left \{ \frac {1}{2\left ( x-i\sqrt {2}\right ) },\frac {1}{2\left ( x+i\sqrt {2}\right ) }\right \} \end {align*}

Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8\) if any exist. Since only order 2 pole exist, then this is skipped. Hence \(k_{2}\) stays \(2\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). Since this is case \(O\left ( \infty \right ) =2\), then \(e_{0}=\sqrt {1+4b}\) where \(b=\frac {lcoeff\left ( s\right ) }{lcoeff\left ( t\right ) }\) where \(\,lcoeff\left ( s\right ) \) is leading coefficient of \(s=7x^{2}+20\) which is \(7\) and \(lcoeff\left ( t\right ) \) is leading coefficient of \(t=16+16x^{2}+4x^{4}\) which is \(4\).  Hence \(b=\frac {7}{4}\). Therefore \begin {align*} e_{0} & =\sqrt {1+4b}=\sqrt {1+4\left ( \frac {7}{4}\right ) }=2\sqrt {2}\\ \theta _{0} & =0 \end {align*}

Hence now we have\begin {align*} e & =\left \{ 2\sqrt {2},\frac {1}{2},\frac {1}{2}\right \} \\ \theta & =\left \{ 0,\frac {1}{2\left ( x-i\sqrt {2}\right ) },\frac {1}{2\left ( x+i\sqrt {2}\right ) }\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=1\). And since we have \(k_{2}=2\) then there are \(\left ( n+1\right ) ^{k_{2}+1}=2^{3}=8\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2},\frac {-n}{2}\right \} =\left \{ \frac {-1}{2},\frac {-1}{2},\frac {-1}{2}\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{k_{2}}s_{i}e_{i}\nonumber \end {equation} Since \(k_{2}=2\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1}-s_{2}e_{2} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{k_{2}}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-\frac {1}{2},\theta _{fixed}=\frac {x}{x^{2}+2}\) gives\begin {align*} d & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 2\sqrt {2}\right ) -\left ( \frac {-1}{2}\right ) \left ( \frac {1}{2}\right ) -\left ( \frac {-1}{2}\right ) \left ( \frac {1}{2}\right ) \\ & =-\sqrt {2} \end {align*}

Since not an integer, we try next set \(s=\left \{ \frac {-1}{2},\frac {-1}{2},\frac {+1}{2}\right \} \) and now Eq (7) gives\begin {align*} d & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( 2\sqrt {2}\right ) -\left ( \frac {-1}{2}\right ) \left ( \frac {1}{2}\right ) -\left ( \frac {+1}{2}\right ) \left ( \frac {1}{2}\right ) \\ & =-\sqrt {2}-\frac {1}{2} \end {align*}

Since not an integer, we try next set \(s=\left \{ \frac {-1}{2},\frac {+1}{2},\frac {-1}{2}\right \} \). If we continue this way we will find that all sets \(s\) will fail to generate a \(d\geq 0\). Hence case one did not work. Now we go to case 2 \(\left ( n=2\right ) \).

Starting with \(n=2\). And since we have \(k_{2}=2\) then there are \(\left ( n+1\right ) ^{k_{2}+1}=3^{3}\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2},\frac {-n}{2}\right \} =\left \{ -1,-1,-1\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{k_{2}}s_{i}e_{i}\nonumber \end {equation} Since \(k_{2}=2\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1}-s_{2}e_{2} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{k_{2}}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-\frac {1}{2},\theta _{fixed}=\frac {x}{x^{2}+2}\) gives\begin {align*} d & =\left ( 2\right ) \left ( -\frac {1}{2}\right ) +\left ( -1\right ) \left ( 2\sqrt {2}\right ) -\left ( -1\right ) \left ( \frac {1}{2}\right ) -\left ( -1\right ) \left ( \frac {1}{2}\right ) \\ & =-2\sqrt {2} \end {align*}

Since not an integer, we try next set \(s=\left \{ -1,-1,+1\right \} \). If we continue this way we will find that set \(s=\left \{ 0,-1,-1\right \} \) works. \begin {align*} d & =\left ( 2\right ) \left ( -\frac {1}{2}\right ) +\left ( 0\right ) \left ( 2\sqrt {2}\right ) -\left ( -1\right ) \left ( \frac {1}{2}\right ) -\left ( -1\right ) \left ( \frac {1}{2}\right ) \\ & =0 \end {align*}

We can use this \(d.\ \)From Eq (8)\begin {align*} \Theta & =\left ( 2\right ) \left ( \frac {1}{2x}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}+s_{2}\theta _{2}\\ & =\left ( 2\right ) \left ( \frac {x}{x^{2}+2}\right ) \left ( 0\right ) \left ( 0\right ) -\left ( -1\right ) \left ( \frac {1}{2\left ( x-i\sqrt {2}\right ) }\right ) -\left ( -1\right ) \left ( \frac {1}{2\left ( x+i\sqrt {2}\right ) }\right ) \\ & =\frac {x}{x^{2}+2} \end {align*}

Since this is case 2 (\(n=2\)) then we need to first find \(P\left ( x\right ) \). The degree is \(d=0\). Hence constant. Say \(P=1\). But we need to verify this is valid. Setting up the equation\[ P^{\prime \prime \prime }+3\Theta P^{\prime \prime }+\left ( 3\Theta ^{2}+3\Theta ^{\prime }-4r\right ) P^{\prime }+\left ( \Theta ^{\prime \prime }+3\Theta \Theta ^{\prime }+\Theta ^{3}-4r\Theta -2r^{\prime }\right ) P=0 \] Which simplifies to (since \(P=1\))\[ \Theta ^{\prime \prime }+3\Theta \Theta ^{\prime }+\Theta ^{3}-4r\Theta -2r^{\prime }=0 \] Using \(\Theta =\frac {x}{x^{2}+2},r=\frac {7x^{2}+20}{4\left ( x^{2}+2\right ) ^{2}}\) the above reduces to \[ 0=0 \] Hence \(P\left ( x\right ) =1\) can be used. Now let \begin {align*} \phi & =\Theta +\frac {P^{\prime }}{P}\\ & =\frac {x}{x^{2}+2} \end {align*}

We now need to solve for \(\omega \) from (notice that original Kovacic paper has \(+\) and not \(-\) after first term in the following equation. The \(+\) is from Smith paper. It seems to have been a typo in original paper as this version gives the correct solution).\begin {align*} \omega ^{2}-\phi \omega +\left ( \frac {1}{2}\phi ^{\prime }+\frac {1}{2}\phi ^{2}-r\right ) & =0\\ \omega ^{2}-\left ( \frac {x}{x^{2}+2}\right ) +\omega \left ( \frac {1}{2}\left ( \frac {x}{x^{2}+2}\right ) ^{\prime }+\frac {1}{2}\left ( \frac {x}{x^{2}+2}\right ) ^{2}-\frac {7x^{2}+20}{4\left ( x^{2}+2\right ) ^{2}}\right ) & =0\\ \frac {4\omega ^{2}x^{4}-4\omega x^{3}+\left ( 16\omega ^{2}-7\right ) x^{2}-8x\omega +16\omega ^{2}-16}{4\left ( x^{2}+2\right ) ^{2}} & =0\\ 4\omega ^{2}x^{4}-4\omega x^{3}+\left ( 16\omega ^{2}-7\right ) x^{2}-8x\omega +16\omega ^{2}-16 & =0 \end {align*}

Solving for \(\omega \) (and picking first root) gives \[ \omega =\frac {x+2\sqrt {2x^{2}+4}}{2\left ( x^{2}+2\right ) }\] Before using this, we verify it satisfies \(\omega ^{\prime }+\omega ^{2}=r\)\begin {align*} \frac {d}{dx}\left ( \frac {x+2\sqrt {2x^{2}+4}}{2\left ( x^{2}+2\right ) }\right ) +\left ( \frac {x+2\sqrt {2x^{2}+4}}{2\left ( x^{2}+2\right ) }\right ) ^{2} & =\frac {7x^{2}+20}{4\left ( x^{2}+2\right ) ^{2}}\\ \frac {7x^{2}+20}{4x^{4}+16x^{2}+16} & =\frac {7x^{2}+20}{4\left ( x^{2}+2\right ) ^{2}} \end {align*}

Verified OK. Hence solution is \begin {align*} z & =e^{\int \omega dx}\\ & =e^{\int \frac {x+2\sqrt {2x^{2}+4}}{2\left ( x^{2}+2\right ) }dx}\\ & =\left ( x^{2}+2\right ) ^{\frac {1}{4}}e^{\sqrt {2}\operatorname {arcsinh}\left ( \frac {\sqrt {2}}{2}x\right ) } \end {align*}

Hence first solution to given ODE is\begin {align*} y_{1} & =ze^{\frac {-1}{2}\int adx}\\ & =\left ( x^{2}+2\right ) ^{\frac {1}{4}}e^{\sqrt {2}\operatorname {arcsinh}\left ( \frac {\sqrt {2}}{2}x\right ) }e^{-\frac {1}{2}\int \frac {3x}{\left ( x^{2}+2\right ) }dx}\\ & =\frac {e^{\sqrt {2}\operatorname {arcsinh}\left ( \frac {\sqrt {2}}{2}x\right ) }}{\sqrt {\left ( x^{2}+2\right ) }} \end {align*}

Second solution \(y_{2}\) can now be find by reduction of order.

4.1.11 Example 11 case one

Solve \begin {align} x^{2}\left ( x^{2}+x+1\right ) y^{\prime \prime }-x\left ( -2x^{2}-4x+1\right ) y^{\prime }+y & =0\tag {1}\\ y^{\prime \prime }-\frac {x\left ( -2x^{2}-4x+1\right ) }{x^{2}\left ( x^{2}+x+1\right ) }y^{\prime }+\frac {1}{x^{2}\left ( x^{2}+x+1\right ) }y & =0\nonumber \\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0\nonumber \end {align}

Hence \begin {align*} a & =-\frac {x\left ( -2x^{2}-4x+1\right ) }{x^{2}\left ( x^{2}+x+1\right ) }\\ b & =\frac {1}{x^{2}\left ( x^{2}+x+1\right ) } \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {1}{4}\left ( -\frac {x\left ( -2x^{2}-4x+1\right ) }{x^{2}\left ( x^{2}+x+1\right ) }\right ) ^{2}+\frac {1}{2}\frac {d}{dx}\left ( -\frac {x\left ( -2x^{2}-4x+1\right ) }{x^{2}\left ( x^{2}+x+1\right ) }\right ) -\frac {1}{x^{2}\left ( x^{2}+x+1\right ) }\nonumber \\ & =\frac {10x^{2}-8x-1}{4x^{2}\left ( x^{2}+x+1\right ) ^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {10x^{2}-8x-1}{4x^{2}\left ( x^{2}+x+1\right ) ^{2}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =10x^{2}-8x-1\\ t & =4x^{2}\left ( x^{2}+x+1\right ) ^{2}\\ & =\left ( x^{3}+x^{2}+x\right ) ^{2} \end {align*}

The free square factorization of \(t\) is \(t=\left [ 1,x^{3}+x^{2}+x\right ] \). Hence\begin {equation} m=2 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this special case we set\begin {align*} t_{1} & =1\\ t_{2} & =x^{3}+x^{2}+x \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =6-2\\ & =4 \end {align*}

There are poles of order 2. Looking at the cases table, reproduced here

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that all cases are possible. Hence \(L=\left [ 1,2,4,6,12\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =2,t=\left ( x^{3}+x^{2}+x\right ) ^{2},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 6,2\right ) -6-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 2-6\right ) \\ & =-1\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( \left ( x^{3}+x^{2}+x\right ) ^{2}\right ) }{\left ( x^{3}+x^{2}+x\right ) ^{2}}+3\left ( 0\right ) \right ) \\ & =\frac {1}{2}\frac {3x^{2}+2x+1}{x^{3}+x^{2}+x} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}=x^{3}+x^{2}+x\). In other words, the number of poles of \(r\) that are of order \(2\). There are three poles of order \(2.\) Hence \(k_{2}=3\). These poles at \(x=\left \{ 0,-\frac {1}{2}\pm \frac {1}{2}i\sqrt {3}\right \} \). The coefficient of \(\frac {1}{\left ( x-c_{1}\right ) ^{2}}\) where \(c_{1}\) is first pole is \(b_{1}=-\frac {1}{4}\). Hence \(e_{1}=\sqrt {1+4b}=\sqrt {1+4\left ( -\frac {1}{4}\right ) }=0\) and \(\theta _{1}=\frac {e_{1}}{x-c_{1}}=0\). The coefficient of \(\frac {1}{\left ( x-c_{2}\right ) ^{2}}\) where \(c_{2}\) is second pole is \(b_{2}=\frac {9i\sqrt {3}+2}{3\left ( -1+i\sqrt {3}\right ) ^{2}}\). Hence \(e_{2}=\sqrt {1+4b}=\frac {\sqrt {3}\sqrt {2+30i\sqrt {3}}}{3\left ( -1+i\sqrt {3}\right ) }\) and \(\theta _{2}=\frac {e_{2}}{x-c_{2}}=\frac {-2\sqrt {3}\sqrt {2+30i\sqrt {3}}}{3\left ( -1+i\sqrt {3}\right ) \left ( i\sqrt {3}-2x-1\right ) }\). The coefficient of \(\frac {1}{\left ( x-c_{3}\right ) ^{2}}\) where \(c_{3}\) is the third pole is \(b_{3}=\frac {-9i\sqrt {3}+2}{3\left ( 1+i\sqrt {3}\right ) ^{2}}\). Hence \(e_{3}=\sqrt {1+4b}=\frac {\sqrt {3}\sqrt {2-30i\sqrt {3}}}{3\left ( 1+i\sqrt {3}\right ) }\) and \(\theta _{3}=\frac {e_{3}}{x-c_{3}}=\frac {2\sqrt {3}\sqrt {2-30i\sqrt {3}}}{3\left ( 1+i\sqrt {3}\right ) \left ( i\sqrt {3}+2x+1\right ) }\). Hence\begin {align*} e & =\left \{ 0,\frac {\sqrt {3}\sqrt {2+30i\sqrt {3}}}{3\left ( -1+i\sqrt {3}\right ) },\frac {\sqrt {3}\sqrt {2-30i\sqrt {3}}}{3\left ( 1+i\sqrt {3}\right ) }\right \} \\ \theta & =\left \{ 0,\frac {-2\sqrt {3}\sqrt {2+30i\sqrt {3}}}{3\left ( -1+i\sqrt {3}\right ) \left ( i\sqrt {3}-2x-1\right ) },\frac {2\sqrt {3}\sqrt {2-30i\sqrt {3}}}{3\left ( 1+i\sqrt {3}\right ) \left ( i\sqrt {3}+2x+1\right ) }\right \} \end {align*}

Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8\) if any exist. Since only order 2 pole exist, then this is skipped. Hence \(k_{2}\) stays \(3\).

Part(d)

Now we need to find \(e_{0},\theta _{0}\). Since this is case \(O\left ( \infty \right ) =4>2\) and since there are no poles or order \(4,6,8,\cdots \) then we do not need to handle case \(n=1\). Instead we use \begin {align*} e_{0} & =1\\ \theta _{0} & =0 \end {align*}

Hence now we have\begin {align*} e & =\left \{ 1,0,\frac {\sqrt {3}\sqrt {2+30i\sqrt {3}}}{3\left ( -1+i\sqrt {3}\right ) },\frac {\sqrt {3}\sqrt {2-30i\sqrt {3}}}{3\left ( 1+i\sqrt {3}\right ) }\right \} \\ \theta & =\left \{ 0,0,\frac {-2\sqrt {3}\sqrt {2+30i\sqrt {3}}}{3\left ( -1+i\sqrt {3}\right ) \left ( i\sqrt {3}-2x-1\right ) },\frac {2\sqrt {3}\sqrt {2-30i\sqrt {3}}}{3\left ( 1+i\sqrt {3}\right ) \left ( i\sqrt {3}+2x+1\right ) }\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=1\). And since we have \(k_{2}=3\) then there are \(\left ( n+1\right ) ^{k_{2}+1}=2^{4}=16\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2},\frac {-n}{2},\frac {-n}{2}\right \} =\left \{ \frac {-1}{2},\frac {-1}{2},\frac {-1}{2},\frac {-1}{2}\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{k_{2}}s_{i}e_{i}\nonumber \end {equation} Since \(k_{2}=3\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1}-s_{2}e_{2}-s_{3}e_{3} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{k_{2}}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-1,\theta _{fixed}=\frac {1}{2}\frac {3x^{2}+2x+1}{x^{3}+x^{2}+x}\) gives\begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {-1}{2}\right ) \left ( +1\right ) -\left ( \frac {-1}{2}\right ) \left ( 0\right ) -\left ( \frac {-1}{2}\right ) \left ( \frac {\sqrt {3}\sqrt {2+30i\sqrt {3}}}{3\left ( -1+i\sqrt {3}\right ) }\right ) -\left ( \frac {-1}{2}\right ) \left ( \frac {\sqrt {3}\sqrt {2-30i\sqrt {3}}}{3\left ( 1+i\sqrt {3}\right ) }\right ) \\ & =-\frac {7}{6}i\sqrt {3}-\frac {3}{2} \end {align*}

Since not an integer, we try next set \(s=\left \{ \frac {-1}{2},\frac {-1}{2},\frac {-1}{2},\frac {+1}{2}\right \} \). If we continue this process we will find that set \(s=\left \{ \frac {1}{2},\frac {-1}{2},\frac {-1}{2},\frac {+1}{2}\right \} \) works and generates\begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {1}{2}\right ) \left ( +1\right ) -\left ( \frac {-1}{2}\right ) \left ( 0\right ) -\left ( \frac {-1}{2}\right ) \left ( \frac {\sqrt {3}\sqrt {2+30i\sqrt {3}}}{3\left ( -1+i\sqrt {3}\right ) }\right ) -\left ( \frac {1}{2}\right ) \left ( \frac {\sqrt {3}\sqrt {2-30i\sqrt {3}}}{3\left ( 1+i\sqrt {3}\right ) }\right ) \\ & =0 \end {align*}

We can use this \(d.\ \)From Eq (8)\begin {align*} \Theta & =\left ( n\right ) \left ( \theta _{fix}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}+s_{2}\theta _{2}+s_{3}\theta _{3}\\ & =\left ( 1\right ) \left ( \frac {1}{2}\frac {3x^{2}+2x+1}{x^{3}+x^{2}+x}\right ) +\left ( \frac {-1}{2}\right ) \left ( 0\right ) +\left ( \frac {-1}{2}\right ) \left ( 0\right ) +\left ( \frac {-1}{2}\right ) \left ( \frac {-2\sqrt {3}\sqrt {2+30i\sqrt {3}}}{3\left ( -1+i\sqrt {3}\right ) \left ( i\sqrt {3}-2x-1\right ) }\right ) +\left ( \frac {1}{2}\right ) \left ( \frac {2\sqrt {3}\sqrt {2-30i\sqrt {3}}}{3\left ( 1+i\sqrt {3}\right ) \left ( i\sqrt {3}+2x+1\right ) }\right ) \\ & =\frac {1}{2x}\frac {2x^{2}-2x+1}{x^{2}+x+1} \end {align*}

Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(P\left ( x\right ) \) if possible.

Step 3

The input to this step is the integer \(d=0\) and \(\Theta =\frac {1}{2x}\frac {2x^{2}-2x+1}{x^{2}+x+1}\) found from step 2 and also \(r=\frac {10x^{2}-8x-1}{4x^{2}\left ( x^{2}+x+1\right ) ^{2}}\). Since degree \(d=0\), then let \(p\left ( x\right ) =1\). A constant. We need to verify\begin {align*} P^{\prime \prime }+2\Theta P^{\prime }+\left ( \Theta ^{\prime }+\Theta ^{2}-r\right ) P & =0\\ \Theta ^{\prime }+\Theta ^{2}-r & =0 \end {align*}

Substituting gives\begin {align*} \frac {d}{dx}\left ( \frac {1}{2x}\frac {2x^{2}-2x+1}{x^{2}+x+1}\right ) +\left ( \frac {1}{2x}\frac {2x^{2}-2x+1}{x^{2}+x+1}\right ) ^{2}-\frac {10x^{2}-8x-1}{4x^{2}\left ( x^{2}+x+1\right ) ^{2}} & =0\\ 0 & =0 \end {align*}

Verified. The solution is\begin {align*} z & =P\left ( x\right ) e^{\int \Theta dx}\\ & =e^{\int \frac {1}{2x}\frac {2x^{2}-2x+1}{x^{2}+x+1}dx}\\ & =\left ( x^{2}+x+1\right ) ^{\frac {1}{4}}\sqrt {x}e^{-\frac {7}{6}\sqrt {3}\arctan \left ( \frac {\left ( 2x+1\right ) \sqrt {3}}{3}\right ) } \end {align*}

Hence first solution to given ODE is\begin {align*} y_{1} & =ze^{\frac {-1}{2}\int adx}\\ & =\left ( x^{2}+x+1\right ) ^{\frac {1}{4}}\sqrt {x}e^{-\frac {7}{6}\sqrt {3}\arctan \left ( \frac {\left ( 2x+1\right ) \sqrt {3}}{3}\right ) }e^{\frac {-1}{2}\int \left ( \frac {1}{x^{2}\left ( x^{2}+x+1\right ) }\right ) dx}\\ & =\frac {xe^{-\frac {7}{3}\sqrt {3}\arctan \left ( \frac {\left ( 2x+1\right ) \sqrt {3}}{3}\right ) }}{\sqrt {x^{2}+x+4}} \end {align*}

Second solution \(y_{2}\) can now be find by reduction of order.

4.1.12 Example 12 case one

Let \[ \left ( x^{2}-2x\right ) y^{\prime \prime }+\left ( 2-x^{2}\right ) y^{\prime }+\left ( 2x-2\right ) y=0 \] Normalizing so that coefficient of \(y^{\prime \prime }\) is one gives\begin {align} y^{\prime \prime }+\frac {\left ( 2-x^{2}\right ) }{\left ( x^{2}-2x\right ) }y^{\prime }+\frac {\left ( 2x-2\right ) }{\left ( x^{2}-2x\right ) }y & =0\nonumber \\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0 \tag {1} \end {align}

Hence \begin {align*} a & =\frac {\left ( 2-x^{2}\right ) }{\left ( x^{2}-2x\right ) }\\ b & =\frac {\left ( 2x-2\right ) }{\left ( x^{2}-2x\right ) } \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {1}{4}\left ( \frac {\left ( 2-x^{2}\right ) }{\left ( x^{2}-2x\right ) }\right ) ^{2}+\frac {1}{2}\frac {d}{dx}\left ( \frac {\left ( 2-x^{2}\right ) }{\left ( x^{2}-2x\right ) }\right ) -\frac {\left ( 2x-2\right ) }{\left ( x^{2}-2x\right ) }\nonumber \\ & =\frac {x^{4}-8x^{3}+24x^{2}-24x+12}{4x^{2}\left ( x-2\right ) ^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {x^{4}-8x^{3}+24x^{2}-24x+12}{4x^{2}\left ( x-2\right ) ^{2}}z \tag {5} \end {equation} Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =x^{4}-8x^{3}+24x^{2}-24x+12\\ t & =4x^{2}\left ( x-2\right ) ^{2} \end {align*}

The square free factorization of \(t\) is \(t=\left [ 1,x\left ( x-2\right ) \right ] \). Hence\begin {equation} m=2 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this case we set\begin {align*} t_{1} & =1\\ t_{2} & =x\left ( x-2\right ) \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =4-4\\ & =0 \end {align*}

There is one pole at \(x=0\) of order 2 and one pole at \(x=2\) also of order \(2\). Looking at the cases table

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that only case 1,2 are possible. \(L=\left [ 1,2\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =0,t=4x^{4},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 0,2\right ) -4-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 0-4\right ) \\ & =-1\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( 4x^{2}\left ( x-2\right ) ^{2}\right ) }{4x^{2}\left ( x-2\right ) ^{2}}+3\left ( 0\right ) \right ) \\ & =\frac {x^{2}-3x+2}{x\left ( x-2\right ) ^{2}}\\ & =\frac {x-1}{x\left ( x-2\right ) } \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}=x\left ( x-2\right ) \). In other words, the number of poles of \(r\) that are of order \(2\). There are two poles. Hence \(k_{2}=2\). These poles \(c_{i}\) where \(i=1,2\) at \(x=\left \{ 0,2\right \} \). For each \(c_{i}\) then \(e_{i}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{\left ( x-c_{i}\right ) ^{2}}\) in the partial fraction expansion of \(r\) and \(\theta _{i}=\frac {e_{i}}{x-c_{i}}\). The partial fraction expansion of \(r\) is\begin {align*} r & =\frac {x^{4}-8x^{3}+24x^{2}-24x+12}{4x^{2}\left ( x-2\right ) ^{2}}\\ & =\frac {1}{4}-\frac {3}{4}\frac {1}{x}-\frac {1}{4}\frac {1}{\left ( x-2\right ) }+\frac {3}{4}\frac {1}{\left ( x-2\right ) ^{2}}+\frac {3}{4}\frac {1}{x^{2}} \end {align*}

The coefficient of \(\frac {1}{\left ( x-0\right ) ^{2}}\) where \(c_{1}=0\) is first pole is \(b_{1}=\frac {3}{4}\) from looking at the above. Hence \(e_{1}=\sqrt {1+4b}=\sqrt {1+4\left ( \frac {3}{4}\right ) }=\allowbreak 2\) and \(\theta _{1}=\frac {e_{1}}{x-c_{1}}=\frac {2}{x}\). The coefficient of \(\frac {1}{\left ( x-c_{2}\right ) ^{2}}\) where \(c_{2}=2\) is second pole is \(b_{2}=\frac {3}{4}\). Hence \(e_{2}=\sqrt {1+4b}=\sqrt {1+4\left ( \frac {3}{4}\right ) }=2\) and \(\theta _{2}=\frac {2}{x-c_{2}}=\frac {2}{x-2}\). Therefore the lists \(e,\theta \) are\begin {align*} e & =\left \{ 2,2\right \} \\ \theta & =\left \{ \frac {2}{x},\frac {2}{x-2}\right \} \end {align*}

Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots ,k\) if any exist. There are none. This step is skipped.

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). But if \(O\left ( \infty \right ) =2\) then \(\theta _{0}=0\) and \(e_{0}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{x^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). Since \(O\left ( \infty \right ) =0\) here then none of these cases applies. For case 1 \(\left ( n=1\right ) \) we first find \(\left [ r\right ] _{\infty }\) the sum of terms \(x^{i}\) for \(i=-\frac {v}{2},\cdots 0\) where \(v\) is the \(O\left ( \infty \right ) \) which is zero here. Hence \[ v=0 \] The following is sum of terms from the Laurent series expansion of \(\sqrt {r}\) at \(x=\infty \) which is \[ \left [ \sqrt {r}\right ] _{\infty }=\frac {1}{2}-\frac {1}{x}+\frac {2}{x^{3}}+\frac {11}{x^{4}}+\cdots \] We want only terms for \(0\leq i\leq v\) but \(v=0\). Therefore only the constant term. Hence\[ \left [ \sqrt {r}\right ] _{\infty }=\frac {1}{2}\] Then \(a\) is the coefficient of \(x^{-\frac {v}{2}}=x^{0}\) or constant term. Hence \[ a=\frac {1}{2}\] And \(b\) is the coefficient of \(x^{\frac {-v}{2}+1}=x\) in \(r-\left ( \left [ \sqrt {r}\right ] _{\infty }\right ) ^{2}\). This comes out to be\[ b=-1 \] Hence\begin {align*} e_{0} & =\frac {b}{a}=-2\\ \theta _{0} & =2\left [ \sqrt {r}\right ] _{\infty }=1 \end {align*}

Hence now we have\begin {align*} e & =\left \{ -2,2,2\right \} \\ \theta & =\left \{ 1,\frac {2}{x},\frac {2}{x-2}\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=1\). And since we have \(k_{2}=2\) then there are \(\left ( n+1\right ) ^{k_{2}+1}=2^{3}=8\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2},\frac {-n}{2}\right \} =\left \{ \frac {-1}{2},\frac {-1}{2},\frac {-1}{2}\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{k_{2}}s_{i}e_{i}\nonumber \end {equation} Since \(k_{2}=2\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1}-s_{2}e_{2} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{k_{2}}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-1,\theta _{fixed}=\frac {x^{2}-3x+2}{x\left ( x-2\right ) ^{2}}\) gives\begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {-1}{2}\right ) \left ( -2\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) \\ & =2 \end {align*}

This will work. Let us find all of the \(d\) so to compare with the solution to same ode using original kovacic algorithm given earlier to see if we get same \(d^{\prime }s\). We try next set \(s=\left \{ \frac {-1}{2},\frac {-1}{2},\frac {-1}{2}\right \} \)\begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {-1}{2}\right ) \left ( -2\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) \\ & =2 \end {align*}

Trying next set \(s=\left \{ \frac {-1}{2},\frac {-1}{2},\frac {+1}{2}\right \} \)\begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {-1}{2}\right ) \left ( -2\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) -\left ( \frac {+1}{2}\right ) \left ( 2\right ) \\ & =0 \end {align*}

Trying next set \(s=\left \{ \frac {-1}{2},\frac {+1}{2},\frac {+1}{2}\right \} \)\begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {-1}{2}\right ) \left ( -2\right ) -\left ( \frac {+1}{2}\right ) \left ( 2\right ) -\left ( \frac {+1}{2}\right ) \left ( 2\right ) \\ & =-2 \end {align*}

Trying next set \(s=\left \{ \frac {+1}{2},\frac {-1}{2},\frac {-1}{2}\right \} \)\begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {+1}{2}\right ) \left ( -2\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) \\ & =0 \end {align*}

Trying next set \(s=\left \{ \frac {+1}{2},\frac {-1}{2},\frac {+1}{2}\right \} \)\begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {+1}{2}\right ) \left ( -2\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) -\left ( \frac {+1}{2}\right ) \left ( 2\right ) \\ & =-2 \end {align*}

Trying the next set \(s=\left \{ \frac {+1}{2},\frac {+1}{2},\frac {-1}{2}\right \} \) \begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {+1}{2}\right ) \left ( -2\right ) -\left ( \frac {+1}{2}\right ) \left ( 2\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) \\ & =-2 \end {align*}

Trying the next set \(s=\left \{ \frac {+1}{2},\frac {+1}{2},\frac {+1}{2}\right \} \) \begin {align*} d & =\left ( 1\right ) \left ( -1\right ) +\left ( \frac {+1}{2}\right ) \left ( -2\right ) -\left ( \frac {+1}{2}\right ) \left ( 2\right ) -\left ( \frac {+1}{2}\right ) \left ( 2\right ) \\ & =-4 \end {align*}

OK, we have all \(d\) values. We now try the ones which are \(d\geq 0\) and these are \(d-0,d=2\). Trying \(d=2\) first which used the set \(s=\left \{ \frac {-1}{2},\frac {-1}{2},\frac {-1}{2}\right \} \) gives \(\left \{ 1,\frac {2}{x},\frac {2}{x-2}\right \} \)\begin {align*} \Theta & =\left ( n\right ) \left ( \theta _{fix}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}+s_{21}\theta _{1}\\ & =\left ( 1\right ) \left ( \frac {x^{2}-3x+2}{x\left ( x-2\right ) ^{2}}\right ) +\left ( \frac {-1}{2}\right ) \left ( 1\right ) +\left ( \frac {-1}{2}\right ) \left ( \frac {2}{x}\right ) +\left ( \frac {-1}{2}\right ) \left ( \frac {2}{x-2}\right ) \\ & =-\frac {1}{2x}\frac {x^{2}-2}{x-2} \end {align*}

Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(P\left ( x\right ) \) if possible.

Step 3

The input to this step is the integer \(d=0\) and \(\Theta =-\frac {1}{2x}\frac {x^{2}-2}{x-2}\) found from step 2 and also \(r=\frac {x^{4}-8x^{3}+24x^{2}-24x+12}{4x^{2}\left ( x-2\right ) ^{2}}\) which comes from \(z^{\prime \prime }=rz\).  Since degree \(d=2\), then let \(p\left ( x\right ) =x^{2}+a_{1}x+a_{2}\). Solving for \(p\left ( x\right ) \) from\[ P^{\prime \prime }+2\Theta P^{\prime }+\left ( \Theta ^{\prime }+\Theta ^{2}-r\right ) P=0 \] gives \(p\left ( x\right ) =x^{2}\) as solution. Hence the solution is\begin {align*} z & =P\left ( x\right ) e^{\int \Theta dx}\\ & =x^{2}e^{\int -\frac {1}{2x}\frac {x^{2}-2}{x-2}dx}\\ & =\frac {x^{\frac {3}{2}}}{\sqrt {x-2}}e^{-\frac {x}{2}} \end {align*}

Hence first solution to given ODE is\begin {align*} y_{1} & =ze^{\frac {-1}{2}\int adx}\\ & =\frac {x^{\frac {3}{2}}}{\sqrt {x-2}}e^{-\frac {x}{2}}e^{\frac {-1}{2}\int \frac {\left ( 2-x^{2}\right ) }{\left ( x^{2}-2x\right ) }dx}\\ & =x^{2} \end {align*}

The second solution can be found by reduction of order.

4.1.13 Example 13 case one

Let \begin {align} y^{\prime \prime }+\frac {x}{1-x}y^{\prime }-\frac {1}{1-x}y & =0\tag {1}\\ y^{\prime \prime }+ay^{\prime }\left ( x\right ) +by & =0\nonumber \end {align}

Hence \begin {align*} a & =\frac {x}{1-x}\\ b & =-\frac {1}{1-x} \end {align*}

It is first transformed to the following ode by eliminating the first derivative \begin {equation} z^{\prime \prime }=rz \tag {2} \end {equation} Using what is known as the Liouville transformation given by\begin {equation} y=ze^{\frac {-1}{2}\int adx} \tag {3} \end {equation} Where it can be found that \(r\) in (2) is given by \begin {align} r & =\frac {1}{4}a^{2}+\frac {1}{2}a^{\prime }-b\nonumber \\ & =\frac {1}{4}\left ( \frac {x}{1-x}\right ) ^{2}+\frac {1}{2}\frac {d}{dx}\left ( \frac {x}{1-x}\right ) -\left ( -\frac {1}{1-x}\right ) \nonumber \\ & =\frac {x^{2}-4x+6}{4\left ( x-1\right ) ^{2}} \tag {4} \end {align}

Hence the DE we will solve using Kovacic algorithm is Eq (2) which is \begin {equation} z^{\prime \prime }=\frac {x^{2}-4x+6}{4\left ( x-1\right ) ^{2}}z \tag {5} \end {equation} Therefore \begin {align} r & =\frac {s}{t}\nonumber \\ & =\frac {x^{2}-4x+6}{4\left ( x-1\right ) ^{2}}\nonumber \end {align}

Step 0 We need to find which case it is. \(r=\frac {s}{t}\) where\begin {align*} s & =x^{2}-4x+6\\ t & =4\left ( x-1\right ) ^{2} \end {align*}

The square free factorization of \(t\) is \(t=\left [ 1,\left ( x-1\right ) \right ] \). Hence\begin {equation} m=2 \tag {6} \end {equation} Since \(m\) is number of elements in the free square factorization. in this case we set\begin {align*} t_{1} & =1\\ t_{2} & =\left ( x-1\right ) \end {align*}

Now \begin {align*} O\left ( \infty \right ) & =\deg \left ( t\right ) -\deg \left ( s\right ) \\ & =2-2\\ & =0 \end {align*}

There is one pole at \(x=1\) of order 2. Looking at the cases table

case allowed pole order for \(r=\frac {s}{t}\) allowed \(O\left ( \infty \right ) \) order \(L\)
1 \(\left \{ 0,1,2,4,6,8,\cdots \right \} \) \(\left \{ \cdots ,-8,-6,-4,-2,0,2,3,4,5,6,7,\cdots \right \} \) \(\left [ 1\right ] \)
2 \(\left \{ 2,3,5,7,9,\cdots \right \} \) no condition \(\left [ 2\right ] \)
3 \(\left \{ 1,2\right \} \) \(\left \{ 2,3,4,5,6,7,\cdots \right \} \) \(\left [ 4,6,12\right ] \)

Shows that only case 1,2 are possible. Hence \(L=\left [ 1,2\right ] \).

Step 1

This step has 4 parts (a,b,c,d).

part (a) Here the fixed parts \(e_{fixed},\theta _{fixed}\) are calculated using \begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( O\left ( \infty \right ) ,2\right ) -\deg \left ( t\right ) -3\deg \left ( t_{1}\right ) \right ) \\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {t^{\prime }}{t}+3\frac {t_{1}^{\prime }}{t_{1}}\right ) \end {align*}

Using \(O\left ( \infty \right ) =0,t=4\left ( x-1\right ) ^{2},t_{1}=1\) the above gives\begin {align*} e_{fixed} & =\frac {1}{4}\left ( \min \left ( 0,2\right ) -2-3\left ( 0\right ) \right ) \\ & =\frac {1}{4}\left ( 0-2\right ) \\ & =-\frac {1}{2}\\ \theta _{fixed} & =\frac {1}{4}\left ( \frac {\frac {d}{dx}\left ( 4\left ( x-1\right ) ^{2}\right ) }{4\left ( x-1\right ) ^{2}}+3\left ( 0\right ) \right ) \\ & =\frac {1}{2x-2} \end {align*}

part (b)

Here the values \(e_{i},\theta _{i}\) are found for \(i=1\cdots k_{2}\) where \(k_{2}\) is the number of roots of \(t_{2}=\left ( x-1\right ) \). In other words, the number of poles of \(r\) that are of order \(2\). There is one pole of order 2. Hence \(k_{2}=1\). For each pole \(c_{i}\) then \(e_{i}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{\left ( x-c_{i}\right ) ^{2}}\) in the partial fraction expansion of \(r\) and \(\theta _{i}=\frac {e_{i}}{x-c_{i}}\). The partial fraction expansion of \(r\) is\[ \frac {x^{2}-4x+6}{4\left ( x-1\right ) ^{2}}=\frac {1}{4}+\frac {3}{4\left ( x-1\right ) ^{2}}-\frac {1}{2}\frac {1}{x-1}\] The coefficient of \(\frac {1}{\left ( x-1\right ) ^{2}}\) is \(b_{1}=\frac {3}{4}\) from looking at the above. Hence \(e_{1}=\sqrt {1+4b}=\sqrt {1+4\left ( \frac {3}{4}\right ) }=\allowbreak 2\) and \(\theta _{1}=\frac {e_{1}}{x-c_{1}}=\frac {\allowbreak 2}{x-1}\).Therefore the lists \(e,\theta \) are\begin {align*} e & =\left \{ 2\right \} \\ \theta & =\left \{ \frac {2}{x-1}\right \} \end {align*}

Part (c)

This part applied only to case 1. It is used to generate \(e_{i},\theta _{i}\) for poles of \(r\) order \(4,6,8,\cdots ,k\) if any exist. There are none. This step is skipped.

Part(d)

Now we need to find \(e_{0},\theta _{0}\). If \(O\left ( \infty \right ) >2\) then \(e_{0}=1,\theta _{0}=0\). But if \(O\left ( \infty \right ) =2\) then \(\theta _{0}=0\) and \(e_{0}=\sqrt {1+4b}\) where \(b\) is the coefficient of \(\frac {1}{x^{2}}\) in the Laurent series expansion of \(r\) at \(\infty \). Since \(O\left ( \infty \right ) =0\) here then none of these cases applies. For case 1 \(\left ( n=1\right ) \) we first find \(\left [ r\right ] _{\infty }\) the sum of terms \(x^{i}\) for \(i=-\frac {v}{2},\cdots 0\) where \(v\) is \(O\left ( \infty \right ) \) which is zero here. Hence \(v=0\). This sum of terms is from the Laurent series expansion of \(\sqrt {r}\) at \(x=\infty \) which is

\[ \left [ \sqrt {r}\right ] _{\infty }=\frac {1}{2}-\frac {1}{2x}+\frac {1}{x^{3}}+\cdots \] We want only terms for \(0\leq i\leq v\) but \(v=0\). Therefore only the constant term. Hence\[ \left [ \sqrt {r}\right ] _{\infty }=\frac {1}{2}\] Then \(a\) is the coefficient of \(x^{-\frac {v}{2}}=x^{0}\) or constant term. Hence \[ a=\frac {1}{2}\] And \(b\) is the coefficient of \(x^{\frac {-v}{2}+1}=x\) in \(r-\left ( \left [ \sqrt {r}\right ] _{\infty }\right ) ^{2}\). This comes out to be \[ b=-\frac {1}{2}\] Therefore\begin {align*} e_{0} & =\frac {b}{a}=\frac {-\frac {1}{2}}{\frac {1}{2}}=-1\\ \theta _{0} & =2\left [ \sqrt {r}\right ] _{\infty }=1 \end {align*}

Hence now we have\begin {align*} e & =\left \{ -1,2\right \} \\ \theta & =\left \{ 1,\frac {2}{x-1}\right \} \end {align*}

The above are arranged such that \(e_{0}\) is the first entry. Same for \(\theta \). This to keep the same notation as in the paper. The above complete step 1, which is to generates the candidate \(e^{\prime }s\) and \(\theta ^{\prime }s\). In step 2, these are used to generate trials \(d\) and \(\theta \) and find from them \(P\left ( x\right ) \) polynomial if possible.

Step 2

In this step, we now have all the \(e_{i},\theta _{i}\) values found above in addition to \(e_{fix},\theta _{fix}\).

Starting with \(n=1\). And since we have \(k_{2}=1\) then there are \(\left ( n+1\right ) ^{k_{2}+1}=2^{2}=4\) sets \(s\) to try. The first set \(s\) is\[ s=\left \{ \frac {-n}{2},\frac {-n}{2}\right \} =\left \{ \frac {-1}{2},\frac {-1}{2}\right \} \] Now we generate trial \(d\) using\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-\sum _{i=1}^{k_{2}}s_{i}e_{i}\nonumber \end {equation} Since \(k_{2}=1\) then the above becomes\begin {equation} d=\left ( n\right ) \left ( e_{fix}\right ) +s_{0}e_{0}-s_{1}e_{1} \tag {7} \end {equation} If \(d\geq 0\) then we go and find a trial \(\Theta \). We need to have both \(d,\Theta \) to go to the next step.  \(\Theta \) is found using\begin {equation} \Theta =\left ( n\right ) \left ( \theta _{fix}\right ) +\sum _{i=0}^{k_{2}}s_{i}\theta _{i} \tag {8} \end {equation} Hence the first trial \(d\) is (using Eq (7)) and recalling that \(e_{fix}=-\frac {1}{2},\theta _{fixed}=\frac {1}{2x-2}\) gives using set \(\left \{ \frac {-1}{2},\frac {-1}{2}\right \} \)\begin {align*} d & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( -1\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) \\ & =1 \end {align*}

This will work. The corresponding \(\Theta \) is from (8)\begin {align*} \Theta & =\left ( 1\right ) \left ( \frac {1}{2x-2}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}\\ & =\frac {1}{2x-2}-\frac {1}{2}\left ( 1\right ) -\frac {1}{2}\frac {2}{x-1}\\ & =-\frac {1}{2}\frac {x}{x-1} \end {align*}

Let us find all of the \(d\) and \(\Theta \) so to compare with the solution to same ode using original kovacic algorithm given earlier to see if we get same \(d^{\prime }s\). We try next set \(s=\left \{ \frac {-1}{2},\frac {+1}{2}\right \} \)\begin {align*} d & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {-1}{2}\right ) \left ( -1\right ) -\left ( \frac {+1}{2}\right ) \left ( 2\right ) \\ & =-1 \end {align*}

We skip this \(d\) since negative. Next is \(s=\left \{ \frac {+1}{2},\frac {-1}{2}\right \} \)\begin {align*} d & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {1}{2}\right ) \left ( -1\right ) -\left ( \frac {-1}{2}\right ) \left ( 2\right ) \\ & =0 \end {align*}

The corresponding \(\Theta \) is from (8) \begin {align*} \Theta & =\left ( 1\right ) \left ( \frac {1}{2x-2}\right ) +s_{0}\theta _{0}+s_{1}\theta _{1}\\ & =\frac {1}{2x-2}+\frac {1}{2}\left ( 1\right ) -\frac {1}{2}\frac {2}{x-1}\\ & =\frac {x-2}{2\left ( x-1\right ) } \end {align*}

The next set is \(\left \{ \frac {+1}{2},\frac {+1}{2}\right \} \)\begin {align*} d & =\left ( 1\right ) \left ( -\frac {1}{2}\right ) +\left ( \frac {1}{2}\right ) \left ( -1\right ) -\left ( \frac {1}{2}\right ) \left ( \allowbreak 2\right ) \\ & =-2 \end {align*}

OK, we have all \(d\) values. We now try the ones which are \(d\geq 0\) and these are \(d=0,d=1\). Let us use \(d=1\) case. Now that we have good trial \(d\) and \(\Theta \), then step 3 is called to generate \(P\left ( x\right ) \) if possible.

Step 3

The input to this step is the integer \(d=1\) and \(\Theta =-\frac {1}{2}\frac {x}{x-1}\) found from step 2 and also \(r=\frac {x^{2}-4x+6}{4\left ( x-1\right ) ^{2}}\) which comes from \(z^{\prime \prime }=rz\).  Since degree \(d=1\), then let \(p\left ( x\right ) =x+a\). Solving for \(p\left ( x\right ) \) from\[ P^{\prime \prime }+2\Theta P^{\prime }+\left ( \Theta ^{\prime }+\Theta ^{2}-r\right ) P=0 \] gives \(p\left ( x\right ) =x\) as solution. Hence the solution is\begin {align*} z & =P\left ( x\right ) e^{\int \Theta dx}\\ & =xe^{\int -\frac {1}{2}\frac {x}{x-1}dx}\\ & =x\frac {e^{-\frac {1}{2}x}}{\sqrt {x-1}} \end {align*}

Hence first solution to given ODE is\begin {align*} y_{1} & =x\frac {e^{-\frac {1}{2}x}}{\sqrt {x-1}}e^{\frac {-1}{2}\int adx}\\ & =x\frac {e^{-\frac {1}{2}x}}{\sqrt {x-1}}e^{\frac {-1}{2}\int \frac {x}{1-x}dx}\\ & =x \end {align*}

The second solution can be found by reduction of order.