# Epicycloid

## Definition

For $$n\geq 2$$ we can define a curve $$z:[0,2\pi]\to\mathbb{C}$$ by $$z(t):=ne^{it}-e^{int}$$. It is the path that a point on a circle of radius $$1$$ follows, when that circle is rolled around a circle of radius $$n-1$$. In the examples below, we let $$n=4$$.

Using Euler’s formula, we can expand $$e^{int}=(\cos(t)+i\sin(t))^n$$. Let $$z=x+iy$$. Then $$x(t)$$ and $$y(t)$$ are polynomials in $$\cos(t)$$ and $$\sin(t)$$.

\begin{align*} x(t) &= -\cos^4(t) + 6\cos^2(t)\sin^2(t) - \sin^4(t) + 4\cos(t) \\ y(t) &= -4\cos^3(t)\sin(t) + 4\cos(t)\sin^3(t) + 4\sin(t) \end{align*}

## Implicit formula

Using the identity $$\sin^2(t)=1-\cos^2(t)$$ we can rid of the $$\sin$$s in $$x$$. That won’t work for $$y$$ because $$y$$ is an odd function, but we can do it for $$y^2$$ instead. Using the abbreviation c for $$\cos(t)$$ we get two functions, f and g, that only depend on c:

f(c) = -8*c^4 + 8*c^2 + 4*c - 1
g(c) = -64*c^8 + 128*c^6 + 64*c^5 - 80*c^4 - 96*c^3 + 32*c + 16

The resultant of two polynomials is defined as the determinant of a certain matrix involving their coefficients. It is zero if and only if the polynomials have a common root. If we now let $$x$$ and $$y$$ denote any given real numbers, the statement $\text{Res}_c(x-f(c),y^2-g(c))=0$ is true if and only if there exists a $$c$$ such that $$x=f(c)$$ and $$y^2=g(c)$$. Computing the resultant therefore gives an implicit equation for the epicycloid: $\begin{array}{c}256x^8 + 16384x^6y^2 + 393216x^4y^4 + 4194304x^2y^6 + 16777216y^8 \\ - 5120x^6 - 245760x^4y^2 - 3932160x^2y^4 - 20971520y^6 - 2560x^4 \\ - 81920x^2y^2 - 655360y^4 + 131072x^3 - 6291456xy^2 - 46080x^2 \\ - 737280y^2 - 864000 = 0\end{array}$

Using SageMath:

n = 4;
var('c','s','x','y');
assume(c,"real");
assume(s,"real");
z = n*(c + I*s) - (c + I*s)^n;
f = expand(real(z));
g = expand(imag(z)^2);
dict = {s^i : (1 - c^2)^(i/2) for i in range(2,g.degree(s)+1,2)};
f = expand(f.subs(dict));
g = expand(g.subs(dict));
expand((x - f).resultant(y^2 - g,c))

## Multibrot set

The multibrot set is defined as the set of all complex numbers $$c$$ such that $$P_c^k(0)$$ remains bounded, where $$P_c(z)=z^n+c$$. It contains an epicycloid about $$0$$.

The cusp on the positive real axis is at the greatest $$c$$ such that $$P_c^k(0)$$ converges. By drawing a cobweb diagram, we see that the line $$y=x$$ must be tangent to $$P_c$$.

From $$P_c'(x)=1$$ we get $$nx^{n-1}=1$$, and from $$P_c(x)=x$$ we get $$x^n+c=x$$. So we have

$x=\left(\frac1n\right)^\frac1{n-1}\text{ and then }c=x-x^n=\left(\frac1n\right)^\frac1{n-1}-\left(\frac1n\right)^\frac n{n-1}$

Some values:

\begin{align*}\frac12-\left(\frac12\right)^2 &= 0.25 \\ \sqrt[3]{\frac14}-\sqrt[3]{\left(\frac14\right)^4} &= 0.47247\dots \\ \sqrt[9999]{\frac1{10000}}-\sqrt[9999]{\left(\frac1{10000}\right)^{10000}} &= 0.998979\dots\end{align*}