Trapezoidal rule error bounds problem

  • Thread starter Thread starter mrwall-e
  • Start date Start date
  • Tags Tags
    Bounds Error
mrwall-e
Messages
54
Reaction score
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:
Physics news on Phys.org
mrwall-e said:
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.

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.
 
Steely Dan said:
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.

Sorry, the equation was wrong. It should be fixed now.
 
mrwall-e said:
Sorry, the equation was wrong. It should be fixed now.

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

That would do it.. such a stupid mistake, thanks!
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top