In this step the algorithm determines a polynomial \(p(x)=a_0+a_1 x+ a_2 x^2 + \dots + x^d\) of degree \(d\). This is done by solving for the coefficients \(a_i\) from
Where \(\theta \) was found in step \(2\) and \(r\) is from \(z''=rz\). If \(p(x)\) can be found that satisfies (1) then
\(\omega \) is then solved for from
If solution \(\omega \) to (3) can be found, then the solution to \(z''=rz\) is given by
This completes the full algorithm for case two. The general solution to the original ode is now determined as outlined at the end of case one above.