# Expressing Integral as Reimann Sum

Gold Member

## 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]

Δ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?

Homework Helper

## 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]

Δ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 $$(\pi/4)\sum_{i= 0}^3 (1+ sin((pi/4)i)$$ 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]

• 1 person
Homework Helper

## 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]

Δ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 $$(\pi/4)\sum_{i= 0}^3 (1+ sin((pi/4)i)$$ 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".

• 1 person
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

Gold Member
What does $f(x_i)\Delta x$ give you?

You should also draw your rectangles better than that. • 1 person
Gold Member
That's the area of the rectangle (height * width).

Gold Member
Okay, so you know that $f(x_i)$ is your height, given a point $x_i$ and that $\Delta x$ 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 $f(x_i)$ that breaks the function up into subintervals.

You do know that picture is wrong right?

• 1 person
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.

Gold Member
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.

• 1 person
Gold Member
Awesome, makes sense! Thanks again!

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?

Homework Helper
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?

The a and b are the limits in the integral you are approximating$$\int_a^b f(x) ~dx$$

• 1 person
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?

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

$x_i^* = x_{i-1}= a + (i -1) \Delta x$ for the left endpoint
$x_i^* = x_i = a + i \Delta x$ 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?

• 1 person
Gold Member
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).

Gold Member
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 ...

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

For your HW example you'd have $$\int_0^\pi (sin x + 1) dx$$

Last edited:
• 1 person
Gold Member
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: