0
$\begingroup$

Assume there is a function f($x_1$,...$x_n$,$Y$) and I seek for the integral following on an area $[0,1]^m$:enter image description here

where $Y_i$ are the parameter I generate randomly for each function. The total number of the functions $n$ is 200 ~ 2000, which means I cannot type directly into Mathematical to calculate the integral value. Is there some way to realize this kind of integral?Approximate value is acceptable. Thank you!!

$\endgroup$
0
$\begingroup$

Does this work?

Integrate[
 Product[f[x1, x2, x3, RandomVariate[UniformDistribution[]]], {j, n}], 
 {x1, 0, 1}, {x2, 0, 1}, {x3, 0, 1}]

Test:

n=6;
f[xx_, yy_, zz_, ww_] := xx + yy + zz + ww;

Integrate[
 Product[f[x1, x2, x3, RandomVariate[UniformDistribution[]]], {j, n}], 
{x1, 0, 1}, {x2, 0, 1}, {x3, 0, 1}]

(*

163.454

*)

$\endgroup$
  • $\begingroup$ Interesting!!! Let me have a try $\endgroup$ – 0o0o0o0 Jan 12 at 20:49
  • $\begingroup$ This can solve half of the question, but then I have the following error during NIntegral: .... has evaluated to non-numerical values for all sampling points in the region with boundaries...... $\endgroup$ – 0o0o0o0 Jan 14 at 0:54

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.