1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Trapezoidal rule error bounds problem

  1. May 5, 2012 #1
    1. The problem statement, all variables and given/known data

    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.


    2. Relevant 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].

    3. 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: May 5, 2012
  2. jcsd
  3. May 5, 2012 #2
    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.
     
  4. May 5, 2012 #3
    Sorry, the equation was wrong. It should be fixed now.
     
  5. May 5, 2012 #4
    That is fine, but you've still computed the individual terms incorrectly. In particular, the third and fourth terms are incorrect.
     
  6. May 5, 2012 #5
    That would do it.. such a stupid mistake, thanks!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Trapezoidal rule error bounds problem
  1. Trapezoidal Rule (Replies: 3)

  2. Trapezoidal Rule (Replies: 3)

Loading...