# Polar Integration over intersection of two circles

Let $C_0$ denote a circle centered at $(0,0)$ with a radius of $r_0$ and let $C_1$ denote a circle of radius $r_1$ centered at a point $(x_1,0)$. Assume that we are given some function, $\phi(r)$ which is radial and has no dependence on $\theta$. Assume that $r_0 < r_1$ and that $x_0 \in (r_1-r_0,r_1+r_0)$. In this region, we have that $C_0$ and $C_1$ have non-trivial intersection, but $C_0$ is not a proper subset of $C_1$. What I would like to do is to be able to evaluate the integral of $\phi(r)$ over the intersection of these two circles. I thought this would be very simple, but it appears that I can't remember quite how to do these polar integrals. Here is my approach.

Step 1: We write the two equations in polar coordinates. Starting with Cartesian coordinates, the first circle satisfies $x^2+y^2=r_0^2$, and hence $r = r_0$ is its polar equation. The second circle satisfies $(x-x_1)^2+y^2 = r_1^2$, and we can susbstitute in $x=r\cos(\theta)$ and $y = r\sin(\theta)$ to find that

$r = 2x_1 \cos(\theta) \pm \sqrt{r_1^2-x_1^2 \sin^2(\theta)}$.

Next, we want to find the $\theta$ coordinates where $C_0$ and $C_1$ intersect. This will yield us the limits of integration. I want $x^2+y^2=r_0^2$ and $(x-x_1)^2+y^2=r_1^2$, so we have $x^2-2x x_1 +x_1^2+(r_0^2-x^2) = r_1^2$, and hence $x = -\frac{1}{2x_1} (r_1^2-r_0^2-x_1^2)$ Then, the angle at which this occurs is $\theta_1 = \cos^{-1}(\frac{x}{r_0})$. The intersections actually occur at two points, both with the same $x$ coordinate, but one is above the $x$ axis and one below. So, we get another one which occurs at $\theta_2=2\pi-\theta$.

So far, it looks like I'm ready to set up my integration regions. I think my best bet is to divide my region into pieces, depending on those $\theta$ values I computed. From $\theta=0$ to $\theta=\theta_1$, we are integrating just inside the circle $C_0$, so I think I have over this region $$\int_{0}^{\theta_1} \int_0^{r_0} \phi(r) r dr d\theta$$

Now, from $\theta_1$ to $\theta_2$, I want to integrate only including the area of contained in $C_1 \cap C_0$. So, I think I integrate on this region from $\theta = \theta_1$ to $\theta = \theta_2$ and $r=0$ up to $r_1= 2x_1 \cos(\theta) \pm \sqrt{r_1^2-x_1^2 \sin^2(\theta)}$

So, I have over this region

$$\int_{\theta_1}^{\theta_2} \int_0^{r_1} \phi(r) r dr d\theta$$

For my last region, we go from $\theta_2$ to $2\pi$. Here, our radial limits go from $0$ to $r_0$ (as we aren't dealing with the bigger circle $C_1$), so we have for this region

$$\int_{\theta_2}^{2\pi} \int_0^{r_0} \phi(r) r dr d\theta$$

Then, the final result will be the sum of the three integrals. Hopefully this picture clarifies a few things: First, I want to make sure that this seems correct. I think things get a bit tricky as I push $x_1$ further to the right. When $x_1 = r_1$, the origin is actually a point on $C_2$, and I think at this point I need to change around my regions of integration and things are a bit different. That's my next step is dealing with the case of $x_1 \in [r_1,r_1+r_0]$, but before I get there, I want to see if I have this idea right for the case $x_1 \in (r_1-r_0,r_1)$.

Edit: The picture I made for this might be too small to see. If it helps, right clicking on it and clicking "View Image" brought it up more clearly for me.