AP Calculus'ta average value of a function