$\iint_Bx \, dx \, dy$ where $B=\{x^2+y^2\le x\}$ I need to take:
$$\iint_Bx \, dx \, dy$$ where $$B=\{x^2+y^2\le x\}$$
Which is the circumference:
$$B=\left\{\left(x-\frac{1}{2}\right)^2+y^2 \le \frac{1}{4}\right\}$$
I tried to make the substitution:
$$x-\frac{1}{2} = p\cos(\theta), y = p\sin(\theta)$$
Then we end up with the equation of a disk in polar coordinates as the new region
$$p\le \frac{1}{2}$$
So in the new integral, $\theta$ should go from $0$ to $2\pi$ and $p$ from $0$ to $\frac{1}{2}$. We should get:
$$\int_0^{2\pi}\int_0^{\frac{1}{2}}\frac{1}{2}+p\cos(\theta) \, dp \, d\theta$$
which is $\frac{\pi}{2}$ by Wolfram Alpha
But my book says the answer is $\frac{\pi}{8}$
Also, I tried to do $x=p\cos(\theta), y = p\sin(\theta)$ and we should get a circumference in polar coordinates in which $\theta$ varies from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$ and $p$ from $0$ to $1$. But wolfram alpha gives $1$ for this.
How to do it in the $2$ ways?
 A: $\dfrac \pi 8$ is correct.  Wolfram's evaluation of the integral that you gave it is also correct, but you gave it the wrong integral.
You have $dp\,d\theta$ where you need $p\,dp\,d\theta$.  So your integral should be
$$
\int_0^{2\pi}\int_0^{\frac{1}{2}} \left(\frac{1}{2}+p\cos(\theta)\right) p \, dp \, d\theta
$$
In the $(x,y)$ coordinate system the element of area is $dx\,dy$, i.e. and infinitely small increment of $x$ multiplied by an infinitely small increment of $y$ gives you the corresponding infinitely small area.
The expression $\text{“ }p\,dp\,d\theta\text{ ''}$ that you usually see in integrals in polar coordinates is perhaps the form best suited to evaluating the integral, but if your purpose is to understand that expression, then it may better be viewed as $\text{“ }dp\,\left(p \, d\theta\right)\text{ ''}$.  The point is that as $\theta$ changes, the distance one travels along the circle is $p$ times the change in $\theta$, e.g. if the radius is five miles, you multiply five miles by the radian measure of the angle, and that gives you the length of the circular arc in miles.  And it's in a direction perpendicular to the radius, so just multiplying it by the change in $p$ gives you the area.
One quick way to see that $\pi/8$ is correct is this: the area of the circle is clearly $\pi/4$, and by geometric symmetry you see that the average value of the function being integrated is $1/2$.  So just multiply those.
