Integration using polar coordinates I have to solve this exercise I will describe but I am facing some problems.
$$\int\int_\tau(x+y)\;dx\;dy$$ where $$(x-2)^2 + y^2 \leq 4$$ and $$y\geq0$$
So I am trying to find this integration inside half of a circle.
$\theta$ is from 0 to $\pi/2$ and $r\leq 4 \cos \theta$
$$\int_0^{\pi/2}\int_{4\cos\theta}^0r^2(\cos \theta+\sin\theta)\;dr\;d\theta$$
Something is wrong with the plane of integration cause I am getting wierd results.
 A: Okay, here's a (fairly crude) picture:

It shows a ray from the origin at an angle $\theta$ from the positive $x$-axis. When you calculate the inner integral, intuitively speaking you're 'adding up' the values of the function $x+y$ along that ray, so you want $r$ to range from the smallest radius along that ray to the largest one. The smallest one is at $O$, the origin, and is $0$; the largest is at $P$, where the ray intersects the circle $r=4\cos\theta$, and is $4\cos\theta$. Thus, you should have $$\int_0^{\pi/2}\int_0^{4\cos\theta}r^2(\cos\theta+\sin\theta)\,drd\theta\;.$$
What you did with the inner integral is like trying to find the area under the curve $y=x^2$ between $x=0$ and $x=1$ by calculating $$\int_1^0 x^2\,dx\;.$$
A: Let $\phi(r,\theta) = (2+r\cos\theta, r\sin\theta)$, then $|J_{\phi}(r,\theta)| = |r|$,
and $\phi([0,2],[0,\pi]) = \tau$. Use the change of variables formula to get 
$$\int_{\tau} f = \int_{\phi^{-1}(\tau)} f \circ \phi |J_{\phi}|.$$
From this you get 
$$\int_{\tau} x+y \; dx dy = \int_{r=0}^2 \int_{\theta=0}^{\pi} (2+r\cos\theta + r\sin\theta)r \; d\theta dr$$
There is a minor technicality with $\phi$ not being invertible at $r=0$ (ie, $(x,y) = (2,0)$), but this is easy to deal with (the measure of $\{(2,0)\}$ is zero, so we may integrate over $\tau \setminus \{(2,0)\}$ instead; then $\phi$ is invertible at all points of interest).
Here's my crude picture:

