I have to integrate a function f(x,y) for x in [xmin, xmax] and y in [ymin, ymax] but my grid is not uniform (i.e, dx and dy depend on the points). More precisely, I'm using logarithmic grid, but it doesn't matter.
I'm looking for the mathematical formula for this, something like trapezoidal rule but in 2D (surprisingly, I didn't found any).
I tried to follow this formula : https://math.stackexchange.com/questions/2891298/derivation-of-2d-trapezoid-rule (the very first one on the question) but where \Delta x is replaced by x[i+1]-x[i] and so on. The result is weird so I wonder if we can still use this formula on a non-uniform grid.
Thank you
PS : I'm using C++