I need to compute an integral on the real line. The tricky part is that I need to compute this integral from many different starting points.
The integration package Cubature.jl, which I was trying to use, allows to compute on only one interval at a time. The best solution would seem to sort all the points on which I’d want to evaluate f (say x_0,x_1 and so on) and use pquadrature
on every small interval. However this still doesn’t seem very efficient (if I have many points it looks like I’m better off manually approximating g with a piecewise linear function and then computing everything analytically, exploiting the fact that the piecewise approximation has to be computed only once).
I wanted to ask whether there exist a package/some already implemented functionality to improve on my manual solution (I’ve also tried Dierckx, to get a spline that approximates the function and then compute the integral on the spline, but that also doesn’t seem to improve things).