Aug-11-2019, 06:56 AM
Do you really need to, given that you know it should be 1? It might not be exactly 1 due to rounding errors, but it should be pretty close.
In any case, in general, if you have values of a function at some points (e.g. in an array or something), the techniques for finding the integral come under the term "numerical integration". SciPy provides implementations of some of these techniques (see the docs).
In any case, in general, if you have values of a function at some points (e.g. in an array or something), the techniques for finding the integral come under the term "numerical integration". SciPy provides implementations of some of these techniques (see the docs).