integrate 0.5*(A*w*sin(k*x))^2*q