Imagine a parameter space with variable 0<p<1, 0<e1<1/2 and 0<e2<1/2.
There are certain conditions on the parameters in some situations. For example p<e1 or (p)(e1)/((p)(e1)+(1-p)(1-e2))<e1/e2
How can I determine the volume of the parameter space which satisfies these (and other) conditions?
I would like to determine them algebraically, and not via a numerical simulation of plotting points within parameter space. I also do not want to solve any complex equations myself. I simply want a function which gives me the result easily. Does this exist?
Update: The suggestion below works very well in many cases, however, I seem to have hit a problem.
Try to evaluate: NIntegrate[Boole[0<p<1&&0<e1<1/2&&0<e2<1/2&&e1<e2&&0<e3<1/2&&0<(e3-e2 e3-e1 p-e3 p+e1 e3 p+e2 e3 p)/((1-e1-2 e3+e1 e3+e2 e3) (-1+p))<1&&0<(-e1+e1 e3+e2 e3)/(1-e1-2 e3+e1 e3+e2 e3)<1&&40/100<(((e3-e2 e3-e1 p-e3 p+e1 e3 p+e2 e3 p)/((1-e1-2 e3+e1 e3+e2 e3) (-1+p)))(e3+p-2 e3 p)+(1-((e3-e2 e3-e1 p-e3 p+e1 e3 p+e2 e3 p)/((1-e1-2 e3+e1 e3+e2 e3) (-1+p))))(1-e3))],{p,0,1},{e1,0,1/2},{e2,0,1/2},{e3,0,1/2},WorkingPrecision->20]
This gives something like 0.036.
Try now to weaken the condition by lowering 50/100 to 40/100. The results becomes 0....
NIntegrate. What I mean is thatNIntegratedoes actually know whatBooleis and won't sample points outside of that region if avoidable. It doesn't treat it as a numerical black box. – Szabolcs Nov 23 '13 at 19:36Integrate/NIntegratein handling that case. – Michael E2 Nov 23 '13 at 19:48NIntegrate[Boole[0<p<1&&0<e1<1/2&&0<e2<1/2&&e1<e2&&0<e3<1/2&&0<(e3-e2 e3-e1 p-e3 p+e1 e3 p+e2 e3 p)/((1-e1-2 e3+e1 e3+e2 e3) (-1+p))<1&&0<(-e1+e1 e3+e2 e3)/(1-e1-2 e3+e1 e3+e2 e3)<1&&50/100<(((e3-e2 e3-e1 p-e3 p+e1 e3 p+e2 e3 p)/((1-e1-2 e3+e1 e3+e2 e3) (-1+p)))(e3+p-2 e3 p)+(1-((e3-e2 e3-e1 p-e3 p+e1 e3 p+e2 e3 p)/((1-e1-2 e3+e1 e3+e2 e3) (-1+p))))(1-e3))],{p,0,1},{e1,0,1/2},{e2,0,1/2},{e3,0,1/2},WorkingPrecision->20]Try lowering the 50/100 and see what happens... Output is now 0 for a weaker condition...
– LBogaardt Nov 27 '13 at 16:50WorkingPrecisionatMachinePrecision; instead setAccuracyGoal -> 6andPrecisionGoal -> 6or some such lower value. At least if it doesn't work (it doesn't), it should take less time. Second, tryred = Reduce[expr, {p, e1, e2, e3}, Reals]andNIntegrate[red,...]. It works, butReducetakes 90 sec. on my machine. Third, you might tryIntegrate[expr,...] /. Integrate -> NIntegrate. It takes about 48 sec. Of course, sometimes the solution is to increase precision. – Michael E2 Nov 27 '13 at 18:32