0
$\begingroup$

I have the x and the f(x) for a set of x. I don't know the function, actually. This is sufficient to integrate it?

The x value might span from 1 to no more than 50, usually around 10. While y is always negative and it's peak might pass -100.

What's the simplest approach?

x 0  1  2  3  4  5  6  7  8 9
y 0 -3 -5 -7 -5 -3 -2 -1 -1 0

May I ask the Python code com compute that?

$\endgroup$
  • $\begingroup$ what is $y$ ? You have a set $$\{(x_i,f(x_i)\}$$? $\endgroup$ – Canardini Dec 24 '16 at 1:09
  • $\begingroup$ Between the points $x_{i}$, $f(x)$ is interpolated with whatever method you choose. So you will get an approximation to the integral. $\endgroup$ – Srini Dec 24 '16 at 1:13
  • $\begingroup$ Cross-post with scicomp.stackexchange. $\endgroup$ – Mauro Vanzetto Dec 24 '16 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.