Solution:
Key idea: For ab<1, tan−1a+tan−1b=tan−11−aba+b. We add the terms two at a time, checking the condition each time.
Step 1 — Add the first two terms.
For a=21 and b=51 the product is 101, which is less than 1, so the formula applies.
tan−121+tan−151=tan−11−10121+51
tan−121+tan−151=tan−1109107
tan−121+tan−151=tan−197
Step 2 — Add the third term.
Now a=97 and b=81, with product 727, again less than 1. We use the common denominator 72.
tan−197+tan−181=tan−11−72797+81
tan−197+tan−181=tan−172657265
tan−197+tan−181=tan−11
Step 3 — Evaluate tan−11.
The angle in (−2π,2π) whose tangent is 1 is 4π.
tan−11=4π
Therefore, tan−121+tan−151+tan−181=4π, as required.