Right-Endpoint-Sum is negative? Approximating Areas

In summary: And let me clear this part up also before I confuse myself. Notation is always my weak point:Yes, notation is always my weak point.
  • #1
opus
Gold Member
717
131

Homework Statement


Find ##R_4## for ##g(x)=cos(πx)## on ##[0,1]##

Homework Equations

The Attempt at a Solution


(i) Since we want ##n=4## even sub intervals between ##x=0## and ##x=1##,
intervals are ##[0, \frac{π}{4}]##, ##[\frac{π}{4}, \frac{π}{2}]##, ##[\frac{π}{2}, \frac{3π}{4}]##, ##[\frac{3π}{4}, π]##

(ii) ##\frac{1}{4}\sum_{k=1}^4 cos(πx) = -0.25##
However, the back of the book states that the correct solution is 0.25.

So my question is, do we just take the absolute value of such an answer considering area cannot be negative?
 
Physics news on Phys.org
  • #2
opus said:

Homework Statement


Find ##R_4## for ##g(x)=cos(πx)## on ##[0,1]##

Homework Equations

The Attempt at a Solution


(i) Since we want ##n=4## even sub intervals between ##x=0## and ##x=1##,
intervals are ##[0, \frac{π}{4}]##, ##[\frac{π}{4}, \frac{π}{2}]##, ##[\frac{π}{2}, \frac{3π}{4}]##, ##[\frac{3π}{4}, π]##

(ii) ##\frac{1}{4}\sum_{k=1}^4 cos(πx) = -0.25##
However, the back of the book states that the correct solution is 0.25.

So my question is, do we just take the absolute value of such an answer considering area cannot be negative?
What is ##R_4##? I assume that the answer lies there. I mean ##\int_0^1 \cos(\pi x)\,dx = 0## so both values are equally "wrong". I guess it depends on whether you add above or below ##g(x)##.
 
  • Like
Likes opus
  • #3
Sorry. By ##R_4## I mean the approximate area under a curve when we use the right-most point of the rectangles under the curve.
Please see attached image for a separate example to see what I mean. In terms of actual integral notation, we haven't done that yet for area under a curve, only for antiderivatives, so I am not familiar with how to use that notation in this aspect at this time.
 

Attachments

  • Screen Shot 2018-11-05 at 10.30.56 PM.png
    Screen Shot 2018-11-05 at 10.30.56 PM.png
    15.5 KB · Views: 336
  • #4
Here is exact context to the problem (#13).
 

Attachments

  • Screen Shot 2018-11-05 at 10.33.01 PM.png
    Screen Shot 2018-11-05 at 10.33.01 PM.png
    14.5 KB · Views: 350
  • #5
Beginning to think this is some kind of stepping stone into doing actual calculations for area under a curve and this method isn't worth much so it's probably unfamiliar. Let me spell out what I have done to get the solution after what I posted.

After getting ##\frac{1}{4}\sum_{k=1}^4 cos(πx)##:

## = \frac{1}{4}\left(cos(\frac{π}{4})+cos(\frac{π}{2})+cos(\frac{3π}{4})+cos(π)\right) = -0.25##
 
  • #6
In this case the result is negative. Those sums are normally used to calculate the integral, which is zero here as both parts are of equal size and opposite sign. If the goal is to calculate the area, then ##|\cos (\pi \cdot x)|## should be used instead of ##g(x)##. But as given, you are right. ##L_4 = + \,0.25##
 
  • Like
Likes FactChecker and opus
  • #7
Ok great thank you fresh. It's kind of an odd primer for integrals, as in some cases, evaluating the left-most points gives twice the area as evaluating from the right-most points but that is with a very limited ##n##. It's difficult to double check these answers because I don't think they're real integrals so integral calculators won't be of any use. So thanks for clearing that up for me.
 
  • #8
It would be helpful to have an exact definition. Shouldn't you multiply by the interval length, which is ##\frac{\pi}{4}##?
 
  • #9
Yes what I did was multiply by the interval length (which since the interval is ##[0,1]## and n=4, I stated the interval length to be ##\frac{1}{4}##) and by "Sigma Properties", I just brought that out in front of everything since it is a constant.
I've attached the definition for Right-Endpoint Approximation according to my text.
 

Attachments

  • Screen Shot 2018-11-05 at 11.07.40 PM.png
    Screen Shot 2018-11-05 at 11.07.40 PM.png
    14.6 KB · Views: 307
  • #10
I agree that you are correct and the book answer is wrong.

One nit-pick: Everywhere that you write the summation, you have 'x' where you should have 'k/4'.
 
  • #11
FactChecker said:
I agree that you are correct and the book answer is wrong.

One nit-pick: Everywhere that you write the summation, you have 'x' where you should have 'k/4'.
Interesting. What's the reason for that?
 
  • #12
In ##\Sigma_{k=1}^{k=4} \cos(\pi x)##, the variable ##x## is undefined. You want it to take values of 1/4, 2/4, 3/4, 4/4 when ##k=1,2,3,4##, respectively. That is ##\Sigma_{k=1}^{k=4} \cos(\pi \frac k 4)##.
 
  • Like
Likes opus
  • #13
opus said:
Interesting. What's the reason for that?
##\frac{1}{4}\sum_{k=1}^{4}\cos(\pi x)=\frac{1}{4}\cdot 4 \cdot \cos(\pi x)=\cos(\pi x)## and ##\frac{1}{4}\sum_{k=1}^{4}\cos(\pi \frac{k}{4})=\frac{1}{4}\cdot \cos(\pi \frac{4}{4})=-0.25##
 
  • Like
Likes opus
  • #14
So I must have something mixed up. So let me ask, is ##k## an actual value of ##x##, or is it just like a "number of times to do this" thing like an iteration of sorts?
 
  • #15
##k## is used in two ways. It is the counting index in the summation symbol. But it is also used to calculate the input to the cosine function for each term. That is very common.

It is not the "number of times" to iterate in the summation. That is 4, not ##k##. ##k## is the counting index that goes from 1 to 4.
 
  • Like
Likes opus
  • #16
Ok so then since k is the counting index from 1 to 4, and n = 4, then k is the the number of equal intervals throughout n (assuming regular partition)?

And let me clear this part up also before I confuse myself. Notation is always my weak point:
FactChecker said:
But it is also used to calculate the input to the cosine function for each term.
Say we are doing a summation and we are on something like ##i=2## where ##n=4##. For the ##i=2##, we aren't necessarily evaluated at ##i=2## but using a left-most or right-most point of the second interval that was evenly divided into ##n##? In other words, just because ##i=2##, it isn't always the case that the ##i## acts like an input ##x## that we plug in ##i## to the function and evaluate it.
 
  • #17
opus said:
Ok so then since k is the counting index from 1 to 4, and n = 4, then k is the the number of equal intervals throughout n (assuming regular partition)?

And let me clear this part up also before I confuse myself. Notation is always my weak point:
FactChecker said:
But it is also used to calculate the input to the cosine function for each term.
Say we are doing a summation and we are on something like ##i=2## where ##n=4##. For the ##i=2##, we aren't necessarily evaluated at ##i=2## but using a left-most or right-most point of the second interval that was evenly divided into ##n##? In other words, just because ##i=2##, it isn't always the case that the ##i## acts like an input ##x## that we plug in ##i## to the function and evaluate it.
I'm not quite sure I understood it correctly, it's a bit confusing. What we have is
$$
\underbrace{\frac{1}{n}}_{\text{factor from}\\ \text{arithmetic mean}} \cdot \underbrace{\sum_{i=1}^{i=n}}_{\text{counting index i}}\quad \underbrace{f(i,n)}_{\text{function values to be added;}\\ \text{possibly dependent}\\ \text{on counting variable i}\\ \text{and constants like n or }\pi}
\\
\frac{1}{4} \cdot \underbrace{\sum_{k=1}^4}_{\text{counting k}} \, \underbrace{\cos(\frac{k}{4}\cdot \pi)}_{\text{input k}}
$$
If the values ##v## we add do not depend on "when" we add them, then we have ##\sum_{j=1}^N\,v=N\cdot v## simply "number added times value" as result.
Usually, the values ##v(j)## we add, do depend on "when", i.e. are affected by the counting number, here ##j##. In this case the terms we add vary and we get as result ##\sum_{j=1}^{N}\,v(j)=v(1)+v(2)+\ldots +v(N)##.

What you have written was ##\sum_{k=1}^4\cos(\pi x)##. So the function value ##\cos(\pi x)## was constant! It did not vary, since all that varies is ##k## and the summand ##\cos(\pi x)## has no dependency on ##k##. Thus you had the case ##\sum_{j=1}^N\,v=N\cdot v=\sum_{k=1}^4\,v=4\cdot \cos(\pi x)=4\cos(\pi x)##.

However, you wanted to add ##\cos(\frac{1}{4}\pi)+\cos(\frac{2}{4}\pi)+\cos(\frac{3}{4}\pi)+\cos(\frac{4}{4}\pi)##. Therefore you had to choose the second case, a dependent ##v(k)=\cos(\frac{k}{4}\pi)##. The ##x## had no special meaning in your sum ##\sum_{k=1}^4\cos(\pi x)##, since it did not occur in the summation instruction. From the perspective of the summation ##\sum## it was a constant, just a simple unknown number.

P.S.: I wildly used different summation indices as ##i,j,k## to stress, that they are only valid within a certain summation instruction and which letter is used isn't of any importance. Only rule of course is, not to use more than one per summation. Sometimes we read ##\sum_{i,j} v(i,j)## but this is only an abbreviation for two sums: ##\sum_{i,j}v(i,j)=\sum_i \left(\sum_j v(i,j) \right)##.
 
  • Like
Likes FactChecker

Related to Right-Endpoint-Sum is negative? Approximating Areas

1) What is the Right-Endpoint-Sum method for approximating areas?

The Right-Endpoint-Sum method is a numerical integration method used to approximate the area under a curve. It involves dividing the area into small rectangles and summing the areas of the rectangles that fall on the right side of the curve.

2) How is the Right-Endpoint-Sum method calculated?

To calculate the Right-Endpoint-Sum, you need to divide the interval of the function into smaller subintervals. The width of each subinterval is determined by the chosen number of rectangles. Then, the height of each rectangle is determined by evaluating the function at the right endpoint of each subinterval. Finally, the areas of all the rectangles are summed to approximate the total area under the curve.

3) Why might the Right-Endpoint-Sum be negative?

If the function has negative values on the right side of the curve, the Right-Endpoint-Sum will be negative. This means that the area under the curve on the right side is being subtracted from the total area.

4) What are the limitations of the Right-Endpoint-Sum method?

The main limitation of the Right-Endpoint-Sum method is that it can only approximate the area under a curve, not find the exact value. Additionally, the accuracy of the approximation depends on the number of rectangles used and the behavior of the function.

5) How does the Right-Endpoint-Sum method compare to other numerical integration methods?

The Right-Endpoint-Sum method is one of many numerical integration methods used to approximate areas. It is generally easier to calculate and understand compared to other methods, such as the Trapezoidal Rule or Simpson's Rule. However, it may not always provide the most accurate approximation, and the choice of method depends on the specific function and desired level of accuracy.

Similar threads

Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
454
  • Calculus and Beyond Homework Help
Replies
3
Views
596
  • Calculus and Beyond Homework Help
Replies
8
Views
788
  • Calculus and Beyond Homework Help
Replies
7
Views
1K
  • Calculus and Beyond Homework Help
Replies
21
Views
885
  • Calculus and Beyond Homework Help
Replies
6
Views
291
Back
Top