<s>[INST] How integrate $ \iint_{D} (\frac{x^2}{x^2+y^2})dA, \ \ \ \ D: x^2+y^2=a^2 \ \ and \ \ x^2+y^2=b^2, \ \ 0I'm trying to resolve this integral
$$
\iint_{D} (\frac{x^2}{x^2+y^2})dA,  \ \ \  \ D: x^2+y^2=a^2 \ \ and \ \ x^2+y^2=b^2, \ \ 0<a<b
$$
I tried with polar coordinates:
$$
x = r\cos{\theta} \\
y = r\sin{\theta} \\
Jacobian = r
$$
But I'm confused about in how to calculate the domain for each integral
 [/INST] This is just annulus with inner radius $a$ and outer radius $b$, so $a \le r \le b$ and  $0 \le \theta \le 2\pi$. The integral becomes
$$ \int_0^{2\pi} \int_a^b \frac{r^2 \cos^2 \theta}{r^2} r\,dr\,d\theta 
\\= \int_0^{2\pi} \int_a^b r \cos^2 \theta \, dr \, d\theta 
\\= \int_0^{2\pi} \frac{1}{2}(b^2 - a^2) \cos^2 \theta \, d\theta 
\\ = \frac{1}{2}(b^2 - a^2) \int_0^{2\pi} \frac{1 + \cos 2\theta}{2} d\theta 
\\ = \frac{\pi}{2}(b^2 - a^2) $$
</s>