Numerov method

The Numerov method can be used to solve differential equations of the kind 

  1. $${{{d^2}} \over {d{x^2}}}y\left( x \right) + f\left( x \right)y\left( x \right) = F\left( x \right)$$

on the segment $\left[a,b\right]$ with boundary condition of different kind, for example 

  1. $$\eqalign{
      & y\left( a \right) = {y_a}  \cr
      & y\left( b \right) = {y_b} \cr} $$

The segment $\left[a,b\right]$ can be divided evenly by N points $x_i$ with step $h = {{\left( {b - a} \right)} \over {\left( {N - 1} \right)}}$.

We can use Taylor expansion for $y\left(x_{i+1}\right)$ around point $x_i$

  1. $$\begin{align}
    y(x_{i+1}) &= y(x_i) +
                 y^{'}(x_i)h +
                 \frac{y^{''}(x_i)}{2!}h^2 +
                 \frac{y^{'''}(x_i)}{3!}h^3 \nonumber\\[6pt]
              &+ \frac{y^{''''}(x_i)}{4!}h^4 +
                 \frac{y^{'''''}(x_i)}{5!}h^5 +
                 \frac{y^{''''''}(x_i)}{6!}h^6 +
         \ldots
    \end{align}$$

and for $y\left(x_{i-1}\right)$ around point $x_i$

  1. $$\begin{align}
    y(x_{i-1}) &= y(x_i) -
                 y^{'}(x_i)h +
                 \frac{y^{''}(x_i)}{2!}h^2 -
                 \frac{y^{'''}(x_i)}{3!}h^3 \nonumber\\[6pt]
              &+ \frac{y^{''''}(x_i)}{4!}h^4 -
                 \frac{y^{'''''}(x_i)}{5!}h^5 +
                 \frac{y^{''''''}(x_i)}{6!}h^6 +
         \ldots
    \end{align}$$

Then using sum of Eqs. (3) and (4) we get

  1. $$y_{i+1} - 2y_i + y_{i-1} = h^2 y_i^{''} + \frac{h^4}{12} y_i^{''''} + {\cal{O}}(h^6)$$

here $y_i = y\left(x_i\right)$.

To calculate $y^{''''}\left(x_i\right) = \left(y^{''}\left(x_i\right)\right)^{''}=\left(F\left(x_i\right)-f\left(x_i\right)y\left(x_i\right) \right)^{''}$ we can use finite differences for second derivative $h^{2} y^{''}\left(x_i\right) = y_{i + 1} - 2y_i + y_{i - 1}$. We get

  1. $$h^2 y_i^{''''} = F_{i+1} - 2F_{i} + F_{i-1} - f_{i+1}y_{i+1} +  2f_{i}y_{i} - f_{i-1}y_{i-1} + {\cal O}(h^4)$$

here $F_i = F\left(x_i\right)$ and $f_i = f\left(x_i\right)$.

Then combine Eqs. (6), (5) and (1) we get the final formula for Numerov method

  1. $$\left( {1 + {{{h^2}} \over {12}}{f_{i + 1}}} \right){y_{i + 1}} - \left( {2 - {{5{h^2}} \over 6}{f_i}} \right){y_i} + \left( {1 + {{{h^2}} \over {12}}{f_{i - 1}}} \right){y_{i - 1}} = {{{h^2}} \over {12}}\left( {{F_{i + 1}} + 10{F_i} + {F_{i - 1}}} \right) + {\cal O}(h^6)$$

for $i=2,...,N-1$, and using boundary condition (2)

  1. $$\eqalign{
      & {y_1} = {y_a}  \cr
      & {y_N} = {y_b} \cr} $$

The set of equations (7) and (8) is the matrix equation

  1. $${\bf{AY}} = {\bf{Z}}$$

where matrix $\bf{A}$ has three nonzero diagonal elements 

$${\bf{A}} = \left( {\matrix{
   {{C_1}} & {{B_1}} & 0 & 0 & {...} & 0  \cr
   {{A_2}} & {{C_2}} & {{B_2}} & 0 & {...} & 0  \cr
   0 & {{A_3}} & {{C_3}} & {{B_3}} & {...} & 0  \cr
   {...} & {...} & {...} & {...} & {...} & {{B_{N - 1}}}  \cr
   0 & 0 & 0 & 0 & {{A_N}} & {{C_N}}  \cr

 } } \right)$$

$${\bf{Y}} = \left( \matrix{
  {y_1} \hfill \cr
  {y_2} \hfill \cr
  ... \hfill \cr
  {y_N} \hfill \cr}  \right)$$

$${\bf{Z}} = \left( \matrix{
  {Z_1} \hfill \cr
  {Z_2} \hfill \cr
  ... \hfill \cr
  {Z_N} \hfill \cr}  \right)$$

here

$$A_i = B_i = \left(1 + {h^2\over{12}}f_i\right)$$

$$C_i = -\left(2-{5h^2\over{6}}f_i\right)$$

$$Z_i = {h^2\over{12}} \left( F_{i+1} + 10F_i + F_{i-1} \right)$$

Idea: Modify this method to divide the segment unevenly using logarithmic scale in order to reduce total number of points for infinite segment $\left[0,+\infty\right)$.