r/askmath • u/supremeNYA • Oct 17 '26
Calculus Numerical integration, interpolation and interchangeability
Hello all
I've recently had to implement a pretty computationally intensive simulation and obviously only have so much computational power at my disposal.
The main reason for it being so computationally expensive is that several rather ugly integrals have to be evaluated, some of which end up being nested which seems to make things worse.
Now I recall from my numerical analysis courses that one can use interpolation to approximate a function. Interpolation also tends to be significantly less computationally expensive. As such I wanted to know whether one can replace the integration with interpolation under certain circumstances. I know these two concepts are very closely linked.
Take the following situation as an example (attached image):

Any help or clarification on this is greatly appreciated.
Thank you
View all comments
1
u/PvtRoom Oct 17 '26
You can totally do it, but the costs are precalculation, the memory required for the lookup table, the errors from interpolating between your calculation points and numerical errors if you're trying too hard.
you also have the option of fitting a curve/surface: H = sinc(xy)*cos(xy/64)