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!

Expressing Integral as Reimann Sum

  1. Nov 21, 2013 #1

    Qube

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data

    Express the integral of (sinx + 1) dx over the interval [0,pi] with a Reimann Sum using 4 subintervals of equal width and letting x_i^* be the left endpoint of the subinterval [x_(i-1), x_i]

    2. Relevant equations

    Δx = [b-a] / n

    3. The attempt at a solution

    Δx = pi/4.

    The Reimann sum is

    (pi/4)Ʃ(1 + sin (pi/4)i) with i = 0 and the upper bound being N-1 or 3.

    Is this correct?
     
  2. jcsd
  3. Nov 21, 2013 #2

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Yes, that is correct.

    The Reimann sum is

    (pi/4)Ʃ(1 + sin (pi/4)i) with i = 0 and the upper bound being N-1 or 3.[/quote]
    What you have written is not correct but it may be just bad notation. Dividing [0, pi] into four equal intervals and taking x to be the left endpoint, the values of x would be 0, pi/4, pi/2, and 3 pi/4 (which would be (pi/4)i for i equal to 0, 1, and 2) or [tex](\pi/4)\sum_{i= 0}^3 (1+ sin((pi/4)i)[/tex] which, personally, I would just write as (pi/4)((1)+ (2)+ (1)+ (-1))= 3pi/4.

    Do you see the difference? You have "sin(pi/4)i" which, for i from 0 to 3 is 0(sin(pi/4))+ 1(sin(pi/4) 2(sin(pi/4))+ 3(sin(pi4). That is, you have the "i" outside the "sin(pi/4)"- sin(pi/4) times i rather than sine of "pi/4 times i".

    Is this correct?[/QUOTE]
     
  4. Nov 21, 2013 #3

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Yes, that is correct.

    What you have written is not correct but it may be just bad notation. Dividing [0, pi] into four equal intervals and taking x to be the left endpoint, the values of x would be 0, pi/4, pi/2, and 3 pi/4 (which would be (pi/4)i for i equal to 0, 1, and 2) or [tex](\pi/4)\sum_{i= 0}^3 (1+ sin((pi/4)i)[/tex] which, personally, I would just write as (pi/4)((1)+ (2)+ (1)+ (-1))= 3pi/4.

    Do you see the difference? You have "sin(pi/4)i" which, for i from 0 to 3 is 0(sin(pi/4))+ 1(sin(pi/4) 2(sin(pi/4))+ 3(sin(pi4). That is, you have the "i" outside the "sin(pi/4)"- sin(pi/4) times i rather than sine of "pi/4 times i".
     
  5. Nov 22, 2013 #4

    Qube

    User Avatar
    Gold Member

    I see now. The i should be inside the sine function.

    Am I correct that the i refers to the subintervals? I know that N refers to the number of sub-intervals; so i just refers to which sub interval we're talking about, correct? Like i = 0 refers to the left endpoint of the first sub-interval and so on to i = N referring to the right endpoint of the last sub-interval.

    Something like this?

    https://scontent-b-mia.xx.fbcdn.net/hphotos-frc3/v/1441369_10201128827724538_205517185_n.jpg?oh=0a1438fcfb7b95a530d0f60982eac16f&oe=52915B86
     
  6. Nov 22, 2013 #5

    Student100

    User Avatar
    Education Advisor
    Gold Member

    What does [itex] f(x_i)\Delta x [/itex] give you?

    You should also draw your rectangles better than that. :wink:
     
  7. Nov 22, 2013 #6

    Qube

    User Avatar
    Gold Member

    That's the area of the rectangle (height * width).
     
  8. Nov 22, 2013 #7

    Student100

    User Avatar
    Education Advisor
    Gold Member

    Okay, so you know that [itex] f(x_i) [/itex] is your height, given a point [itex] x_i [/itex] and that [itex] \Delta x [/itex] gives you the width.

    So yes, technically you can think of each index in the summation as a point on the x-axis and a height given by [itex] f(x_i) [/itex] that breaks the function up into subintervals.

    You do know that picture is wrong right?
     
  9. Nov 22, 2013 #8

    Qube

    User Avatar
    Gold Member

    How is the picture wrong? Apart from the fact I didn't draw rectangles?

    Also thanks for clarifying. I stands for index. I forgot that.
     
  10. Nov 22, 2013 #9

    Student100

    User Avatar
    Education Advisor
    Gold Member

    That’s what I meant. :tongue2:


    i is just a dummy variable, i, j, k, whichever you use they all stand for index. The value you start at is lower limit of summation, and n is the upper limit.
     
  11. Nov 22, 2013 #10

    Qube

    User Avatar
    Gold Member

    Awesome, makes sense! Thanks again!
     
  12. Nov 22, 2013 #11

    Qube

    User Avatar
    Gold Member

    Can x_i^* also be expressed as i*Δx, where i is the index of summation? I find this form easier to work with.

    Also, how do I determine the bounds of integration given a Reimann sum? I know that [b-a]/n = Δx but what's my a and b?
     
  13. Nov 22, 2013 #12

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The a and b are the limits in the integral you are approximating$$
    \int_a^b f(x) ~dx$$
     
  14. Nov 22, 2013 #13

    Student100

    User Avatar
    Education Advisor
    Gold Member

    [itex] x_i^* [/itex] can be chosen arbitrary in the sub intervals. However, it's customary to choose the left end point, right end point or midpoint.

    [itex] x_i^* = x_{i-1}= a + (i -1) \Delta x [/itex] for the left endpoint
    [itex] x_i^* = x_i = a + i \Delta x [/itex] for the right.

    Now if delta x is equal to say 1/n than i* delta x is correct for the right endpoint , is this true for the left end point?
     
  15. Nov 22, 2013 #14

    Qube

    User Avatar
    Gold Member

    Seems like it should be as long as we start with the correct value of i (0).
     
  16. Nov 22, 2013 #15

    Student100

    User Avatar
    Education Advisor
    Gold Member

    Yep. Just make sure you start with the correct value.

    A and b is the interval of your definite integral ...


    [tex] \int_a^b f(x) dx = \lim_{max \Delta x_i \rightarrow 0 } \sum _{i= 1}^n f(x_i^*) \Delta x_i [/tex]

    For your HW example you'd have [tex] \int_0^\pi (sin x + 1) dx [/tex]
     
    Last edited: Nov 22, 2013
  17. Nov 23, 2013 #16

    Qube

    User Avatar
    Gold Member

    Definitely. I kept what you mentioned in mind today and I stumbled upon this problem (upper bound of integral is 5; got cut off, sorry).

    http://i.minus.com/jbrTfeyOpuB4ky.png [Broken]

    i is not 0 in this case. Nor is it 1. We have to consider i within the context of each problem. We're talking about 4 subintervals of equal width here, and we're talking about midpoints here. Given the interval and upon calculating Δx, I knew that i should start at 1.5 and end at 4.5. That way we get 4 subintervals each of width 1.

    Thanks so much :).
     
    Last edited by a moderator: May 6, 2017
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Expressing Integral as Reimann Sum
  1. Reimann sums (Replies: 1)

Loading...