Find $\iint_D (1+xy)\,dA$ where $D=\{(x,y):1\leq x^2 +y^2\leq 2, y\geq0\}$ Let $D=\{(x,y):1\leq x^2 +y^2\leq 2, y\geq0\}$. Solve $\iint_D (1+xy)\,dA$.
I thought about bounding $x\in [-2,-1]\cup[1,2]$ and $\sqrt{1-x^2}\leq y\leq\sqrt{2-x^2}$ and then solve the double integral. Btw, before doing this, I checked wolfram alpha and it gives me a complex number. According to my book, the result is $\frac{\pi}{2}$.
Is my integral well-written?
 A: In the region $D$, $x$ can range anywhere from $-\sqrt{2} \;\;$ to $+\sqrt{2} \;\;.$ This means that the bounds for $x$ should reflect this. If we then restrict $y$ as you suggest then our integral becomes
$$\int_{-\sqrt{2}}^\sqrt{2}\int_{\sqrt{1-x^2}}^{\sqrt{2-x^2}} (1 + xy)\; dydx = \frac{\pi}{2} + bi\tag{1}$$ for some $b$ that I don't want to derive. The fact that $b\neq0$ is a problem that suggests that the setup is incorrect. Think carefully about what were asking this integral to do. We are trying to plug a value $x\in (-\sqrt{2}, \sqrt{2})$ in to the region between a half circle of radius 1 and its concentric half circle of radius 2. As we get close to the inner circle for $|x|\gt 1 $ we run into complex numbers that don't belong in our "area" integral! This means we should break up the integral in a way that won't go out of the real, natural domain of the square root function. Consider what would happen if you integrated over the larger half circle and subtracted the integral over the smaller half circle. Observe that this idea gives
$$\int_{-\sqrt{2}}^\sqrt{2}\int_{0}^{\sqrt{2-x^2}} (1 + xy)\; dydx - \int_{-1}^1\int_{0}^{\sqrt{1-x^2}} (1 + xy)\; dydx \tag{2}$$
which is not quite equivalent $\textbf{(1)}.$ Intuition says however that this should be the right thing to do and in fact upon evaluation $\textbf{(2)}$ yields a result of $\frac{\pi}{2}$.
