0
$\begingroup$

How do you use a Monte Carlo method to approximate the area enclosed by the circle.

$\endgroup$
3
$\begingroup$

Literally the Monte Carlo Method:

reg = RegionIntersection[Disk[], Disk[{1, 1}, 2]];
NIntegrate[1, {x, y} \[Element] reg, Method -> "MonteCarlo"]
(*  2.59499  *)
$\endgroup$
1
$\begingroup$
rndPts = Table[RandomReal[{-3, 3}],{10^6},{2}];
9 Length[Select[
    rndPts, #[[1]]^2 + #[[2]]^2 > 
       1 && (#[[1]] - 1)^2 + (#[[2]] - 1)^2 < 4 &]]/Length[rndPts] 

2.51295

enter image description here

$\endgroup$

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