3 * tan(x) - tan^3(x)
tan(3x) = ----------------------------------
(1 - 3 * tan^2(x)
you can prove that it's true by taking any angle and multiplying it by 3 and then taking the tangent of.
then you use the formula and you should get the same answer.
for example, i chose 92 degrees.
3 * 92 degrees = 276 degrees.
tan(276) = -9.514364453.
using the formula, i get:
3 * tan(92) - tan^3(92)
tan(3x) = ---------------------------------- = -9.514364454
(1 - 3 * tan^2(92)
they're the same, confirming the formula is correct.
that little discrepancy between the numbers at the end (4 versus 3) is due to internal rounding differences in the calculation of one formula versus the other.