How can I show that $$\int_{-M}^M \sin (\pi \frac{x+M}{2M})\sin(n \pi \frac{x+M}{2M}) \text{d} x = 0$$ for $M>0$ and $n>1$.
In my mind there should be a way to use that those sine's are eigenfunctions of the laplacian with dirichlet boundary conditions.
We assume that $n \geq 2$.
Make the change of variable $x=Mu$. We have now to establish that
$$\int_{-1}^1 \sin (\pi\frac{u}{2} + \frac{\pi}{2})\sin(n\pi\frac{u}{2} + n\frac{\pi}{2}) \text{d}u = 0$$
which is equivalent to show that, up to unimportant factors:
$$\int_{-1}^1 \cos (\pi \frac{u}{2})\begin{cases}\cos(n \pi \frac{u}{2}) \text{if n odd}\\\sin(n \pi \frac{u}{2}) \text{if n even} \end{cases} \text{d}u = 0$$
The second case is immediate (integration of an odd function on a symmetrical interval with respect to the origin).
For the first case, use relationship:
$$\cos(u)\cos(v)=\tfrac12(\cos(u+v)+\cos(u-v))$$
Up to you...