# Trig sum: $\tan ^21^\circ+\tan ^22^\circ+\cdots+\tan^2 89^\circ = \text{?}$

As the title suggests, I'm trying to find the sum $$\tan^21^\circ+\tan^2 2^\circ+\cdots+\tan^2 89^\circ$$ I'm looking for a solution that doesn't involve complex numbers, or any other advanced branch in maths. The solution can involve techniques such as induction, telecoping, etc, but preferably only ideas from precalculus, e.g. trig identities, polynomials, etc.

EDIT: I know that the sum is a rational number.

• Are you sure the sum is rational? How do you know? Sep 29 '14 at 19:44
• But how would your calculator have given an irrational sum? Wolfram Alpha gives $265.0173714620087662428704848470169312673078166104585039010061...$, which looks fairly irrational to me, in this context. Sep 29 '14 at 19:48
• I converted to radians, for Wolfram Alpha's benefit. The sum is unchanged. Sep 29 '14 at 19:49
• One thing to try: instead of doing the "special" case where you're looking at degrees, can you find a formula for $\sum_{k=1}^{n-1} \tan^2 {k \pi \over 2n}$, where the angles are in radians? Your question is the $n = 90$ case of this. If you try small integer values of $n$ it's not terribly hard to conjecture a formula. Sep 29 '14 at 20:03
• Also, possibly relevant SE links: math.stackexchange.com/questions/217240/…, math.stackexchange.com/questions/2339/… , although I'm not sure if any of the proofs here satisfy your requirements - this problem seems very naturally to live in the complex numbers. Sep 29 '14 at 20:04

$$\tan180x=\frac{\binom{180}1t-\binom{180}3t^3+\cdots+\binom{180}{177}t^{177}-\binom{180}{179}t^{179}}{1-\binom{180}2t^2+\cdots-\binom{180}{178}t^{178}+\binom{180}{180}t^{180}}$$ where $t=\tan x$

If we set $\tan180x=0,180x=180^\circ r$ where $r$ is any integer

$\implies x=r^\circ$ where $0\le r<180$

So, the roots of $\binom{180}1t-\binom{180}3t^3+\cdots+\binom{180}{177}t^{177}-\binom{180}{179}t^{179}=0$ $\iff\binom{180}{179}t^{179}-\binom{180}{177}t^{177}+\cdots+\binom{180}3t^3-\binom{180}1t=0$ are $\tan r^\circ$ where $0\le r<180,r\ne90$ ($r=90$ corresponds to the denominator $=\infty$)

So, the roots of $\binom{180}{179}t^{178}-\binom{180}{177}t^{176}+\cdots+\binom{180}3t^2-\binom{180}1=0$ are $\tan r^\circ$ where $0<r<180,r\ne90$

So, the roots of $\binom{180}{179}u^{89}-\binom{180}{177}u^{88}+\cdots+\binom{180}3u-\binom{180}1=0$ are $\tan^2r^\circ$ where $0<r<90$

Using Vieta's formula, $\sum_{r=1}^{89}\tan^2r^\circ=\dfrac{\binom{180}{177}}{\binom{180}{179}}$

• To add on to your beautiful answer, the solution can be rewritten somewhat more tangibly as: $$\dfrac{\frac{180\cdot 179\cdot 178}{6}}{\frac{180}{1}} = \frac{15931}{3}.$$ Sep 30 '14 at 3:59
• @CameronWilliams, I actually left it for the user:) Sep 30 '14 at 4:00
• My apologies. Guess I'll delete it then. Sep 30 '14 at 4:01
• @AnalysisIncarnate, I've a predilection for this method. Thanks for relating the two. Sep 30 '14 at 8:56

The function $$\frac{180/z}{z^{180}-1}$$ has residue $1$ at each root of $z^{180}-1$ $\left(\text{i.e. }e^{k\pi i/90}\text{ for }k=0\dots179\right)$ and residue $-180$ at $z=0$.

On $|z|=1$, $$\tan(\theta/2)=-i\frac{z-1}{z+1}$$ Integrating $$f(z)=-\left(\frac{z-1}{z+1}\right)^2\frac{180/z}{z^{180}-1}$$ around a large circle is $0$ since the integrand is approximately $|z|^{-181}$. Thus, the sum of residues is $$2\sum_{k=0}^{89}\tan^2\left(\frac{k\pi}{180}\right)+\operatorname*{Res}_{z=0}f(z)+\operatorname*{Res}_{z=-1}f(z)=0$$ Since $\operatorname*{Res}\limits_{z=0}f(z)=180$ and $\operatorname*{Res} \limits_{z=-1}f(z)=-\frac{32402}{3}$, we get \begin{align} \sum_{k=0}^{89}\tan^2\left(\frac{k\pi}{180}\right) &=\frac12\left(\frac{32402}{3}-180\right)\\ &=\frac{15931}{3} \end{align}

This same method also gives $$\sum_{k=0}^{89}\tan^4\left(\frac{k\pi}{180}\right)=\frac{524560037}{45}$$ and $$\sum_{k=0}^{89}\tan^6\left(\frac{k\pi}{180}\right)=\frac{4855740968543}{135}$$

• Ah, I just saw the part of the question that mentions no complex methods. I will leave this, anyway, as a comparison. $\dfrac{n/z}{z^n-1}$ is a useful function to evaluate sums on $\mathbb{Z}/n\mathbb{Z}$.
– robjohn
Oct 2 '14 at 6:01
• I've found this excellent answer via an answer to my question at math.stackexchange.com/questions/1877014/… -- handy trick, thanks! However, it seems this works only since $z\mapsto\tan(\arg z)$ is analytic (outside of its poles), which doesn't generalize to other sums, for instance involving $\sin$. Am I wrong? Aug 1 '16 at 17:02
• @heiner: $\sin(\theta)=\frac1{2i}\left(z-\frac1z\right)$ on the unit circle, so you could use that.
– robjohn
Aug 1 '16 at 17:37