Assuming n is an integer, integrate sin^2(n*pi*x/L) from 0 to L