       Re: Area Between Contours in ContourPlot

• To: mathgroup at smc.vnet.net
• Subject: [mg39656] Re: [mg39624] Area Between Contours in ContourPlot
• From: Selwyn Hollis <selwynh at earthlink.net>
• Date: Thu, 27 Feb 2003 00:33:54 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```John,

It may be helpful to think about the example of computing the area of
the "polar rectangle" bounded by

f(x,y) = r^2  <  f(x,y) = R^2,    g(x,y) = m1 <  g(x,y) = m2

where f(x,y) = x^2 + y^2 and g(x,y) = y/x. The region is the image of
the rectangle

G = { (u,v) :   r^2 < u < R^2,   m1 < v < m2 } ,

under the transformation

T(u,v) = ( Sqrt[u] v/Sqrt[1+v^2],  Sqrt[u]/Sqrt[1+v^2])

(Get that by solving u == f(x,y), v == g(x,y), for x and y.)

The area of the region is the integral over G of the absolute value of
the determinant of the Jacobian of T, which here turns out to be
1/(1+v^2).

Integrate[ 1/(2(1+v^2)), {u,r^2,R^2}, {v,m1,m2}]

The result is 1/2 (R^2 - r^2)(ArcTan[m2] - ArcTan[m1]), which coincides
with the usual formula.

More generally, if you want the area of a "patch" defined by

f(x,y) = c1 <  f(x,y) = c2,    g(x,y) = c3 <  g(x,y) = c4,

solve (if possible ) u == f(x,y), v == g(x,y), for x and y, compute the
Jacobian determinant in terms of u and v, then integrate its absolute
value over  c1 < u < c2,   c3 < v < c4. A sometimes convenient
alternative method for getting the Jacobian determinant is to take the
reciprocal of the Jacobian determinant of the inverse transformation
Tinv(x,y) = (f(x,y), g(x,y)), expressed in terms of u and v.

Hope this helps...

----
Selwyn Hollis

On Wednesday, February 26, 2003, at 02:43  AM, John.Hornbuckle at csiro.au
wrote:

> Hi All
>
> I am new to Mathematica and am wondering if someone on the list would
> be
> kind enough to help me out. I have a contourplot of a function and
> wish to
> find the area between certain contours contained within the plot. Is
> there a
> standard function in Mathematica which will do this? If not I would
> appreciate any suggestions on how I should go about doing this with
> Mathematica, I'm using version 4.2.
>
>
> Cheers John
>
> John Hornbuckle
> CSIRO Land and Water
> PMB No. 3, Griffith,
> NSW, 2680
> Australia
>
> Tel. (02) 69601500
> Fax. (02) 69601600
>
>

```

• Prev by Date: Re: Domain of Sin[ArcSin[x]] ?
• Next by Date: RE: Simplification of vector and scalar products
• Previous by thread: Area Between Contours in ContourPlot
• Next by thread: Re: Area Between Contours in ContourPlot