integrate A*exp(-y^2/B)*cos^2(4*pi*y/L)