trouble in evaluating a double integral using polar coordinates. Here I have:
$$\int _0^a\int _{-\sqrt{4-x^2}}^{\sqrt{4-x^2}}\sqrt{a^2-\left(x^2+y^2\right)}\:\:dydx$$
which can also be expressed as:
$$2\int \:\int \:r\sqrt{a^2-r^2}drdθ$$
over a region which should be bounded by:
$$θ=0\:,\:θ=\frac{\pi }{2}\:,\:r=2\:,\:r=asecθ$$
I tried sketching the region but couldn't still find the intervals of $dr,dθ$
It seems to me that this region should be split to two parts:

$|\theta| \leq \cos^{-1}(\frac {2}{a})$, in this part r goes from 0 to $\frac{a}{\cos \theta}$

The second region(s) are for $\frac{\pi}{2} \geq \theta \geq \cos^{-1}(\frac {2}{a})$
and $-\frac{\pi}{2} \leq \theta \leq -\cos^{-1}(\frac {2}{a})$, for which r goes from 0 to 2.
It seems to me that this region should be split to two parts:

$|\theta| \leq \cos^{-1}(\frac {2}{a})$, in this part r goes from 0 to $\frac{a}{\cos \theta}$

The second region(s) are for $\frac{\pi}{2} \geq \theta \geq \cos^{-1}(\frac {2}{a})$
and $-\frac{\pi}{2} \leq \theta \leq -\cos^{-1}(\frac {2}{a})$, for which r goes from 0 to 2.