# Trapezoidal rule error bounds problem

1. May 5, 2012

### mrwall-e

1. The problem statement, all variables and given/known data

a. Use the trapezoidal rule with $n = 4$ subintervals to estimate $\int_0^2 x^2 dx$.

b. Use the error bound to find the bound for the error.

c. Compute the integral exactly.

d. Verify the error is no more than the error bound.

2. Relevant equations

Here, based on the problem, $a = 0$, $b = 2$, and $N = 4$.

$T_N = \frac{1}{2} Δx(f(x_0) + 2f(x_1) + ... + 2f(x_{N - 1}) + f(x_N))$ where $Δx = \frac{b - a}{N}$ and $x_i = a + iΔx$.

$Error(T_N) \leq \frac{K_2(b - a)^3}{12N^2}$ where $f''(x) \leq K_2$ for $x \in [a, b]$.

$Error(T_N) = |T_N - \int_a^b f(x) dx|$.

3. The attempt at a solution

a. I calculated $Δx = \frac{2 - 0}{4} = \frac{1}{2}$. Therefore, $T_N = \frac{1}{2}*\frac{1}{2}(0 + \frac{1}{2} + 1 + 2 \frac{1}{4} + 4) = 1.9375$.

b. Since $f''(x) = 2$, I used $K_2 = 2$. So therefore, $Error(T_N) \leq \frac{2*(2)^3}{12(4)^2} = \frac{1}{12} = .0833$.

c. $\int_0^2 x^2 dx = 2.6667$.

d. $Error(T_N) = |1.9375 - 2.6667| = .7292$, which is definitely outside the error bound.

What did I do wrong?

Thanks for any help, I really appreciate it.

Last edited: May 5, 2012
2. May 5, 2012

### Steely Dan

You have five terms here, but by your definition of the trapezoid sum there can only be four terms in the sum, which indicates that you have incorrectly applied the definition. You used $x = 0$ as the first term but the first term in the sum is $n = 1$, not 0.

3. May 5, 2012

### mrwall-e

Sorry, the equation was wrong. It should be fixed now.

4. May 5, 2012

### Steely Dan

That is fine, but you've still computed the individual terms incorrectly. In particular, the third and fourth terms are incorrect.

5. May 5, 2012

### mrwall-e

That would do it.. such a stupid mistake, thanks!