<s>[INST] 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.
 [/INST] 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}$$
</s>