I'm trying to solve the following integral:
$\int_0^1 (sin(n\pi x)sin(m\pi x))dx$
for $m\neq n$ and $m=n$. knowing that:
$sin(n\pi x)sin(m\pi x)=\frac{1}{2}cos((n-m)\pi x) - \frac{1}{2}cos((n+m)\pi x)$
and integrating I obtain the following result:
$\int_0^1(\frac{1}{2}cos((n-m)\pi x) - \frac{1}{2}cos((n+m)\pi x)) = \frac{sin((n-m)\pi x)}{2\pi(n-m)}-\frac{sin((n+m)\pi x)}{2\pi(n+m)}$
I can see how this will be zero for $m\neq n$. Both $m$ and $n$ are positive integers. So for all combinations of $m$ and $n$ and for $x=0,1$, $sin((n-m)\pi x)$ and $sin((n+m)\pi x)$ will be $0$.
But for the case of $m=n$ the integral should be $1$ (I think), but won't $m=n$ result in an indefinite case because you're dividing by $0$? What am I missing?
If $m=n$ then you know, from your own formulas, that$$\sin^2(n\pi x)=\frac12-\frac12\cos(2n\pi x).$$So, the integral is easy to compute. And it won't be $0$.