integrate (2/T)*A*sin(2*pi*t/T+phi) dt from t=0 to T/2