How to integrate over a constrained domain
- To: mathgroup at smc.vnet.net
- Subject: [mg34203] How to integrate over a constrained domain
- From: "Maciej Sobczak" <maciej at maciejsobczak.com>
- Date: Thu, 9 May 2002 05:16:08 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi, Let's say I have a set on a (x,y) plane given by: x^2 + y^2 < r^2 and I want to compute its area. Yes, I know its Pi*r^2, but I want Mathematica tell me. As a generalization, I want to integrate over a domain given by one or more inequalities. The problem above can be solved like this: Integrate[1, {x, -r, r}, {y, -Sqrt[r^2-x^2], Sqrt[r^2-x^2]}] Simplify[%, {r>0}] which gives Pi r^2 That's nice, but requires solving the inequality for y, which is not always viable. It would be nice to have syntax like: Integrate[1, {x, y}, {x^2 + y^2 < r^2}] but it does not work (of course). How can I achieve what I want? Cheers, -- Maciej Sobczak http://www.maciejsobczak.com/