<s>[INST] Any better way to find $\cot \left(10^{\circ}\right)+\cot \left(70^{\circ}\right)-\cot \left(50^{\circ}\right)$ 

Find the value of  $\cot \left(10^{\circ}\right)+\cot \left(70^{\circ}\right)-\cot \left(50^{\circ}\right)$


My Method:
I used the following Identities:
\begin{aligned}
& \sin A \cos B-\cos A \sin B=\sin (A-B) \\
& 2 \sin A \sin B=\cos (A-B)-\cos (A+B) \\
& \cos (2 A)=2 \cos ^2 A-1 \\
& \cos (3 A)=4 \cos ^3 A-3 \cos A \\
& \sin (2 A)=2 \sin A \cos A \\
& 2 \sin A \cos B=\sin (A+B)+\sin (A-B) \\
&
\end{aligned}
$$\begin{aligned}
 S_1 & =\cot \left(10^{\circ}\right)+\cot \left(70^{\circ}\right)-\cot \left(50^{\circ}\right)=\cot(10^{\circ})-\cot \left(50^{\circ}\right)+\tan(20^{\circ}) \\
\\
 \Rightarrow S_1 & =\frac{\cos \left(10^{\circ}\right)}{\sin \left(10^{\circ}\right)}-\frac{\cos \left(50^{\circ}\right)}{\sin \left(50^{\circ}\right)}+\frac{\sin \left(20^{\circ}\right)}{\cos \left(20^{\circ}\right)} \\
\\
\\
 \Rightarrow S_1 & =\frac{2 \sin \left(40^{\circ}\right)}{2 \sin \left(10^{\circ}\right) \sin \left(50^{\circ}\right)}+\frac{\sin \left(20^{\circ}\right)}{\cos \left(20^{\circ}\right)} \\
\\
 \Rightarrow S_1 & =\frac{2 \sin \left(40^{\circ}\right)}{\cos \left(40^{\circ}\right)-\frac{1}{2}}+\frac{\sin \left(20^{\circ}\right)}{\cos \left(20^{\circ}\right)} \\ \\
 \Rightarrow S_1 & =\frac{4 \sin 40^{\circ}}{4 \cos ^2\left(20^{\circ}\right)-3}+\frac{\sin \left(20^{\circ}\right)}{\cos \left(20^{\circ}\right)}=\frac{6 \sin \left(40^{\circ}\right) \cos \left(20^{\circ}\right)-3 \sin \left(20^{\circ}\right)}{0.5}
\end{aligned}$$
$$\begin{aligned}
 & \Rightarrow S_1=\frac{3}{0.5}\left(2 \sin \left(40^{\circ}\right) \cos \left(20^{\circ}\right)-\sin \left(20^{\circ}\right)\right) \\ \\
 & \Rightarrow S_1=6\left(\sin \left(60^{\circ}\right)\right)=3 \sqrt{3}
\end{aligned}$$
 [/INST] Yet an other way to proceed, which arguably explains why we get a "nice value" for the sum. Let $c_1,c_2,c_3$ be the three different values of the cotangent function computed in $x_1,x_2,x_3$, which are respectively
$10^\circ$, $70^\circ$, $130^\circ$. These angles are of the shape $10^\circ+k\cdot 60^\circ$, so taking the cotangent of the triple value we get
$\cot 30^\circ=\sqrt3$. There is a formula for $\cot (3x)$ in terms of $c:=\cot x$ obtained from $\displaystyle\cot(x+y)=(\cot x\cot y-1)/(\cot x+\cot y)$, namely
$$
\cot(3x)=\frac{c^3-3c}{3c^2-1}=:f(c)\ .
$$
Plugging in $c_1,c_2,c_3$ into $f$ we thus obtain every time $\cot 30 ^\circ=\sqrt 3$. So $c_1,c_2,c_3$ are three (thus all) roots of the polynomial equation:
$$
c^3-3c=\sqrt3(3c^2-1)\ ,\qquad\text{ i.e. }\qquad
c^3-3\sqrt 3c^2-3c+\sqrt 3=0\ .
$$
From here we obtain immediately relations like:
$$
\begin{aligned}
\color{blue}{3\sqrt 3} &= \color{blue}{c_1+c_2+c_3}\ ,\\
-3 &= c_1c_2 + c_3c_3+c_3c_1\ ,\\
-\sqrt 3 &= c_1c_2c_3\ ,\\[3mm]
33 &=c_1^2+c_2^2+c_3^2\ ,\\
105\sqrt3 &=c_1^3+c_2^3+c_3^3\ .
\end{aligned}
$$
The blue relation is the needed one.
$\square$

Computer check:
sage: c1, c2, c3 = cot(pi/18), cot(7*pi/18), cot(13*pi/18)
....: (c1 + c2 + c3).minpoly()
....: (c1 + c2 + c3).numerical_approx()
x^2 - 27
5.19615242270663

So $c_1+c_2+c_3$ is the positive root of the polynomial $x^2-27$.
</s>