I have a list, p, obtained by a complex numerical procedure. Its element has the structure: {k,fi,z}. Below I give a simplified version of this list containing 36 elements. Here the step of k is 1 and the step of fi is 2Pi/5. In real calculation, the steps will be much smaller, and the list - much larger. So, here is an example:
p= {{0., 0., 0.}, {0., 1.25664, 0.}, {0., 2.51327, 0.}, {0., 3.76991,0.}, {0., 5.02655, 0.}, {0., 6.28319, 0.}, {1., 0., 58.927}, {1.,
1.25664, 1.02628}, {1., 2.51327, 28.3293}, {1., 3.76991,
28.3293}, {1., 5.02655, 1.02628}, {1., 6.28319, 58.927}, {2., 0.,
3.06756}, {2., 1.25664, 0.134298}, {2., 2.51327, 1.63558}, {2.,
3.76991, 1.63558}, {2., 5.02655, 0.134298}, {2., 6.28319,
3.06756}, {3., 0., 0.579411}, {3., 1.25664, 0.0616836}, {3.,
2.51327, 0.355197}, {3., 3.76991, 0.355197}, {3., 5.02655,
0.0616836}, {3., 6.28319, 0.579411}, {4., 0., 0.194156}, {4.,
1.25664, 0.0308556}, {4., 2.51327, 0.130682}, {4., 3.76991,
0.130682}, {4., 5.02655, 0.0308556}, {4., 6.28319, 0.194156}, {5.,
0., 0.0879579}, {5., 1.25664, 0.0171569}, {5., 2.51327,
0.0618171}, {5., 3.76991, 0.0618171}, {5., 5.02655, 0.0171569}, {5.,
6.28319, 0.0879579}};
I need to integrate the function z=z(k,fi) over its arguments: from 0 to infinity over k and from 0 to 2Pi over fi.
What I have done so far is the following:
f = Interpolation[p, InterpolationOrder -> 3];
int = NIntegrate[
f[k, fi], {fi, 0, 2 \[Pi]}, {k, 0, 5},
Method -> {"EvenOddSubdivision", Method -> "LocalAdaptive"},
PrecisionGoal -> 6]
This approach works. My question is if there is a better one.
My question: Is there a built-in or workaround method in Mma, so I can make this numerical integration without passing to the interpolation function?
In other words, is there a method that enables one to integrate the list p directly without further intermediate actions numerically?


Interpolation[]to get the result? Or are you asking about one of the methods,Integrate[]or"InterpolationPointsSubdivision"or some other? For the first question, I'd say it was easiest to useInterpolation[], except maybe for a trapezoidal rule (weighted average of function values). But for the trapezoidal, you'd have to identify the edge and corner nodes of the domain, so there would still be some programming to do thatInterpolation[]does for you. – Michael E2 Jul 13 '23 at 18:28Integrate[]approach usingDerivative[]instead; in your case, it would be something likeprim = Derivative[-1, -1]@f; prim[5, 2 Pi]. – Michael E2 Jul 13 '23 at 18:29Interpolationbut make assumptions aboutp. – Michael E2 Jul 14 '23 at 05:42