othogonality of chebychev polynomials Let the chebyshev polynomials be defined as :

with zeros :

My goal is to show that the family of polynomials :

are orthogonal with respect to 
where :

To achieve this we show :
 

However there is something wrong with the proof, the last expression
fails for m odd and doesn't yield 0 as expected.
Could anyone help me spot the mistake and how to correct it ?
 A: Note that in this question, $m=k\pm l$ for distinct $k,l\in\{0,1,..n\}$.
When they compute the sum, they don't put the $e^{\frac{im\pi}{2(n+1)}}$ back in before taking real parts. The interior ought to end up as $\Re(e^{\frac{im\pi}{2}}\frac{\sin(\frac{m\pi}{2})}{\sin\frac{m\pi}{2(n+1)}})$, which does vanish for odd $m$ as well.
Proof: After using the geometric series formula, we have $\Re\left(e^{\frac{im\pi}{2(n+1)}}\frac{1-e^{im\pi}}{1-e{\frac{im\pi}{2(n+1)}}}\right)$.
Applying $1-e^{i\theta}=-2ie^{i\theta/2}\sin(\frac{\theta}{2})$, this collapses to $\Re(e^{\frac{im\pi}{2}}\frac{\sin(\frac{m\pi}{2})}{\sin\frac{m\pi}{2(n+1)}})$.
If $m$ is even, the $\sin$ term vanishes. If $m$ is odd, the complex term at the start of the brackets is $\pm i$, so the whole expression is imaginary, hence has $0$ real part.
A: The formula $\sum_{k=0}^{n} x^{k} = \frac{1 - x^{n+1}}{1-x}$ holds for all $x \neq 1$. That means that the argument given only holds for $m$ such that $e^{im\pi/(n+1)} \neq 1$. For an explicit counterexample to the claim following "It is enough to show that..." choose $n=0$, $m=2$. Then the sum is equal to $\cos(\pi) = -1$.
However, with $m \in \{1,...,2n\}$ (and not just for any $m \in \mathbb{Z}^*$ as claimed) we always have $e^{im\pi/(n+1)} \neq 1$, and $\pi r 8$'s answer proves the orthogonality. 
