# Error in numerical approximation of an integration

1. Aug 23, 2012

### garrus

1. The problem statement, all variables and given/known data
$$a,b\in R, a<b, n\in N\\ h=\frac{b-a}{n} , x_i = a+ih , i=0..n \\ f\in C^1[a,b]$$
we approximate the integral of f in a,b with $Q_n(f) = h\left[f(x_1) + f(x_1) + ... + f(x_n)\right]$
Find the error $R_n(f) = \int_a^bf(x)dx - Q_n(f)$, as function of the first derivative of f, evaluated at a point $k , k \in (a,b)$

3. The attempt at a solution
At problems where the function to be integrated is interpolated, you can get an error estimate from the corresponding error analysis of polynomial interpolation.
If i'm not mistaken, this approximation is adding up rectangles of width h and height $f(x_i)$,
which i guess could be considered as dividing up f in n segments of width h, and interpolating f in each segment by a constant polynomial.
From right to left, since $f(x_0)$ isn't used in the approximation.

The sum of the individual errors in each segment would sum up to the total approximation error of the analytical integration.
However,the error in each segment is an expression of the 1st derivative of f on a point in that segment,that i calculated in another exercise:
$$R(f) = \int_a^bf(x)dx - Q(f) = (\frac{a^2}{2} - b f(b) ) f'(k) , \\k\in (a,b)$$

So the final result will be a sum of factors of the form $c f'(k_i) , k_i \in {x_i,x_i+h} , c\in R$, contradicting the solution form required : a function of $f'(k) , k\in (a,b)$.

Any ideas?