# Double Integral and Assumptions

I'm afraid this is going to be a really stupid question.

Evaluating the following definite integral

Integrate[Sqrt[1 - (x^2 + y^2)], {x, -1, 1}, {y, -1, 1}]


gives

(2/3) (Pi - I (-2 + Log[4]))


I don't want the imaginary part. Adding the option

Assumptions -> x^2 + y^2 <= 1


doesn't work. What did I miss?

-
You try to integrate Sqrt[1 - (x^2 + y^2)] over the region where the integrand becomes imaginary (for {x,y} outside the unit circle}), namely you're integrating over a square (-1,1) x (-1,1). – Artes Jun 12 '13 at 13:07

Good:

Integrate[Sqrt[1 - (x^2 + y^2)] Boole[x^2 + y^2 <= 1], {x, -1, 1}, {y, -1, 1}]


Better:

Integrate[r Sqrt[1 - r^2], {r, 0, 1}, {θ, -π, π}]


Vastly better:

2 π Integrate[r Sqrt[1 - r^2], {r, 0, 1}]


Exercise: why?

-
Because in the polar coordinates the area outside the integration region is automatically avoided? – Taiki Jun 12 '13 at 13:17
Good show. You're right, @Taiki. :) – J. M. Jun 12 '13 at 13:18