- #1

- 45

- 0

## Main Question or Discussion Point

I've got a Mathematica question which might be quite basic, but I couldn't find much about it in the documentation (possibly because it's so basic) so please bear with me!

I have a set of data, call it x

∫ x(ρ) ρ f(ρ) dρ

from 0 to infinity (although since I don't have x

So I have a functional form for ρ f(ρ), but only have values for x(ρ) at discrete values of ρ. How can I do this integral accurately in Mathematica?

I have a set of data, call it x

_{i}(ρ), which I want to integrate over some distribution function (log-normal in this case) given by f(ρ). In particular I want to compute the integral∫ x(ρ) ρ f(ρ) dρ

from 0 to infinity (although since I don't have x

_{i}(ρ) from 0 to infinity I'd cut the calculation off at some upper and lower bound where f(ρ) becomes negligible).So I have a functional form for ρ f(ρ), but only have values for x(ρ) at discrete values of ρ. How can I do this integral accurately in Mathematica?