How prove this $\tan{\frac{2\pi}{13}}+4\sin{\frac{6\pi}{13}}=\sqrt{13+2\sqrt{13}}$ Nice  Question:
show that: The follow nice trigonometry 

$$\tan{\dfrac{2\pi}{13}}+4\sin{\dfrac{6\pi}{13}}=\sqrt{13+2\sqrt{13}}$$

This problem I have ugly solution, maybe someone have nice methods? Thank you 
My ugly solution:

let $$A=\tan{\dfrac{2\pi}{13}}+4\sin{\dfrac{6\pi}{13}},B=\tan{\dfrac{4\pi}{13}}+4\sin{\dfrac{\pi}{13}}$$
  since
  $$\tan{w}=2[\sin{(2w)}-\sin{(4w)}+\sin{(6w)}-\sin{(8w)}+\cdots\pm \sin{(n-1)w}]$$
  where $n$ is odd,and $w=\dfrac{2k\pi}{n}$

so

$$\tan{\dfrac{2\pi}{13}}=2\left(\sin{\dfrac{4\pi}{13}}-\sin{\dfrac{5\pi}{13}}+\sin{\dfrac{\pi}{13}}+\sin{\dfrac{3\pi}{13}}-\sin{\dfrac{6\pi}{13}}+\sin{\dfrac{2\pi}{13}}\right)$$
  $$\tan{\dfrac{4\pi}{13}}=2\left(\sin{\dfrac{5\pi}{13}}-\sin{\dfrac{3\pi}{13}}-\sin{\dfrac{2\pi}{13}}-\sin{\dfrac{6\pi}{13}}-\sin{\dfrac{\pi}{13}}+\sin{\dfrac{4\pi}{13}}\right)$$
  then
  $$A^2-B^2=(A+B)(A-B)=16\left(\sin{\dfrac{\pi}{13}}+\sin{\dfrac{3\pi}{13}}+\sin{\dfrac{4\pi}{13}}\right)\left(\sin{\dfrac{2\pi}{13}}-\sin{\dfrac{5\pi}{13}}+\sin{\dfrac{6\pi}{13}}\right)=\cdots=4\sqrt{13}$$
  $$AB=\cdots=6\left(\cos{\dfrac{\pi}{13}}+\cos{\dfrac{2\pi}{13}}+\cos{\dfrac{3\pi}{13}}-\cos{\dfrac{4\pi}{13}}-\cos{\dfrac{5\pi}{13}}+\cos{\dfrac{6\pi}{13}}\right)=\cdots=3\sqrt{3}$$
  so
  $$A=\sqrt{13+2\sqrt{13}},B=\sqrt{13-2\sqrt{13}}$$

Have other nice metods?
and I know this is simlar 1982 AMM problem: How to prove that: $\tan(3\pi/11) + 4\sin(2\pi/11) = \sqrt{11}$
But My problem is hard then AMM problem。Thank you very much!
 A: The following argument is more or less a duplicate in this paper:
Let $x=e^{2\pi i/13}$. Then $$i\tan{2\pi/13}=\frac{x^2-1}{x^2+1}=\frac{x^2-x^{26}}{x^2+1}$$
(recall that $x^{13}=1$)
$$=x^2(1-x^2)(1+x^4+x^8+x^{12}+x^3+x^7)$$
$$=(x+x^2+x^5+x^6+x^9+x^{10}-x^3-x^4-x^7-x^8-x^{11}-x^{12})$$
$$4i\sin{6\pi/13}=2(x^3-x^{10})$$
So $i\tan{2\pi/13}+4i\sin{6\pi/13}=(x+x^2+x^3+x^5+x^6+x^9-x^4-x^7-x^8-x^{10}-x^{11}-x^{12})$
Recall that $1+x+x^2+\cdots+x^{12}=0$.
After some tedious computation, we arrive at
$$(x+x^2+x^3+x^5+x^6+x^9)(x^4+x^7+x^8+x^{10}+x^{11}+x^{12})$$
$$=4+x+x^3+x^4+x^9+x^{10}+x^{12}$$
The key step in the deduction is the famous exponential sum of Gauss, which gives,
$$1+2(x+x^4+x^9+x^3+x^{12}+x^{10})=\sqrt{13}.$$
Hence $$(x+x^2+x^3+x^5+x^6+x^9)(x^4+x^7+x^8+x^{10}+x^{11}+x^{12})=(7+\sqrt{13})/2$$
Recall our formula $1+x+x^2+\cdots+x^{12}=0$ again, and
$$(x+x^2+x^3+x^5+x^6+x^9-x^4-x^7-x^8-x^{10}-x^{11}-x^{12})^2=(-1)^2-4\times(7+\sqrt{13})/2$$
$$=-13-2\sqrt{13}$$
Hence $i\tan{2\pi/13}+4i\sin{6\pi/13}=\pm i\sqrt{13+2\sqrt{13}}$
and it is obvious that $\tan{2\pi/13}+4\sin{6\pi/13}=\sqrt{13+2\sqrt{13}}$, Q.E.D.
P.S. I have a strong feeling that a generalization of such an identity to all primes is possible, but I cannot work them out right now.
A: Straightforward for WA, not so by hand: Let $x = \exp(i \theta)$ be a primitive $13$th root of unity and $y = \tan(\theta) + 4 \sin(3\theta)$. Then $(x, y)$ is a common zero of the polynomials $$i (x^2-1) x^3 + 2i (x^6-1)(x^2+1) + y (x^2+1)x^3 \textrm{ and}\\
x^{12}+x^{11}+x^{10}+x^9+x^8+x^7+x^6+x^5+x^4+x^3+x^2+x+1.$$
The resultant of these polynomials in the variable $x$ is $(y^4-26y^2+117)^3$.  The roots of this resultant are the possible values of $y$ for different choices of $x$.  Since $\sin(6 \pi/13)$ is close to one the value of $y$ in this specific case must be $\sqrt{13+2\sqrt{13}}$.
