# Accuracy of numerical results

1. Aug 6, 2008

### ninaax

Hi,
does anyone know what sort of methods I could use to test the accuracy of the numerical solution of the integral equation???

Many thanks

2. Aug 6, 2008

### Redbelly98

Staff Emeritus
That's a pretty general question, since you didn't post the specific integral equation you are trying to solve. Here's a general answer: try reducing the step size by a factor of 10, and compare the two answers. Reduce the step size by another factor of 10, and compare that answer to the first two. Repeat the process, and see if the result converges to some value.

At some point, the step size will be so small that round-off errors will significantly alter the answer. At this point, you can stop the process.

3. Aug 6, 2008

### Integral

Staff Emeritus
We need to know what method you are using. Every common method has a know error term associated with it. Tell me the method and I bet I can come up with an expression for the error. Since most methods are based on the truncation of a series expansion, the error is commonly given as the first truncated term.

4. Aug 6, 2008

### rcgldr

You could reduce floating point truncation with an extended precision library, like apfloat or you can reduce floating point truncation errors with a summation routine that adds numbers with the same exponents, or otherwise just stores them into an array indexed by the exponent, where a final call is made to sum up all the stored numbers in exponent order to produce a total sum.

Then as mentioned there's the mathematical limit for error. In the case of integration by rectangles, you could sum up the areas of maximum rectangles, then sum up the areas of minimum rectangles, and subtract to find the error limit (within reason).

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook