﻿ Two ellipses intersection
Ellipse
 x2 + y2 + x + y + = 0
 (x − )2 + ( y − )2 = 1 2 2
 x2 + y2 + x + y + = 0
 (x − )2 + ( y − )2 = 1 2 2 Intersection points:
Intersection point 1:
Intersection point 2:
Intersection point 3:
Intersection point 4:
Common area
 Input limit:
 Intersection of two ellipses with centers at  (0 , 0) and (0 , 0) ▲
If both ellipses centers are located at the origin (0 , 0) the equations of the ellipses will be:  The intersection points are at: If the ellipses are given by the polynomial forms       Ax2 + By2 + E = 0     and     Fx2 + Gy2 + J = 0
 Then the intersection points are given by:  There are three posible locations of the ellipses:
 # Relative position Total intersection points Condition ① 0 points a > c and b > d or a < c and b < d ② 2 points a = c and b ≠ d or b = d and a ≠ c ③ 4 points a > c and b < d or a < c and b > d
The lapping area of ellipse of type ① and ② is the area of the inner ellipse       A = πab     or     A = πcd
 The area of ellipse type ③ is: Intersection of two ellipses with centers at   (h , 0) and (m , 0) ▲
The equation of an ellipse which is located along the x (y = 0) axis is:  Mark: α = a2d2 − b2 β = hb2 − ma2d2 γ = a2d2m2 + a2b2 − b2h2 − a2d2c2
 And the x coordinate of the intersections are: Or after substituting values:  The polynomial form of this ellipse is       Ax2 + By2 + Cx + E = 0     and     Fx2 + Gy2 + Hx + J = 0
After substituting the value of   y   from eq.  (1)  to eq.  (2)  we get the quadratic equation with  x:
x2(AG − BF) + x(CG − BH) + (EG − BJ) = 0
 And the intersection is:  There are six possible locations of the ellipses: (the value of D in this case is: D = |m − h| )
 # Relative position Total intersection points Condition ① 0 points a + c < D     (along x axis) or b + d < D     (along y axis) ② 1 points a + c = D or b + d = D ③ 2 point a + c > D or b + d > D ④ 3 points D + c = a or D + d = b ⑤ 4 points D + c < a and D < fy(m) or D + d < b and D < fx(n) ⑥ 0 points a + c < D and D > fy(m) or b + d < D and D > fy(n)
 Intersection of two ellipses with centers at   (h , k) and (0 , 0) ▲
If the ellipses are given by the equations   From the second equation the value of y is: And for the value of x we get a quartic equation: Where:  The equations of this ellipses by polynomial forms are:
 Ax2 + By2 + Cx + Dy + E = 0 (1) Fx2 + Gy2 + J = 0 (2)
 From eq. (1) we get the value of y: Substitute the value of y into equation (2) yields the equation: After multiplying all terms by 4B2 and open paranthesis we get the equation In order to simplepy the equation we will define the following constants:
 δ = 4B2J + 2D2G − 4BEG φ = 4BCG θ = 4B2F − 4ABG μ = 2DG
After arranging the equation by powers we get a forthe power of x which can be solved mathematically:
x4θ2 − x32θφ + x22 + 2θδ + 4Bμ2) − x2φδ + (δ2 − D2μ2 + 4BEμ2) = 0
 Intersection of two ellipses with centers at   (h , k) and (m , n) ▲
If the ellipses are given by the equsations:  After quite many stepses we get a quartic equation for the  x  coordinate of the intersection:
θx4 + 2θμx3 + (μ2 + 2θγ + b2δ)x2 + (2μγ − 2b22)x + (γ2 − αδ2) = 0
 Where: α = b2 (a2 − h2)    The  y  coordinate is given by the equation: We define two ellipses by the polynomial equations:
 Ax2 + By2 + Cx + Dy + E = 0 (1) Fx2 + Gy2 + Hx + Iy + J = 0 (2)
 From eq. (1) we get the value of y: Substitute the value of y into equation (2) yields the equation: After multiplying all terms by 4B2 and open paranthesis we get the equation In order to simplepy the equation we will define the following constants:
 δ = 2BDI − 2D2G + 4BEG − 4B2J φ = 4BCG − 4B2H θ = 4ABG − 4B2F μ = 2BI − 2DG
 And we get the equation: Taking the squares of bothe sides we get:
D2μ2 − 4ABμ2x2 − 4BCμ2x − 4BEμ2 = x4θ2 + x2φ2 + δ2 + 2θφx3 + 2θδx2 + 2φδx
After arranging the equation by powers we get a forthe power of x which can be solved mathematically:
x4θ2 + x32θφ + x22 + 2θδ + 4ABμ2) + x(4BCμ2 + 2φδ) + (δ2 − D2μ2 + 4BEμ2) = 0