<s>[INST] How do I get an exact value for the trigonometric expression? I'm trying find an exact value for $$\cos\left(\frac{1}{3}\arctan\left(\frac{-10}{9\sqrt{3}}\right)\right)$$
Evaluating $\cos(\arctan(\frac{-10}{9\sqrt{3}}))$ is straighforward, but I'm having trouble with the above expression. I plugged it into Wolfram Alpha and it returned $3/2 \sqrt{\frac{3}{7}}$.
Any help would be appreciated.  
 [/INST] Recall the inverse tangent identity $$\tan^{-1} x + \tan^{-1} y = \tan^{-1} \frac{x+y}{1-xy}.$$ So in particular, $$2 \tan^{-1}x = \tan^{-1} \frac{2x}{1-x^2},$$ and $$3 \tan^{-1} x = \tan^{-1} \frac{x(3-x^2)}{1-3x^2}.$$  Consequently, we wish to find $x$ such that $$\frac{x(3-x^2)}{1-3x^2} = -\frac{10}{9 \sqrt{3}},$$ which is equivalent to $$0 = 9 \sqrt{3} x^3 + 30 x^2 - 27 \sqrt{3} x - 10.$$  This equation happens to factor, giving the solutions $$x = -\frac{5}{\sqrt{3}}, -\frac{1}{3 \sqrt{3}}, \frac{2}{\sqrt{3}}.$$  Consequently, $$\cos \Bigl( \frac{1}{3} \tan^{-1} \frac{-10}{9 \sqrt{3}} \Bigr) = \frac{1}{2} \sqrt{\frac{3}{7}}, \frac{3}{2} \sqrt{\frac{3}{7}}, \sqrt{\frac{3}{7}}.$$  Which of these are correct?  The second one is correct if we take $\tan^{-1} x \in (-\tfrac{\pi}{2}, \tfrac{\pi}{2})$.  The first is correct if we take $\tan^{-1} x \in (-\tfrac{3\pi}{2}, -\tfrac{\pi}{2})$.  The third is correct if we take $\tan^{-1} x \in (\tfrac{\pi}{2}, \tfrac{3\pi}{2})$.  In other words, all three are correct values, but they correspond to three different branches of the inverse tangent function:  this arises from the $\frac{1}{3}$ term.
</s>