Error estimate for integral of interpolated function

Click For Summary
The discussion focuses on estimating the error in a 2D integral derived from interpolated simulation data. The user is comparing an analytical expression with results obtained from a Python script that interpolates simulation outputs on a 101x101 grid and integrates over a specific area. Suggestions include using different interpolation algorithms, running interpolation on a reduced grid, and employing the midpoint method to estimate error. Acknowledgment of the midpoint method as a simple yet effective approach for error estimation is noted. The conversation emphasizes the importance of understanding interpolation error in numerical integration.
maka89
Messages
66
Reaction score
4
Hi,
I have a project at uni where I am making an approximate analytical expression for a parameter and comparing the result with more rigorous simulations. The thing is: the parameter I am comparing is the 2d-integral of the results from the simulations over some area, and the simulation results comes out on a regular grid.

I have made a script in python and my procedure is:

1. Aquire a function by interpolating the output of the simulation ( which is on a 101x101 grid ).
2. Integrate this function over the integration area using an adaptive integration routine.
3. Compare result with the analytical expression.

Now, I would like to find out how much error there is in the integral due to the interpolation. Is there any way to do this?

Will happily clarify or give more info if needed.

Thanks =)
 
Mathematics news on Phys.org
Do you have different interpolation algorithms available?
Can you run the interpolation on a subset (like 51x51, taking every second entry in each dimension)?
Is it possible to run the simulation with more data points (at least once or twice)?

As an upper limit on the error, a simple "add all 101*101 values" should give an approximation that is worse than all interpolations but not completely wrong.
 
I use this python function at the moment(it uses spline interpolation):
http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.interpolate.interp2d.html

Yes, I can run the interpolation on a subset, but can't get new simulations with more points atm.

So basically using the midpoint method and use the difference as an error estimate? Guess that should give some estimate to the error. That was indeed a simple, yet good idea that I hadn't considered. Thanks =)
 
Last edited:
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
5
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K