From the tan-of-sum formula,

tan(x-y) = (tan x - tan y)/(1 + tan x tan y)

tan(y-z) = (tan y - tan z)/(1 + tan y tan z)

tan(z-x) = (tan z - tan x)/(1 + tan z tan x)

Let X = tan(x), let Y = tan(y), let Z = tan(z) as a convenience in notation.

tan(x-y) = (X-Y)/(1+XY)

tan(y-z) = (Y-Z)/(1+YZ)

tan(z-x) = (Z-X)/(1+ZX)

To find the sum of these three tans, we put them all over a common denominator, (1+XY)(1+YZ)(1+ZX)

((X-Y)(1+YZ)(1+ZX)+(Y-Z)(1+ZX)(1+XY)+(Z-X)(1+XY)(1+YZ)) / ((1+XY)(1+YZ)(1+ZX))

Expanding the numerator, we see this sum of tans is

(XY^{2}-XZ^{2}+YZ^{2}-YX^{2}+ZX^{2}-ZY^{2}) / ((1+XY)(1+YZ)(1+ZX))

This numerator factors very nicely as:

(X-Y)(Y-Z)(Z-X) / ((1+XY)(1+YZ)(1+ZX))

which is exactly equal to the product of the three tans.

### More about this puzzle

If you think of triangle ABC as being composed of three vectors, then each of

the three angles is the pairwise difference of the arguments of the three

vectors, then you can see from this identity that

tan(A)+tan(B)+tan(C) = tan(A) tan(B) tan(C)

The proof of this starts with tan(-A) = -tan(A) = (tan(B)+tan(C))/(1-tan(B)tan(C)),

so...

(tan(B)+tan(C))/(tan(B) tan(C)-1) = tan(A), so

tan(B)+tan(C) = tan(A) (tan(B) tan(C)-1), so

tan(B)+tan(C) = tan(A) tan(B) tan(C)-tan(A), so

tan(A)+tan(B)+tan(C) = tan(A) tan(B) tan(C),

which strikes me as a simpler proof than the first solution that was given to this problem!