Estimate order of convergence given error table

3.1k Views Asked by At

I looked through some other posts and didn't quite understand what was going on...

Given a numerical method of calculating the solution to, say, a DE, we typically get an error table. The errors are normally dependent on the step size, which we can pretend is $10^{-k}$. For example, observe the following table.

           k    Error  
           2  9.60e+00
           3  7.78e-01 
           4  7.70e-02
           5  7.71e-03 
           6  7.71e-04 

How am I supposed to estimate the order of convergence of our method given these errors?

I imagine that we look at the ratio of the errors and see if they approximate a polynomial of order $p$?

For example, in this case I can see that the powers are decreasing by 1 each time, so that implies linear convergence, right? How should I go about showing this?

1

There are 1 best solutions below

0
On

Assuming $h = 10^{-k}$. If we're using a method with order $p$ its error is given by $\epsilon = C(h)h^p$ with $C$ being some unknown coefficient varying slowly with respect to $h$. Assuming $C$ remains constant for two successive values of $h$ one can write $$ \frac{\varepsilon_1}{\varepsilon_2} = \frac{h_1^p}{h_2^p} = \left(\frac{h_1}{h_2}\right)^p. $$ So $$p = \frac{\log \epsilon_1 - \log \epsilon_2}{\log h_1 - \log h_2} = \frac{\lg \epsilon_1 - \lg \epsilon_2}{k_2 - k_1}.$$

In the case when you have a table you need to fit your data with $\epsilon = Ch^p$ law and determine $p$ from that fit. The simplest way is to plot $\log \epsilon$ vs $\log h$ and fit it with a line using least-squares. That will give $$ p = \frac{\overline{\log \epsilon \log h} - \overline{\log \epsilon} \;\overline{\log h}}{\overline{\log^2 h} - \overline{\log h}^2}. $$