# Finding the area enclosed by the locus of centroids of equilateral triangles inscribed in an ellipse.

Let a and b be the lengths of the semi-major and semi-minor axes of an ellipse, respectively.

How to find the area enclosed by the locus of the centroids of equilateral triangles inscribed in the ellipse.

Since a circle of center $$G(x_G,\,y_G)$$ and radius $$R > 0$$ can be parameterized as:

$$(x,\,y) := (x_G,\,y_G) + R\left(\cos u,\,\sin u\right)$$

it follows that the vertices of an equilateral triangle of centroid $$G$$ can be parameterized as:

$$(x_n,\,y_n) := (x_G,\,y_G) + R\left(\cos u_n,\,\sin u_n\right),$$

where $$u_n = u + \frac{2\,n\,\pi}{3}$$, with $$u \in [0,\,2\pi)$$ and $$n = 0,\,1,\,2$$.

So, imposing that these vertices belong to an ellipse of Cartesian equation:

$$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$$

with $$a,\,b > 0$$ the lengths of the semi-axes, the following system of equations is obtained:

$$\frac{x_0^2}{a^2} + \frac{y_0^2}{b^2} = 1 \; \; \; \land \; \; \; \frac{x_1^2}{a^2} + \frac{y_1^2}{b^2} = 1 \; \; \; \land \; \; \; \frac{x_2^2}{a^2} + \frac{y_2^2}{b^2} = 1$$

in the unknowns $$x_G,\,y_G,\,R$$, whose four solutions are:

$$-a \le x_G \le a\,; \; \; \; y_G = \pm \frac{b}{a}\sqrt{a^2 - x_G^2}\,; \; \; \; R = 0\,;$$

or:

\tiny \begin{aligned} & x_G = \pm \frac{-a^4\left(\sin u_0 - \sin u_1\right)\left(\sin u_0 - \sin u_2\right)\left(\sin u_1 - \sin u_2\right)-a^2b^2\left(\left(\sin u_0 - \sin u_1\right)\cos^2 u_2 - \left(\sin u_0 - \sin u_2\right)\cos^2 u_1 + \left(\sin u_1 - \sin u_2\right)\cos^2 u_0\right)}{\sqrt{\left(a^2\left(\sin u_0 - \sin u_1\right)^2+b^2\left(\cos u_0 - \cos u_1\right)^2\right)\left(a^2\left(\sin u_0 - \sin u_2\right)^2+b^2\left(\cos u_0 - \cos u_2\right)^2\right)\left(a^2\left(\sin u_1 - \sin u_2\right)^2+b^2\left(\cos u_1 - \cos u_2\right)^2\right)}} \;; \\ & . \\ & y_G = \pm \frac{b^4\left(\cos u_0 - \cos u_1\right)\left(\cos u_0 - \cos u_2\right)\left(\cos u_1 - \cos u_2\right)-a^2b^2\left(\left(\sin^2 u_0 - \sin^2 u_1\right)\cos u_2 - \left(\sin^2 u_0 - \sin^2 u_2\right)\cos u_1 + \left(\sin^2 u_1 - \sin^2 u_2\right)\cos u_0\right)}{\sqrt{\left(a^2\left(\sin u_0 - \sin u_1\right)^2+b^2\left(\cos u_0 - \cos u_1\right)^2\right)\left(a^2\left(\sin u_0 - \sin u_2\right)^2+b^2\left(\cos u_0 - \cos u_2\right)^2\right)\left(a^2\left(\sin u_1 - \sin u_2\right)^2+b^2\left(\cos u_1 - \cos u_2\right)^2\right)}} \;; \\ & . \\ & R = \pm \frac{2a^2b^2\left(\left(\sin u_0 - \sin u_1\right)\cos u_2 - \left(\sin u_0 - \sin u_2\right)\cos u_1 + \left(\sin u_1 - \sin u_2\right)\cos u_0\right)}{\sqrt{\left(a^2\left(\sin u_0 - \sin u_1\right)^2+b^2\left(\cos u_0 - \cos u_1\right)^2\right)\left(a^2\left(\sin u_0 - \sin u_2\right)^2+b^2\left(\cos u_0 - \cos u_2\right)^2\right)\left(a^2\left(\sin u_1 - \sin u_2\right)^2+b^2\left(\cos u_1 - \cos u_2\right)^2\right)}} \;; \end{aligned}

which, simplified according to the above reports, offers the only desired solution:

\begin{aligned} & x_G = \frac{\sqrt{2}\,a^2\left(a^2-b^2\right)\cos(3u)}{\sqrt{\left(a^2+b^2\right)\left(a^4+14a^2b^2+b^4\right)+\left(a^2-b^2\right)^3\cos(6u)}} \;; \\ & y_G = \frac{\sqrt{2}\,b^2\left(a^2-b^2\right)\sin(3u)}{\sqrt{\left(a^2+b^2\right)\left(a^4+14a^2b^2+b^4\right)+\left(a^2-b^2\right)^3\cos(6u)}} \;; \\ & R = \frac{4\sqrt{2}\,a^2b^2}{\sqrt{\left(a^2+b^2\right)\left(a^4+14a^2b^2+b^4\right)+\left(a^2-b^2\right)^3\cos(6u)}} \;. \end{aligned}

Since:

$$\frac{x_G^2}{\left(x_G | u=0\right)^2} + \frac{y_G^2}{\left(y_G | u=\frac{\pi}{2}\right)^2} = 1$$

i.e.

$$\frac{x_G^2}{\left(\frac{a^2-b^2}{a^2+3b^2}\,a\right)^2} + \frac{y_G^2}{\left(-\frac{a^2-b^2}{3a^2+b^2}\,b\right)^2} = 1$$

is an identity for each $$u \in [0,\,2\pi)$$, we can answer the question of the topic:

The locus of centroids of equilateral triangles inscribed in an ellipse of semiaxis $$a,\,b > 0$$ is a concentric ellipse of semiaxis $$\frac{\left|a^2-b^2\right|}{a^2+3b^2}\,a,\,\frac{\left|a^2-b^2\right|}{3a^2+b^2}\,b$$. So, since the first ellipse has area $$\pi\,a\,b$$, the second ellipse has area $$\frac{\left(a^2-b^2\right)^2}{\left(a^2+3b^2\right)\left(3a^2+b^2\right)}\,\pi\,a\,b$$.

Furthermore, by slightly manipulating the last relationship, we obtain:

$$\frac{\left(\frac{a^2+3b^2}{a^2-b^2}\,x_G\right)^2}{a^2} + \frac{\left(-\frac{3a^2+b^2}{a^2-b^2}\,y_G\right)^2}{b^2} = 1$$

from which the coordinates of the fourth point $$P(x_P,\,y_P)$$ are highlighted where the circle circumscribed to the equilateral triangle intersects the ellipse of semi-axes $$a,\,b\,$$:

$$x_P = \frac{a^2+3b^2}{a^2-b^2}\,x_G\,, \; \; \; \; \; \; y_P = -\frac{3a^2+b^2}{a^2-b^2}\,y_G\,.$$

Then, to complete the work, compacting everything in the following way:

\begin{aligned} & R(u) := \sqrt{\frac{32a^4b^4}{\left(a^2+b^2\right)\left(a^4+14a^2b^2+b^4\right)+\left(a^2-b^2\right)^3\,\cos(6u)}} \;; \\ & G(u) := R(u)\left(\frac{a^2-b^2}{4b^2}\,\cos(3u),\;\frac{a^2-b^2}{4a^2}\,\sin(3u)\right); \\ & V(u,\,v) := G(u) + R(u)\left(\cos\left(u + \frac{2\pi}{3}\,v\right),\;\sin\left(u + \frac{2\pi}{3}\,v\right)\right); \\ & P(u) := R(u)\left(\frac{a^2+3b^2}{4b^2}\,\cos(3u),\;-\frac{3a^2+b^2}{4a^2}\,\sin(3u)\right); \end{aligned}

with $$u \in [0,\,2\pi)$$ and $$v = 0,\,1,\,2$$, this is easily implemented in Wolfram Mathematica 12.0:

{a, b} = {2, 1};

ellipse1 = {a Cos[u], b Sin[u]};
ellipse2 = Abs[a^2 - b^2] {1 / (a^2 + 3 b^2), 1 / (3 a^2 + b^2)} ellipse1;
plot1 = ParametricPlot[{ellipse1, ellipse2}, {u, 0, 2π}, PlotStyle -> {Blue, Red}];

R[u_] := Sqrt[32 a^4 b^4 / ((a^2 + b^2) (a^4 + 14 a^2 b^2 + b^4) + (a^2 - b^2)^3 Cos[6 u])]
G[u_] := R[u] {(a^2 - b^2) Cos[3 u] / (4 b^2), (a^2 - b^2) Sin[3 u] / (4 a^2)}
V[u_, v_] := G[u] + R[u] {Cos[u + 2π/3 v], Sin[u + 2π/3 v]}
P[u_] := R[u] {(a^2 + 3 b^2) Cos[3 u] / (4 b^2), -(3 a^2 + b^2) Sin[3 u] / (4 a^2)}

frames = Table[{xG, yG} = G[u];
{x1, y1} = V[u, 0];
{x2, y2} = V[u, 1];
{x3, y3} = V[u, 2];
{xP, yP} = P[u];

list1 = {{x1, y1}, {x2, y2}, {x3, y3}, {x1, y1}};
list2 = {{{xG, yG}, {x1, y1}}, {{x2, y2}, {x3, y3}}, {{xP, yP}}};
plot2 = ParametricPlot[G[u] + R[u] {Cos[v], Sin[v]}, {v, 0, 2π},
PlotStyle -> {Black, Thin}];

plot3 = Graphics[{Black, Thin, Line[list1]}];
plot4 = ListPlot[list2, PlotStyle -> {Green, Yellow, Magenta}];
Magnify[Show[{plot1, plot2, plot3, plot4},
PlotRange -> {{-2.0, 2.0}, {-1.5, 1.5}}], 2],

{u, 0, 2π, 0.1}];

Export["image.gif", frames, "AnimationRepetitions" -> ∞, "DisplayDurations" -> 1];