Show that $\cot(\pi/14)-4\sin(\pi/7)=\sqrt7$ Show that $\cot(\pi/14)-4\sin(\pi/7)=\sqrt7$.
This problem is from G.M. 10/2016 and I can't solve it. I tried with an isosceles triangle with angles $3\pi/7, 3\pi/7$ and $\pi/7$ and I tried to find a relation between the sides of the triangle but I couldn't find anything. I also thought to solve it with complex numbers but again I could't find anything. Any ideas?

Let $a=\frac{\pi}{7},c=\cos a$.
This answer uses that $x=c$ is a root of
$$8x^3-4x^2-4x+1$$
The proof is written at the end of this answer.
Multiplying the both sides of
$$8c^3-4c^2-4c+1=0$$
by $2$ gives
$$16c^3-8c^2-8c+2=0,$$
i.e.
$$(16c^2-24c+9)+(16c^3-24c^2+9c)-7+7c=0,$$
i.e.
$$(1+c)(16c^2-24c+9)=7(1-c)$$
Multiplying the both sides by $1-c$ gives
$$(1-c^2)(4c-3)^2=7(1-c)^2,$$
i.e.
$$1-c^2=\frac{7(1-c)^2}{(4c-3)^2}$$
So
$$\sqrt{1-c^2}=\frac{\sqrt 7\ (1-c)}{4c-3}$$
since $4c-3\gt 4\cos\frac{\pi}{6}-3=2\sqrt 3-3\gt 0$.
So, we have
$$\frac{4c-3}{1-c}\sqrt{1-c^2}=\sqrt 7\tag1$$
By the way,
$$\begin{align}\cot\frac{a}{2}-4\sin a&=\sqrt{\frac{1+c}{1-c}}-4\sqrt{1-c^2}\\\\&=\sqrt{\frac{1-c^2}{(1-c)^2}}-4\sqrt{1-c^2}\\\\&=\frac{\sqrt{1-c^2}}{1-c}-4\sqrt{1-c^2}\\\\&=\frac{4c-3}{1-c}\sqrt{1-c^2}\tag2\end{align}$$
The claim follows from $(1)(2)$.

Finally, let us prove that $x=c$ is a root of
$$8x^3-4x^2-4x+1$$
Since $3a+4a=\pi$, we have
$$\sin(3a)=\sin(4a)$$
from which we have
$$\sin a\ (3-4\sin^2a)=2\sin(2a)\cos(2a)=4\sin a\cos a\cos(2a)$$
Dividing the both sides by $\sin a$ gives
$$3-4(1-c^2)=4c(2c^2-1),$$
i.e.
$$8c^3-4c^2-4c+1=0$$
