Let $m$ be a natural number. Calculate $\sum_{k=1}^{m} \frac{1}{\sin ^{2} \frac{k \pi}{2 m+1}}$ and $\sum_{k=1}^{m} \cot ^{2} \frac{k \pi}{2 m+1}$.

Deduce $\sum_{k=1}^{\infty} \frac{1}{k^{2}}=\frac{\pi^{2}}{6}$. (Use $\cot \theta \leqslant \frac{1}{\theta} \leqslant \frac{1}{\sin \theta}$ when $0<\theta<\frac{\pi}{2}$.)
There exists a polynomial $P$ of degree $2m+1$ such that $P(\sin \theta) = \sin (2m+1) \theta$ for all $\theta$. To see this, we observe that $\sin (2m+1) \theta$ is the imaginary part of $(\cos \theta + i \sin \theta)^{2m+1}$, which is also

$$
\sum_{k=0}^{m}\binom{2m+1}{2k}(-1)^{m-k} \cos^{2k} \theta \sin^{2(m-k)+1} \theta
$$

Replacing $\cos^{2k} \theta$ with $\left(1 - \sin^2 \theta\right)^k$, we obtain $P$. Specifically, we have

$$
P(x) = \sum_{k=0}^{m}\binom{2m+1}{2k}(-1)^{m-k} \left(1 - x^2\right)^k x^{2(m-k)+1}
$$

(The existence of $P$ can also be proven by induction on $m$.) We verify that $P$ is an odd polynomial of degree $2m+1$. If we write $P(x) = a_1 x + a_3 x^3 + \cdots$, we verify, using the formula above,

$$
a_1 = \binom{2m+1}{2m} = 2m+1 \quad \text{and} \quad a_3 = -\binom{2m+1}{2m-2} - \binom{2m+1}{2m} \binom{m}{1} = -\frac{2}{3} m(m+1)(2m+1)
$$

Furthermore, for any integer $k$ between $-m$ and $m$, the real number $\sin \frac{k \pi}{2m+1}$ is a root of $P$. Thus, we have $2m+1$ distinct roots, which constitute all the roots of $P$. Moreover, observing that $P$ is odd, we can write:

$$
P(x) = x \prod_{k=1}^{m} \left(x^2 - \sin^2 \frac{k \pi}{2m+1}\right) = a_1 x + a_3 x^3 + \cdots
$$

By expanding, we obtain expressions for $a_1$ and $a_3$: up to a sign, $a_1$ is the product of the $\sin^2 \frac{k \pi}{2m+1}$, and $a_3$ is the sum of the $m$ products consisting of $m-1$ factors among the $\sin^2 \frac{k \pi}{2m+1}$. Finally,

$$
\sum_{k=1}^{m} \frac{1}{\sin^2 \frac{k \pi}{2m+1}} = -\frac{a_3}{a_1} = \frac{2m(m+1)}{3}
$$

Furthermore, with $\cot^2 \theta = \frac{1}{\sin^2 \theta} - 1$, we have

$$
\sum_{k=1}^{m} \cot^2 \frac{k \pi}{2m+1} = \frac{2m(m+1)}{3} - m = \frac{m(2m-1)}{3}
$$

We leave it to the reader to justify the inequalities mentioned in the statement. They imply

$$
\frac{m(2m-1)}{3} = \sum_{k=1}^{m} \cot^2 \frac{k \pi}{2m+1} \leqslant \sum_{k=1}^{m} \frac{(2m+1)^2}{k^2 \pi^2} \leqslant \sum_{k=1}^{m} \frac{1}{\sin^2 \frac{k \pi}{2m+1}} = \frac{2m(m+1)}{3}
$$

and thus

$$
\frac{m(2m-1) \pi^2}{3(2m+1)^2} \leqslant \sum_{k=1}^{m} \frac{1}{k^2} \leqslant \frac{2m(m+1) \pi^2}{3(2m+1)^2}
$$

We conclude by letting $m$ tend to infinity: both bounds of the inequality tend to $\pi^2 / 6$, and the central term also tends to $\pi^2 / 6$ by the squeeze theorem.