# How can I define the intersection area of an ellipse and a circle?

So I would need to solve how to define the intersection area of a circle and an ellipse. The coordinates for circle and ellipse are known and also the radius of circle and semi-major and -minor axes of an ellipse. Here is plot to help to understand what I mean Intersection area plot. I am not the best with mathematics and integrals etc. and I will appreciate a ton if someone is able to help me with this.

• Are the $y$-coordinate of the centers of the circle and ellipse equal? – Tavish Jun 3 '20 at 9:49
• Yes! Y coordinates are equal but X coordinates different – korpraaliteemu Jun 3 '20 at 9:57
• Can you show us what the radius of the circle is? And what do know about the ellipse that we see in the picture? – Jan Eerland Jun 3 '20 at 9:57
• Radius of circle = 2000, its x- and y- coordinates are (5000,5000). Ellipse's x- and y-coordinates are (2500,5000), semi-major axis = 2000 and minor-axis = 1000. – korpraaliteemu Jun 3 '20 at 10:01

## 2 Answers

If $$(x,y_l)$$ and $$(x,y_u)$$ are the points of intersection of the two curves, then the required area can be calculated through integration w.r.t $$y$$: $$\int_{y_l}^{y_u} x^+(y)_{\text{ellipse}}-x^-(y)_{\text{circle}} \ dy$$ Here, $$x^+$$ and $$x^-$$ mean that you need to take the positive and negative square roots respectively, when solving for $$x$$ in terms of $$y$$.

EDIT: After finding the intersection points and integrating, you should get the answer as approximately $$\boxed{2003708.58843}$$.

• Tavish, don't you know what "exact" means? (See Jan Eerland's answer for guidance.) – TonyK Jun 3 '20 at 19:34
• @TonyK I do. I guess I forgot that Desmos would make an approximation when evaluating the integral. I fixed it. – Tavish Jun 3 '20 at 19:44

Well, we know that the equation of a circle is given by:

$$\left(x-\text{a}\right)^2+\left(\text{y}-\text{b}\right)^2=\text{r}^2\tag1$$

Where $$\left(\text{a},\text{b}\right)$$ are the center coordinates of the circle and $$\text{r}$$ is the radius of the circle.

In your case, we have $$\text{a}=\text{b}=5000$$ and $$\text{r}=2000$$. So:

$$\left(x-5000\right)^2+\left(\text{y}-5000\right)^2=2000^2\tag2$$

We know that the equation of an ellipse is given by:

$$\left(\frac{x-x_0}{\alpha}\right)^2+\left(\frac{\text{y}-\text{y}_0}{\beta}\right)^2=1\tag3$$

Where $$\left(x_0,\text{y}_0\right)$$ are the center coordinates of the ellipse and $$\alpha$$ is the semi-major axis and $$\beta$$ is the semi-minor axis.

In your case, we have $$x_0=2500$$, $$\text{y}_0=5000$$, $$\alpha=2000$$, and $$\beta=1000$$. So:

$$\left(\frac{x-2500}{2000}\right)^2+\left(\frac{\text{y}-5000}{1000}\right)^2=1\tag4$$

Now, I used Mathematica to plot this with the following code:

In:=ContourPlot[{(x - 5000)^2 + (y - 5000)^2 ==
2000^2, ((x - 2500)/2000)^2 + ((y - 5000)/1000)^2 == 1}, {x, 2000,
8000}, {y, 2000, 8000}]


And got the following output: We can solve for the intersection points, using:

In:=FullSimplify[
Solve[{(x - 5000)^2 + (y - 5000)^2 ==
2000^2, ((x - 2500)/2000)^2 + ((y - 5000)/1000)^2 == 1,
x > 0 && y > 0}, {x, y}]]

Out={{x -> -(500/3) (-35 + 2 Sqrt),
y -> -(500/3) (-30 + Sqrt[5 (-25 + 4 Sqrt)])}, {x -> -(500/
3) (-35 + 2 Sqrt),
y -> 500/3 (30 + Sqrt[5 (-25 + 4 Sqrt)])}}


Using gridlines we can use the following code:

ContourPlot[{(x - 5000)^2 + (y - 5000)^2 ==
2000^2, ((x - 2500)/2000)^2 + ((y - 5000)/1000)^2 == 1}, {x, 2000,
8000}, {y, 2000, 8000},
GridLines -> {{-(500/3)*(2*Sqrt - 35), 3000, 4500}, {}}]


To see: Now, it is not hard to show that the desired area is given by:

$$\mathcal{A}:=\text{I}_1+\text{I}_2\tag5$$

Where:

I1 = Integrate[
5000 + Sqrt[-(-7000 + x) (-3000 + x)], {x, 3000, \[Tau]}] -
Integrate[5000 - Sqrt[-(-7000 + x) (-3000 + x)], {x, 3000, \[Tau]}]

I2 = Integrate[
5000 + 1/2 Sqrt[-(-4500 + x) (-500 + x)], {x, \[Tau], 4500}] -
Integrate[
5000 - 1/2 Sqrt[-(-4500 + x) (-500 + x)], {x, \[Tau], 4500}]


Where $$\tau=\frac{500}{3}\left(35-2\sqrt{61}\right)$$.

So, we get:

$$\mathcal{A}\approx2.00371\cdot10^6\tag8$$

And the exact value is:

250000/3 (-5 Sqrt[5 (-25 + 4 Sqrt)] +
48 (ArcCsc[2 Sqrt[1/15 (4 + Sqrt)]] +
2 ArcSec[2 Sqrt[2/65 (-7 + 2 Sqrt)]]))

• I was just wondering, when I am changing value of semi-major or - minor axes, the integration won't give right answer anymore. I understand that intersection points do change also and I placed new intersection points to the integral. Also the most left point of an ellipse and the most right point of the ellipse do change and those I also placed in the integral. What changes in integration if for instance semi-major axis = 3000 and semi-minor axis = 2000? – korpraaliteemu Jun 4 '20 at 20:12
• @korpraaliteemu Still interested in the answer to your comment? – Jan Eerland Jun 8 '20 at 16:18