• Support PF! Buy your school textbooks, materials and every day products Here!

Expressing Integral as Reimann Sum

  • Thread starter Qube
  • Start date
  • #1
Qube
Gold Member
460
1

Homework Statement



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]

Homework Equations



Δx = [b-a] / n

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?
 

Answers and Replies

  • #2
HallsofIvy
Science Advisor
Homework Helper
41,833
956

Homework Statement



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]

Homework Equations



Δx = [b-a] / n

The Attempt at a Solution



Δx = pi/4.
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]
 
  • Like
Likes 1 person
  • #3
HallsofIvy
Science Advisor
Homework Helper
41,833
956

Homework Statement



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]

Homework Equations



Δx = [b-a] / n

The Attempt at a Solution



Δx = pi/4.
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.
Is this 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".
 
  • Like
Likes 1 person
  • #4
Qube
Gold Member
460
1
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
 
  • #5
Student100
Education Advisor
Gold Member
1,649
416
What does [itex] f(x_i)\Delta x [/itex] give you?

You should also draw your rectangles better than that. :wink:
 
  • Like
Likes 1 person
  • #6
Qube
Gold Member
460
1
That's the area of the rectangle (height * width).
 
  • #7
Student100
Education Advisor
Gold Member
1,649
416
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?
 
  • Like
Likes 1 person
  • #8
Qube
Gold Member
460
1
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.
 
  • #9
Student100
Education Advisor
Gold Member
1,649
416
Apart from the fact I didn't draw rectangles?
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.
 
  • Like
Likes 1 person
  • #10
Qube
Gold Member
460
1
Awesome, makes sense! Thanks again!
 
  • #11
Qube
Gold Member
460
1
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?
 
  • #12
LCKurtz
Science Advisor
Homework Helper
Insights Author
Gold Member
9,544
756
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?
The a and b are the limits in the integral you are approximating$$
\int_a^b f(x) ~dx$$
 
  • Like
Likes 1 person
  • #13
Student100
Education Advisor
Gold Member
1,649
416
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?
[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?
 
  • Like
Likes 1 person
  • #14
Qube
Gold Member
460
1
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?
Seems like it should be as long as we start with the correct value of i (0).
 
  • #15
Student100
Education Advisor
Gold Member
1,649
416
Seems like it should be as long as we start with the correct value of i (0).
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:
  • Like
Likes 1 person
  • #16
Qube
Gold Member
460
1
Yep. Just make sure you start with the correct value.
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:

Related Threads on Expressing Integral as Reimann Sum

Replies
1
Views
1K
  • Last Post
Replies
2
Views
1K
Replies
1
Views
3K
Replies
4
Views
381
  • Last Post
Replies
1
Views
2K
Replies
2
Views
2K
  • Last Post
Replies
6
Views
1K
  • Last Post
Replies
6
Views
896
Replies
2
Views
1K
  • Last Post
Replies
3
Views
1K
Top