Results 1 to 6 of 6

Math Help - Figuring out the Trapezoidal rule

  1. #1
    Member
    Joined
    Oct 2011
    Posts
    153

    Figuring out the Trapezoidal rule

    Hi, I think I'm average on the trapezoidal rule right now, but there is one thing I'm a bit confused about.
    Ok so I know the trapezoidal rule is abf(x)dx=(b-a)/2n [f(x0) + 2f(x1) and so on]

    Though I'm a bit confused on it.
    I'll give some examples:
    02x3dx, n=4, so I know that it moves up 1/2 each up
    So it's like this (2-0)/2(4)[0+2(1/2)3 until (2)3], I know the answer to this, but I was wondering why does it start off with 0

    Another example is:
    12(1/(x+1)2) dx, n=4, and it starts off with (1/4) + 2(1/(5/4)+1)2) and so on
    Like here I'm a bit confused why it starts off with 1/4, when n is equal to 4, but then it goes up to 5 things inside the brackets [ ]
    Like it started with 1/4 by itself, then went onto the function with 5/4, so can someone explain how does it start off exactly.

    One more example is:
    01√x√(1-x) dx, n=4, and the change in x is 1/4
    But it starts off with 0 + 2√(1/4)(1-1/4) and so on...

    So yeah, I know that after the starting thing inside the bracket goes through the pattern, but I was wondering how does it start off. At first I just though it started off with the pattern, but when I saw like the 3rd example started off with a 0, then went onto x1 then x2 then x3, etc.

    Thanks.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Jun 2012
    From
    AZ
    Posts
    616
    Thanks
    97

    Re: Figuring out the Trapezoidal rule

    Quote Originally Posted by Chaim View Post
    I know the answer to this, but I was wondering why does it start off with 0
    0^3 is 0.

    I can't make a whole lot of sense out of your questions, but you seem to be applying the formula without knowing where it came from. The "formula" for the trapezoidal rule can be derived by simply drawing a function f(x) from x = a to x = b and splitting it into several trapezoids. By simply using geometry to find the area of each trapezoid, we will obtain

    \int_{a}^{b} f(x) \,dx \approx \sum_{i = 1}^{n} \frac{1}{2}(x_i - x_{i-1})(f(x_i) + f(x_{i-1})). Here, x_i - x_{i-1} is the "height" of each trapezoid, and f(x_i) + f(x_{i-1}) is just the sum of the two bases of the trapezoid (this is why we get the coefficients of 1,2,2,...,2,1).

    In the case where the x_i's are evenly spaced, the sum \sum_{i = 1}^{n} x_i - x_{i-1} will telescope to x_n - x_0, which is just b-a, so x_i - x_{i-1} = \frac{b-a}{n}, which is constant. Substitute that into the summation to obtain the formula.
    Last edited by richard1234; January 15th 2013 at 07:53 PM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Oct 2011
    Posts
    153

    Re: Figuring out the Trapezoidal rule

    Quote Originally Posted by richard1234 View Post
    0^3 is 0.

    I can't make a whole lot of sense out of your questions, but you seem to be applying the formula without knowing where it came from. The "formula" for the trapezoidal rule can be derived by simply drawing a function f(x) from x = a to x = b and splitting it into several trapezoids. By simply using geometry to find the area of each trapezoid, we will obtain

    \int_{a}^{b} f(x) \,dx \approx \sum_{i = 1}^{n} \frac{1}{2}(x_i - x_{i-1})(f(x_i) + f(x_{i-1})). Here, x_i - x_{i-1} is the "height" of each trapezoid, and f(x_i) + f(x_{i-1}) is just the sum of the two bases of the trapezoid (this is why we get the coefficients of 1,2,2,...,2,1).

    In the case where the x_i's are evenly spaced, the sum \sum_{i = 1}^{n} x_i - x_{i-1} will telescope to x_n - x_0, which is just b-a, so x_i - x_{i-1} = \frac{b-a}{n}, which is constant. Substitute that into the summation to obtain the formula.
    I think I get what you're saying, but here is an actual example I can provide without needing to type it up (click on the image below this text, looks like a bunch of little scribbles:
    The image is here:Figuring out the Trapezoidal rule-trapezoidal-example1.png
    So you see that it starts off with (1/4), but I'm a bit confused on why is that.
    Then it goes into 5/4, 6/4, then 7/4, then 8/4
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    Joined
    Jun 2012
    From
    AZ
    Posts
    616
    Thanks
    97

    Re: Figuring out the Trapezoidal rule

    Because at x = 1, that expression is equal to 1/4. Same with x = 2, 1/((2+1)^2) = 1/9.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Oct 2011
    Posts
    153

    Re: Figuring out the Trapezoidal rule

    Quote Originally Posted by richard1234 View Post
    Because at x = 1, that expression is equal to 1/4. Same with x = 2, 1/((2+1)^2) = 1/9.
    Oh I see now,
    Thanks

    Yeah, at first I thought to myself "Why isn't it following the pattern and so out of place"
    But I guess I see how come :O I think.
    Last edited by Chaim; January 15th 2013 at 08:35 PM.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member
    Joined
    Jun 2012
    From
    AZ
    Posts
    616
    Thanks
    97

    Re: Figuring out the Trapezoidal rule

    I'm guessing the author didn't want to waste space by putting \frac{1}{(1+1)^2} and \frac{1}{(2+1)^2}...
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Simpsons rule,Trapezoidal rule,check please
    Posted in the Geometry Forum
    Replies: 0
    Last Post: February 16th 2010, 06:06 AM
  2. trapezoidal rule
    Posted in the Calculus Forum
    Replies: 3
    Last Post: December 18th 2008, 11:08 PM
  3. Replies: 0
    Last Post: October 20th 2008, 07:12 PM
  4. Simpsons Rule and Trapezoidal Rule
    Posted in the Calculus Forum
    Replies: 5
    Last Post: July 28th 2008, 03:50 AM
  5. Replies: 3
    Last Post: August 31st 2006, 09:08 AM

Search Tags


/mathhelpforum @mathhelpforum