## The trapezoid rule

Hi. Need some guidance to make the trapezoid rule more effective.

Let $f:[a,b]\to\mathbb{R}$ be a function. I want to find an approximation to the integral

$\int_{a}^b f(x)dx$.

I know that the trapezoid rule is given by

$I_n =h\sum_{i=1}^{2^n} \frac{f(x_{i-1})+f(x_i)}{2}$ where $h=\frac{b-a}{2^n}$.
(Notice that I want $2^n$ trapezoids/parts)

$I_n$ can be rewritten as

$I_n =h[\frac{f(a)+f(b)}{2}+\sum_{i=1}^{2^n -1}f(a+ih)]$.

Ok, now over to the problem. To make the method more effective I use the approximation to integral from $I_{n-1}$ in $I_n$ in this way

$I_n =\frac{I_{n-1}}{2}+h\sum_{i=1}^{2^{n-1}}f(a+(2i-1)h)$.

The part that I dont understand in this new formula is why you just can divide $\frac{I_{n-1}}{2}$? The other part I do understand, because in $I_{n-1}$ you have already calculated $f(x_i)$ where $i$ is even and $i\in[0,2^n]$, so in $I_n$ you only need to calculate $f(x_i)$ with odd indexes $i$.

I hope the problem is clear!? And I hope someone can help me explain and understand this formula. Maby it's a good idea to prove that it works? I dont know how, but maby a hint could help?