Question regarding $f(n)=\cot^2\left(\frac\pi n\right)+\cot^2\left(\frac{2\pi}n\right)+\cdots+\cot^2\left(\frac{(n-1)\pi}n\right)$

$$f(n)=\cot^2\left(\frac\pi n\right)+\cot^2\left(\frac{2\pi}n\right)+\cdots+\cot^2\left(\frac{(n-1)\pi}n\right)$$ then how to find limit of $\dfrac{3f(n)}{(n+1)(n+2)}$ as $n$ tends to infinity?

I don’t know any series like that. Riemann sum is not working. What to do?

Update:FYI this appeared in my FIITJEE AITS (JEE MAIN) PAPER 2 FOR 2016.

Solutions Collecting From Web of "Question regarding $f(n)=\cot^2\left(\frac\pi n\right)+\cot^2\left(\frac{2\pi}n\right)+\cdots+\cot^2\left(\frac{(n-1)\pi}n\right)$"

Recall the expansion: $$\begin{align}\tan nx &= \dfrac{\binom{n}{1}\tan x – \binom{n}{3}\tan^3 x + \cdots }{1-\binom{n}{2}\tan^2 x + \binom{n}{4}\tan^4 x + \cdots } \\&= \frac{\binom{n}{1}\cot^{n-1} x – \binom{n}{3}\cot^{n-3} x + \cdots }{\cot^{n} x – \binom{n}{2}\cot^{n-2} x + \binom{n}{4}\cot^{n-4} x + \cdots }\end{align}$$

Now, $\displaystyle \left\{\frac{k\pi}{n}\right\}_{k=1}^{n-1}$ are the roots of the equation: $\displaystyle \tan nx = 0$

Thus, $\displaystyle \binom{n}{1}\cot^{n-1} x – \binom{n}{3}\cot^{n-3} x + \cdots = 0$ whenever, $x = \dfrac{k\pi}{n}$ for $1 \le k \le n-1$.

Thus, using Vieta’s formula we might write:

$$\begin{align*}\sum\limits_{k=1}^{n-1} \cot^2 \frac{k\pi}{n} &= \left(\sum\limits_{k=1}^{n-1} \cot \frac{k\pi}{n}\right)^2 – 2\sum\limits_{1 \le k_1 < k_2 \le n-1} \cot \frac{k_1\pi}{n}\cot \frac{k_2\pi}{n}\\&= 0 + 2\frac{\binom{n}{3}}{\binom{n}{1}}\\&= \frac{(n-1)(n-2)}{3}\end{align*}$$