1. Not finding help here? Sign up for a free 30min 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!

Approximate integration

  1. Feb 6, 2005 #1
    I have two similar problems. I need to show that

    1. [tex] \frac{1}{2} \left( T_n + M_n \right) = T_{2n} [/tex]

    2. [tex] \frac{1}{3} T_n + \frac{2}{3} M_n = S_{2n} [/tex]

    where:

    [tex]T[/tex] is the Trapezoidal rule.

    [tex]M[/tex] is the Midpoint rule.

    [tex]S[/tex] is Simpson's rule.

    This is what I've got:

    [tex]T_n = \frac{b-a}{2n}\left[ f\left( x_0 \right) + 2f\left( x_1 \right) + 2f\left( x_2 \right) + \dots + 2f\left( x_{n-2} \right) + 2f\left( x_{n-1} \right) + f\left( x_{n} \right) \right][/tex]

    [tex]T_{2n} = \frac{b-a}{4n}\left[ f\left( x_0 \right) + 2f\left( x_2 \right) + 2f\left( x_4 \right) + \dots + 2f\left( x_{2n-2} \right) + 2f\left( x_{2n-1} \right) + f\left( x_{2n} \right) \right][/tex]

    [tex]M_n = \frac{b-a}{n}\left[ f\left( \bar{x}_1 \right) + f\left( \bar{x}_2 \right) + f\left( \bar{x}_3 \right) + \dots + f\left( \bar{x}_{n} \right) \right][/tex]

    [tex]S_n = \frac{b-a}{3n}\left[ f\left( x_0 \right) + 4f\left( x_1 \right) + 2f\left( x_2 \right) + 4f\left( x_3 \right) + \dots + 4f\left( x_{n-3} \right) + 2f\left( x_{n-2} \right) + 4f\left( x_{n-1} \right) + f\left( x_{n} \right) \right][/tex]

    [tex]S_{2n} = \frac{b-a}{6n}\left[ f\left( x_0 \right) + 4f\left( x_2 \right) + 2f\left( x_4 \right) + 4f\left( x_6 \right) + \dots + 4f\left( x_{2n-3} \right) + 2f\left( x_{2n-2} \right) + 4f\left( x_{2n-1} \right) + f\left( x_{2n} \right) \right][/tex]

    The main difficulty I've had is to deal with the [tex]f\left( \bar{x}_{n} \right)[/tex] terms, since I can't see a way to combine them with the [tex]f\left( x_{n} \right)[/tex] ones.

    Any help is highly appreciated.
     
  2. jcsd
  3. Feb 6, 2005 #2

    Integral

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Express your points [itex] x_0, x_1, ..., x_n [/itex] in terms of the lower limit and the step. So the step is:

    [tex]h= \frac {b -a} n[/tex]

    [tex] x_0 = a [/tex]
    [tex] x_1 = a + h [/tex]
    .
    .
    .
    [tex]x_n = a + nh [/tex]

    Can you do the same for the [itex] \bar {x}_n [/itex]

    You may want to use different symbols for the evaluation points of the different methods. This will help you to deal with the fact that [itex] x_n [/itex] is not the same point for the different methods. Once you have worked out the actual values, in terms af a and h you should be home free.
     
  4. Feb 7, 2005 #3
    Thank you for the tips!!!

    I think I've found the solution to both problems. Here's what I have:

    [tex]T_n = \frac{h}{2}\left\{ f(a) + 2f(a+h) + 2f(a+2h) + \dots + 2f\left[ a + (n-2)h \right] + 2f\left[ a + (n-1)h \right] + f\left( a + nh \right) \right\}[/tex]

    [tex]T_{2n} = \frac{h}{4}\left\{ f(a) + 2 f\left( a + \frac{h}{2} \right) + 2 f\left( a + h \right) + 2 f\left( a + \frac{3h}{2} \right) + \dots + 2 f\left[ a + \frac{(2n-1)h}{2} \right] + f\left( a + nh \right) \right\}[/tex]

    [tex]M_n = h \left\{ f\left( a + \frac{h}{2} \right) + f\left( a + \frac{3h}{2} \right) + f\left( a + \frac{5h}{2} \right) + \dots + f\left[ a + \frac{(2n-3)h}{2} \right] + f\left[ a + \frac{(2n-2)h}{2} \right] + f\left[ a + \frac{(2n-1)h}{2} \right] \right\}[/tex]

    [tex]S_n = \frac{h}{3}\left\{ f(a) + 4 f(a+h) + 2 f(a+2h) + 4 f(a+3h) + \dots + 4 f\left[ a+(n-3)h \right] + 2 f\left[ a+(n-2)h \right] + 4 f\left[ a+(n-1)h \right] + f(a+nh) \right\}[/tex]

    [tex]S_{2n} = \frac{h}{6} \left\{ f(a) + 4 f\left( a + \frac{h}{2} \right) + 2f(a+h) + 4 f\left( a + \frac{3h}{2} \right) + \dots + 2 f\left[ a+\frac{(2n-2)h}{2} \right] + 4 f\left[ a+\frac{(2n-1)h}{2} \right] + f(a+nh) \right\}[/tex]

    To make things a bit simpler, I write them in shorthand notation:

    [tex]T_n = \frac{h}{2}\alpha[/tex]

    [tex]T_{2n} = \frac{h}{4}\beta[/tex]

    [tex]M_n = h \gamma[/tex]

    [tex]S_n = \frac{h}{3}\theta[/tex]

    [tex]S_{2n} = \frac{h}{6}\lambda[/tex]

    So, we have:

    1. [tex]\frac{1}{2}\left( T_n + M_n \right) = T_{2n}[/tex]

    [tex]\frac{1}{2} \left( \frac{h}{2} \alpha + h \gamma \right) = \frac{h}{4}\beta[/tex]

    [tex]\frac{h}{2} \left( \frac{1}{2} \alpha + \gamma \right) = \frac{h}{4}\beta[/tex]

    [tex]\frac{1}{2}\alpha + \gamma = \frac{1}{2}\beta[/tex]

    Thus, we find

    [tex]\frac{1}{2} f(a) + f(a+h) + f(a+2h) + \dots + f\left[ a + (n-2)h \right] + f\left[ a + (n-1)h \right] + \frac{1}{2} f\left( a + nh \right)[/tex]​

    [tex]+[/tex]​

    [tex]f\left( a + \frac{h}{2} \right) + f\left( a + \frac{3h}{2} \right) + f\left( a + \frac{5h}{2} \right) + \dots + f\left[ a + \frac{(2n-1)h}{2} \right][/tex]​


    [tex]=[/tex]​

    [tex]\frac{1}{2} f(a) + f\left( a + \frac{h}{2} \right) + f(a+h) + f\left( a + \frac{3h}{2} \right) + \dots + f\left[ a + \frac{(2n-1)h}{2} \right] + \frac{1}{2} f\left( a + nh \right) [/tex]​

    which verifies the first relationship.

    2. [tex]\frac{1}{3}T_n + \frac{2}{3}M_n = S_{2n}[/tex]

    [tex]\frac{1}{3}\left( \frac{h}{2}\alpha \right) + \frac{2}{3}(h\gamma ) = \frac{h}{6}\lambda [/tex]

    [tex]\frac{h}{6}\alpha + \frac{2h}{3}\gamma = \frac{h}{6}\lambda [/tex]

    [tex]\frac{h}{6} \left( \alpha + 4\gamma \right) = \frac{h}{6}\lambda [/tex]

    [tex]\alpha + 4\gamma = \lambda [/tex]

    Thus, we find

    [tex]f(a) + 2f(a+h) + 2f(a+2h) + \dots + 2f\left[ a + (n-2)h \right] + 2f\left[ a + (n-1)h \right] + f\left( a + nh \right)[/tex]​

    [tex]+[/tex]​

    [tex]4f\left( a + \frac{h}{2} \right) + 4f\left( a + \frac{3h}{2} \right) + 4f\left( a + \frac{5h}{2} \right) + \dots + 4f\left[ a + \frac{(2n-3)h}{2} \right] + 4f\left[ a + \frac{(2n-2)h}{2} \right] + 4f\left[ a + \frac{(2n-1)h}{2} \right][/tex]​

    [tex]=[/tex]​

    [tex]f(a) + 4 f\left( a + \frac{h}{2} \right) + 2f(a+h) + 4 f\left( a + \frac{3h}{2} \right) + \dots + 2 f\left[ a+\frac{(2n-2)h}{2} \right] + 4 f\left[ a+\frac{(2n-1)h}{2} \right] + f(a+nh)[/tex]​

    which verifies the second relationship.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?