Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I think I know why but I can't represent this accurately with a graph.

I am supposed to show why Simpson's Rule is so far off for the integral $$\int_0^{20} \cos \pi x$$

I know that the answer should be zero because it repeats on that interval, 10 up and 10 down evenly.

I know that the antiderivative $\sin \pi x$ will be zero for any 0 or pi value so that evaluates to zero.

When I use Simpson's Rule I get

$$\frac{2}{2} (1 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 +1) = 9$$

I am pretty certain that the reason the numbers are so far off is because the interval is 2 and that will cover an up and down which Simpson's Rule will overestimate but I can not show this on a graph to equal 9.

share|improve this question
1  
Another way of describing what happens here is that you're sampling the function you integrate - looking at its values at a finite number of points - and that your samples aren't actually sufficient to reconstruct your function; in fact, they're not even sufficient to distinguish your function from a constant function! To understand why this happens, you might want to have a look at the concept of aliasing ( en.wikipedia.org/wiki/Aliasing#Sampling_sinusoidal_functions ) and the Nyquist limit. –  Steven Stadnicki Jun 6 '12 at 2:14
    
You do notice the area is $0$ right? –  Pedro Tamaroff Jun 6 '12 at 20:46
    
Yes that is why Simpson's Rule fails in this example. –  user138246 Jun 6 '12 at 20:54
add comment

1 Answer 1

up vote 4 down vote accepted

I am an idiot and I did the graph wrong. It overestimates because it makes a rectange on each subinterval.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.