結果 : calculating average value of function over interval