Area between $x^{2}+\left(y-\frac{1}{2}\right)^{2}=\frac{1}{4}$ and $\left(x-\frac{1}{2}\right)^{2}+y^2=\frac{1}{4}$ I am trying to find the area between $x^{2}+\left(y-\frac{1}{2}\right)^{2}=\frac{1}{4}$ and $\left(x-\frac{1}{2}\right)^{2}+y^2=\frac{1}{4}$ using Double integrl in Polar coordinates.

Now as shown in the figure the angle $\theta$ takes values from $0$ to $\frac{\pi}{2}$.
Now $r$ depends on $\theta$.
From $x^{2}+\left(y-\frac{1}{2}\right)^{2}=\frac{1}{4}$,substituting $x=r\cos(\theta)$ and $y=r\sin(\theta)$ we get
$$r=\sin(\theta)$$ and like-wise substituting $x=r\cos(\theta)$ and $y=r\sin(\theta)$ in $\left(x-\frac{1}{2}\right)^{2}+y^2=\frac{1}{4}$ we get
$$r=\cos(\theta)$$
So the double integral which gives the area is:
$$A=\int_{\theta=0}^{\pi / 2} \int_{r=\sin \theta}^{\cos \theta} r d r d \theta \text { . }$$
But i am getting answer as ZERO.
 A: You are getting zero because you cannot blindly substitute the equations of the circles into the limits of integration.  For the shaded region, when $0 \le \theta \le \pi/4$, the vertex of the angle is at the origin and intersects the circle $r = \sin \theta$.  But when $\pi/4 \le \theta \le \pi/2$, the angle intersects the other circle, $r = \cos \theta$.  So the area integral must be set up as $$\int_{\theta = 0}^{\pi/4} \int_{r=0}^{\sin \theta} r \, dr \, d\theta + \int_{\theta = \pi/4}^{\pi/2} \int_{r=0}^{\cos \theta} r \, dr \, d\theta.$$
So what does the integral $$\int_{\theta=0}^{\pi/2} \int_{r = \sin \theta}^{\cos \theta} r \, dr \, d\theta$$ represent?  From $0 \le \theta \le \pi/4$, the angle sweeps out the region inside the circle $r = \cos \theta$ but outside the other circle $r = \sin \theta$, because that is what $$\int_{r = \sin \theta}^{\cos \theta}$$ means.  So why is the result zero?  Because on $\pi/4 \le \theta \le \pi/2$, the angle sweeps out the negative of the area inside the circle $r = \sin \theta$ but outside $r = \cos \theta$.  Since this region is congruent to the other one with positive area, the two areas cancel out.
A: The polar equation of the circles are $r=\sin\theta=f(\theta)$ and $r=\cos\theta=g(\theta)$. They intersect at the pole and when $\theta=\frac{\pi}{4}$. Looking at the figure, the area is
$$A=\int_0^{\pi/4} \frac{\sin^2\theta}{2}\; d\theta + \int_{\pi/4}^{\pi/2}\frac{\cos^2 \theta}{2} = \frac{1}{2}\left( \int_0^{\pi/4}\frac{1-\cos (2\theta)}{2}\; d\theta + \int_{\pi/4}^{\pi/2}\frac{1+\cos(2\theta)}{2}  \right)
=\frac{1}{4}\left( \left[\theta-\frac{\sin(2\theta)}{2}  \right]_0^{\pi/4} + \left[  \theta+\frac{\sin(2\theta)}{2}\right]_{\pi/4}^{\pi/2}  \right)
= \frac{\pi}{8}  - \frac{1}{4}
$$
Note: using the symmetry about $\theta=\frac{\pi}{2}$, the area simplify to $A=\int_0^{\pi/4} \sin^2\theta\; d\theta$.

Other method: the line $y=x$ separates the region of same area. This area is the difference of the area of a quarter of circle of radius $\frac{1}{2}$ and a right triangle with two sides $\frac{1}{2}$. Then
$$A=2\left( \frac{1}{4}\frac{\pi}{4} - \frac{1}{2}\frac{1}{4}\right) = \frac{\pi}{8}-\frac{1}{4}$$
A: Try setting your integral as
$A=2\int_0^\frac{\pi}{4}\int_{\sin\theta}^{\cos\theta}rdrd\theta$
