mathematical problem

• To: mathgroup at smc.vnet.net
• Subject: [mg33100] mathematical problem
• From: Nikolay Andreev <andreev at mccme.ru>
• Date: Sun, 3 Mar 2002 06:30:20 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Dear Mathgroup!

Two questions on Mathematica 4.1 about one mathematical problem.

I'm interesting to calculate (numerically, with presicion, for
example, 0.001) the measure of points of some bounded region where some
concrete function is positive. For example I have the polynomial of 2
variables x and y (or in polar coordinates r,phi) and want to see the
measure of points of unit disk on the plan centered in origin where this
polynomial is >=0.
How to do this in polar coordinates? in dekart coordinates?
The way i found is to integrate indicate-functuion of this region by
statistical methods:

NIntegrate[r*If[f[r, phi] >= 0, 1, 0], {r, 0, 1}, {phi, 0, 2*Pi},
Method -> MonteCarlo[17], AccuracyGoal -> 2, PrecisionGoal -> 2 ]

I'm to calculate this measure for many times, so I'm interesting in
fast method, but where I could now that the error not biger than 0.001.
f[r,phi] is rather big, it's the sum of many terms.

And the second question - what is the best way to draw this picture - I
want to draw the unit disk colowered in two colours - where the function
is positive and were negative. The only method I found is

DensityPlot[
Which[x^2 + y^2 > 1, -1,
x^2 + y^2 <= 1 && f[Sqrt[x^2 + y^2], ArcTan[x, y]] < 0, 0,
x^2 + y^2 <= 1 && f[Sqrt[x^2 + y^2], ArcTan[x, y]] >= 0, 1], {x, -1,
1}, {y, -1, 1}, PlotPoints -> 1500, Mesh -> False]

But this is rather slow and not beautiful.

Thank you for any ideas!
Nikolay
--
------------------------------------------------
Nikolay N. Andreev
Russia, 117966, GSP-1, Moscow, Gubkina 8.
Steklov Institute of Mathematics
Dep. of Function Theory
E-mail: andreev at mccme.ru