trapezoidal approximation for calculating relay bias