mrwall-e
- 54
- 0
Homework Statement
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.
Homework 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|.
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: