Euler Backward method order of accuracy

37 Views Asked by At

I solved a question with Euler's backward method with 4 different step lengths. Then I calculated the error and drew a graph using loglog. Now the task is to find the order of accuracy using the graph. And I have this formula e = ch^p. p is the order of accuracy, h is step length and c is the related to computer capacity or something like that anyways. I have $x =0.08$ y = $0.000603157$ as you can see in the picture. Then I did: $p = \frac{\ln(e)}{\ln(ch)} = 0.0075394625$. And last I checked the order of accuracy should be 1 for Eulers backward method. Any idea what is wrong?

enter image description here

1

There are 1 best solutions below

4
On

The line is straight, one can't see kinks at the 2 middle points. On the horizontal axis the step size varies by a factor of 8, on the vertical the error has a factor of 12 from bottom to top. This gives a slope of $p=\ln(12)/\ln(8)= 1.195$. This is closer to the true order 1, but still far enough away to suspect deviations from the theoretical method in the implementation. So one would need the code for further discussion.

Note that it is $$ \log e(h)=\log c+p\log h $$ an inhomogeneous linear equation. Your formulas make it for some reason homogeneous.