update to Function (adaptive quadrature)