4.0.3 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}

What is \(s\) in the above? These are sets of all combinations generated based on case number \(n\) and \(m\) values which will be described below. So the above trial \(d\) and \(\Theta \) are generated for each such set \(s\). Each set \(s\) has values \(\left \{ s_{0},s_{1},\cdots s_{m}\right \} \) in it. So \(s_{i}\) above means the \(i^{th}\) element is the current set \(s\). There will be \(\left ( n+1\right ) ^{m+1}\) such different \(s\) sets. For example, case \(1\), means \(n=1\) and if \(m=2\), which means \(t=t_{1}t_{2}^{2}\) then there will be \(2^{3}=8\) sets of \(s\) to try. For each such set, we generate \(d,\Theta \). If one set \(s\) gives a \(d\) which is an integer and positive, then \(\Theta \) is generated and then step 3 is called to calculate \(\omega \). If step 3 is successful then we stop since a solution is found. Hence step 3 takes as input the trial \(d\) and \(\Theta \) and is called repeatedly from step 2 until either solution \(y=e^{\int \omega dx}\) is found or until all sets \(s\) are used. This is done for each case number \(n\) which can be \(1,2,4,6\,\ \)or \(12\). Starting from case 1 to case 3 (recall that case 3 has \(n=4,6,12\,\ \)in it). Of course if any one case manages to find a solution, then the algorithm stops.

Before going to step 3 description, We will show how the sets \(s\) are generated. This depends on value of \(n\) and \(M\). Recall that \(M\) is number of poles of \(r\) of order 2 for case 1 if there are no higher order poles. For example, for \(n=1\) and say \(M=2\) then \(8\) different sets \(s\) are generated. Based on all different permutations of \(\left \{ \pm \frac {n}{2},\pm \frac {n}{2},\cdots ,\pm \frac {n}{2}\right \} \). There are \(M+1\) entries, because entries are indexed from \(0\) to \(M\). Hence for \(M=0\) (which will happen if where are no poles), then there are \(\left ( n+1\right ) ^{1}\) entries. For example for \(n=1\) this means two entries given by \(\left \{ \pm \frac {1}{2}\right \} \) which \(s=\left \{ \frac {1}{2}\right \} \) and \(s=\left \{ -\frac {1}{2}\right \} \) to try

\[ \Lambda =\begin {array} [c]{c}-\frac {1}{2}\\ +\frac {1}{2}\end {array} \]

For \(n=1,M=2\) then there are \(\left ( 1+1\right ) ^{3}=8\) entries. We have all combinations of \(\left \{ \pm \frac {1}{2},\pm \frac {1}{2},\pm \frac {1}{2}\right \} \). This results in the following matrix

\[ \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} \]

But if \(n=1\) and \(M=1\) then there are \(\left ( 1+1\right ) ^{2}=4\) entries. All combinations of\(\left \{ \pm \frac {1}{2},\pm \frac {1}{2}\right \} \) and the matrix is

\[ \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} \]

Each row in the above matrix \(S\) is one set \(s\) to try. To be more clear, in the equation \(\Theta =\left ( n\right ) \left ( e_{fix}\right ) +\sum _{i=0}^{M}s_{i}e_{i}\) the \(s_{i}\) in the equation means the \(i^{th}\) entry in that specific \(s\) set we are using at the moment, which happens to be one row of the matrix \(\Lambda \). For example, if we are trying the second row in \(\Lambda \), then \(s_{0}=-\frac {1}{2},s_{1}=-\frac {1}{2},s_{2}=+\frac {1}{2}\). For the case \(n=1\) and \(M=3\), then \(\left \{ \pm \frac {1}{2},\pm \frac {1}{2},\pm \frac {1}{2},\pm \frac {1}{2}\right \} \). There is \(\left ( 2\right ) ^{4}=16\) different sets \(s~\) (or 16 rows in the matrix \(\Lambda \)). The matrix \(\Lambda \) is

\[ \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}\\ -\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}\\ \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} \]

If it was case 2 which means \(n=2\), then if \(M=2\), then we have all different permutations of \(\,1,-1,0\)  in each entry. This gives \(3^{3}=27\) different sets to try

\[ \Lambda =\begin {bmatrix} -1 & -1 & -1\\ -1 & -1 & 0\\ -1 & -1 & +1\\ -1 & 0 & -1\\ -1 & 0 & 0\\ -1 & 0 & +1\\ \vdots & \vdots & \vdots \\ +1 & +1 & +1 \end {bmatrix} \]

And if \(n=2,M=3\) then this gives \(3^{4}=81\) different sets \(s\)

\[ \Lambda =\begin {bmatrix} -1 & -1 & -1 & -1\\ -1 & -1 & -1 & 0\\ -1 & -1 & -1 & +1\\ -1 & -1 & 0 & -1\\ -1 & -1 & 0 & 0\\ -1 & -1 & 0 & +1\\ \vdots & \vdots & \vdots & \vdots \\ +1 & +1 & +1 & +1 \end {bmatrix} \]

And if \(n=4,M=2\) then this gives \(5^{3}=125\) different sets \(s\)

\[ \Lambda =\begin {bmatrix} -2 & -2 & -2\\ -2 & -2 & -2\\ -2 & -2 & -2\\ -2 & -2 & -2\\ -2 & -2 & -2\\ \vdots & \vdots & \vdots \\ +2 & +2 & +2 \end {bmatrix} \]

And if \(n=4,M=3\) then this gives \(5^{4}=625\) different sets \(s\)

\[ \Lambda =\begin {bmatrix} -2 & -2 & -2 & -2\\ -2 & -2 & -2 & -1\\ -2 & -2 & -2 & 0\\ -2 & -2 & -2 & +1\\ -2 & -2 & -2 & +2\\ \vdots & \vdots & \vdots & \vdots \\ +2 & +2 & +2 & +2 \end {bmatrix} \]

And if \(n=6,M=2\) then this gives \(7^{3}=343\) different sets \(s\)

\[ \Lambda =\begin {bmatrix} -3 & -3 & -3\\ -2 & -2 & -2\\ -2 & -2 & -1\\ -2 & -2 & -0\\ -2 & -2 & +1\\ -2 & -2 & +2\\ -2 & -2 & +3\\ \vdots & \vdots & \vdots \\ +3 & +3 & +3 \end {bmatrix} \]

And if \(n=6,M=3\) then this gives \(7^{4}=2401\) different sets \(s\)

\[ \Lambda =\begin {bmatrix} -3 & -3 & -3 & -3\\ -3 & -3 & -3 & -2\\ -3 & -3 & -3 & -1\\ -3 & -3 & -3 & 0\\ -3 & -3 & -3 & +1\\ -3 & -3 & -3 & +2\\ -3 & -3 & -3 & +3\\ \vdots & \vdots & \vdots & \vdots \\ +3 & +3 & +3 & +3 \end {bmatrix} \]

And if \(n=12,M=2\) then this gives \(13^{3}=2197\) different sets \(s\)

\[ \Lambda =\begin {bmatrix} -12 & -12 & -12\\ -12 & -12 & -11\\ -12 & -12 & -10\\ \vdots & \vdots & \vdots \\ -12 & -12 & +12\\ \vdots & \vdots & \vdots \\ +12 & +12 & +12 \end {bmatrix} \]

And if \(n=12,M=3\) then this gives \(13^{4}=28561\) different sets \(s\)

\[ \Lambda =\begin {bmatrix} -12 & -12 & -12 & -12\\ -12 & -12 & -12 & -11\\ -12 & -12 & -12 & -10\\ \vdots & \vdots & \vdots & \vdots \\ -12 & -12 & -12 & +12\\ \vdots & \vdots & \vdots & \vdots \\ +12 & +12 & +12 & +12 \end {bmatrix} \]

And so on.