<s>[INST] The value of the expression $x^4-8x^3+18x^2-8x+2$ when $x=\cot\frac{\pi}{12}$ The value of the expression $x^4-8x^3+18x^2-8x+2$ when $x=\cot\frac{\pi}{12}$

I know that $\cot\frac{\pi}{12}=2+\sqrt3$,but putting this value and evaluating is a long process.Isn't there a short and intuitive method to solve this?
 [/INST] 
I know that $\cot\frac{\pi}{12}=2+\sqrt3$

Following up on this line, let $a=2+\sqrt3\,$, then:


*

*$a^2=7+4\sqrt{3}$

*$\dfrac{1}{a}=2-\sqrt{3}\,$ so $\,a+\dfrac{1}{a}=4\,$, and $a^2+\dfrac{1}{a^2}=\left(a+\dfrac{1}{a}\right)^2-2=14$


Then $\;a^4-8a^3+18a^2-8a+2 = a^2 \cdot \left(a^2+\dfrac{1}{a^2}-8\left(a+\dfrac{1}{a}\right)+18\right)+1 = \cdots\,$
</s>