How do I calculate the following double integral and evaluate the limits of $\theta$? Let R be a circular disc in $\Bbb R^2$  of a radius $a$ and center $(a,0)$. What is $$\int\int_R\ \frac{1}{x}dxdy$$
Used following equations:
$x^2 + y^2 = r^2\\
x = r \cos(\theta)\\
y = r \sin(\theta)$
The steps I followed :
$(x-a)^2 + (y)^2 = a^2\\
x^2 - 2xa + a^2 + y^2 = a^2\\
r^2 - 2(r\cos(\theta))a = 0 \\
 r = 0 , ~  r = 2a\cos(\theta)$
$$\begin{align*}&= \int _{-\pi/2}^{\pi/2}\int _0^{2a\cos(\theta)}\frac{1}{r\cos(\theta)}~r~dr~d{\theta}\\&
= \int _{-\pi/2}^{\pi/2} \frac{1}{\cos(\theta)}\int_0^{2a\cos(\theta)}dr~d\theta\\&
=\int _{-\pi/2}^{\pi/2} 2a \space d\theta\\&= 2\pi a\end{align*}$$
I understand that for $r = 2a\cos(\theta),\theta$ goes between $0\to\pi/2$ for the upper part of the circle and between $\pi/2\to \pi$ for lower part of circle. As $r = -2a$, for $\theta = \pi $ so we discard $\pi$ and instead go between $0\to-\pi/2$ (For the lower part of the circle). Making the limits $ -\pi/2 \le\theta\le \pi/2$ . Needed a bit more elaboration on choice of $\theta$ and verification on my steps. If you guys could help out.
 A: Your work looks good.  But I don't get why you didn't just take $-\pi/2 \leq \theta \leq \pi/2$ to begin with.  I suppose it works with negative $r$ and angles above $\pi/2$, so you're not wrong, but I guess I just prefer to stick to positive $r$ where possible.
A: This looks fine. However, you could just as easily have $\theta$ range from 0 to $\pi$, since for $\theta\in (\pi/2, \pi)$, the bound $r(\theta) = 2a\cos\theta$ will trace out the lower half of the circle, just using negative $r$ values and $\theta$ values that point in the opposite direction. In fact, technically speaking you could pick any interval of length $\pi$ for $\theta$: $[-\pi/2,\pi/2]$, $[-\pi/4,3\pi/4]$, $[0,\pi]$, $[\pi/2, 3\pi/2]$, and $[11\pi, 12\pi]$ all work—you can quickly observe that all of these intervals for $\theta$ will yield the same result since the integrand for the integral with respect to $\theta$ ends up not depending on $\theta$. If you want to be convinced further, you could also hop onto your online graphing calculator of choice and graph your $r(\theta)$ function for those various intervals to observe that, for each one, you get the same circle.
A: Note that
\begin{eqnarray*}
\int\int_{\begin{subarray}{c}B(0,r_{2})\setminus B(0,r_{1})\\\theta\in(\theta_{1},\theta_{2})\end{subarray}}\frac{1}{x}dxdy
&=&
\int_{\theta_{1}}^{\theta_{2}}\int_{r_{1}}^{r_{2}} \frac{1}{r\cos(\theta)} rdrd\theta\\
&=&    \int_{\theta_{1}}^{\theta_{2}}\int_{r_{1}}^{r_{2}} \frac{1}{\cos(\theta)} drd\theta\\
&=&    \int_{\theta_{1}}^{\theta_{2}}\sec{\theta}d\theta\cdot(r_{2}-r_{1})
\end{eqnarray*}
is a general case for $[r_{1},r_{2}]\times[\theta_{1},\theta_{2}]\subseteq[0,+\infty)\times[0,2\pi)$ (in polars coordinates).
