Change in order of integration (Polar coordinates) How does one change the order of integration in polar coordinates?
For example: Change the order of integration of following integral $$\int_0^{\frac{\pi}{2}}\int_0^{2a \cos \theta} f(r,\theta) \,dr\, d\theta$$
I know how to change the order of integration when we are working in rectangular coordinates, but I am unable to visualize this.
I was looking for some books/articles or some explanatory things to visualize this. Thanks in advance.
Edit
Changing the order of double integrals in polar coordinates.
I found one similar question here but I didn't get the idea. It would be good if somebody can explain that to me.
 A: Firstly, it helps to analyze the region suggested by $0\le\theta\le\pi/2$ and $0\le r\le2a\cos\theta$. Let's focus on the boundary $r=2a\cos\theta$ and do some algebra: $r=2a\cos\theta=2a\left(x/r\right)$, so $r^{2}=2ax$. Thus, $x^{2}-2ax+y^{2}=0$. Completing the square, we have $\left(x-a\right)^{2}-a^{2}+y^{2}=0$, so that $\left(x-a\right)^{2}+y^{2}=a^{2}$. This is the circle of radius $\sqrt{a^{2}}=\left|a\right|$ centered at $\left(a,0\right)$.
Now we need to understand which portion of this circle we get with $0\le\theta\le\pi/2$. To simplify things, I'm going to assume $a>0$. At $\theta=0$, $r$ goes from $0$ to $2a$, so we get the entire diameter on the $x$-axis. At $\theta=\pi/4$, $\cos\theta=\sqrt{2}/2$, and $r=2a\cos\theta=a\sqrt{2}$; this is the point $\left(x,y\right)=\left(a,a\right)$. And as $\theta$ increases towards $\pi/2$, $r=2a\cos\theta$ continues to decrease towards $0$. $r$ never becomes negative, so this is entirely in the first quadrant, and must be the upper semi-circle, like $\smallfrown$.
Now, if we wanted to change the order of this integration, we would need something like $\int_{r_{1}}^{r_{2}}\int_{\theta_{1}\left(r\right)}^{\theta_{2}\left(r\right)}f\left(r,\theta\right)\,\mathrm{d}\theta\,\mathrm{d}r$. So what are the absolute bounds for $r$? $2a\cos\theta$ is maximized for $0\le\theta\le\pi/2$ when $\theta=0$, so the most $r$ can be is $2a$. The least it can be is $0$, just as in the original iterated integral. So we have $\int_{0}^{2a}\int_{\theta_{1}\left(r\right)}^{\theta_{2}\left(r\right)}f\left(r,\theta\right)\,\mathrm{d}\theta\,\mathrm{d}r$.
Now we need to know the bounds for $\theta$, given a particular value of $r$. This is a little weird to picture since a value of $r$ fixes a circle centered at the origin and $r=2a\cos\theta$ is a different circle not centered at the origin. But we don't need to visualize it. All values of $r$ from $0$ to $2a$ are included for $\theta=0$ by the discussion earlier, so $0$ is always the minimum value of $\theta$. The maximum value of $\theta$ would be on the boundary semicircle $r=2a\cos\theta$. To get $\theta$ from $r$, we just solve: $\theta=\arccos\left(\dfrac{r}{2a}\right)$. When $0\le r\le2a$, this gives a value in $\left[0,\pi/2\right]$, as desired. Therefore, our bounds for $\theta$ are $0$ and $\arccos\left(\dfrac{r}{2a}\right)$. And the final iterated integral is $$\int_{0}^{2a}\int_{0}^{\arccos\left(r/(2a)\right)}f\left(r,\theta\right)\,\mathrm{d}\theta\,\mathrm{d}r\text{.}$$
