Originally Posted by

**putnam120** ok i agree i made a mistake. but i think the range for

should be

this is because if we solve the equation of the cone we have

If I have done this right this time, hit-and-miss Monte-Carlo gives this

integral is ~=1.83 +/- ~0.02 (that's +/- 2 sigma error), or about 6-7%

of the volume of the 3x3x3 circumscribed cube.

Aparently it's gone wrong - I'll have to check the code when I get the chance.

OK now its fixed:

Code:

>
>NN=100000;
>x=(random(NN,3)-0.5)*6;
>
>
>nx=x(:,1)^2+x(:,2)^2+x(:,3)^2;
>mx=3*x(:,1)^2+3*x(:,2)^2-x(:,3)^2;
>
>ll=(nx>1)&&(nx<9)&&(mx<0);ll=sum(ll')/NN*(6^3)
14.6232

Integral ~=14.6+/- ~0.34 (that's +/- 2 sigma error)

RonL