Trapezoidal rule error bounds problem

  • Thread starter Thread starter mrwall-e
  • Start date Start date
  • Tags Tags
    Bounds Error
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 3K views
mrwall-e
Messages
54
Reaction score
0

Homework Statement



a. Use the trapezoidal rule with [itex]n = 4[/itex] subintervals to estimate [itex]\int_0^2 x^2 dx[/itex].

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, [itex]a = 0[/itex], [itex]b = 2[/itex], and [itex]N = 4[/itex].

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

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

[itex]Error(T_N) = |T_N - \int_a^b f(x) dx|[/itex].

The Attempt at a Solution



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

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

c. [itex]\int_0^2 x^2 dx = 2.6667[/itex].

d. [itex]Error(T_N) = |1.9375 - 2.6667| = .7292[/itex], 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 [itex]Δx = \frac{2 - 0}{4} = \frac{1}{2}[/itex]. Therefore, [itex]T_N = \frac{1}{2}*\frac{1}{2}(0 + \frac{1}{2} + 1 + 2 \frac{1}{4} + 4) = 1.9375[/itex].

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 [itex]x = 0[/itex] as the first term but the first term in the sum is [itex]n = 1[/itex], 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 [itex]x = 0[/itex] as the first term but the first term in the sum is [itex]n = 1[/itex], 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!