Ask your own question, for FREE!
Mathematics 18 Online
OpenStudy (perl):

need help with simpsons rule, paul's online notes and wolfram seem to be producing two different answer

OpenStudy (perl):

so the function I am looking at is here, simpsons rule http://tutorial.math.lamar.edu/Classes/CalcII/ApproximatingDefIntegrals.aspx

OpenStudy (perl):

using n = 4, approximate integral exp(x^2), x =0..2 using simpsons rule. paul got 17.3536 wolfram got a different answer

OpenStudy (perl):

i dont see any problem with paul's work

OpenStudy (perl):

you might have to put that function into wolfram's widget

OpenStudy (anonymous):

The total number of intervals used in Simpsons rule, is half the number you're actually given, because of how it works (in each interval you're giving 3 points, instead of 2).

OpenStudy (anonymous):

(Because you're approximating with quadratics, and not with lines)

OpenStudy (anonymous):

And you can actually see that from the diagram shown. You have 7 points (X0, X1, X2, ... , X7) that correspond to 6 intervals. But you're only actually using 3 (The green, yellow and blue ones).

OpenStudy (perl):

now plug the same function into this calculator http://nastyaccident.com/calculators/calculus/simpsonsRule

OpenStudy (perl):

also if you scroll down to pauls, he gets 17

OpenStudy (perl):

look, it should be 1/6 in front, not 1/12

OpenStudy (anonymous):

Yeah, I know. I'm just saying that Wolfram defines intervals differently. If you use half the number of intervals for wolfram, you get exactly the same answer.

OpenStudy (anonymous):

Wolfram counts the amount of colors in http://tutorial.math.lamar.edu/Classes/CalcII/ApproximatingDefIntegrals_files/image003.gif Which are 3. While your other calculator, counts the amount of intervals (Which are twice the amount of colors).

OpenStudy (perl):

sorry i dont understand

OpenStudy (perl):

hmm

OpenStudy (perl):

the subinterval should be [0,.5] [.5,1] [1,1.5] and [1.5,2]

OpenStudy (anonymous):

When you use two intervals in wolfram, h = 0.5. Which Is the same distance between subintervals you're using in the other calculator.

OpenStudy (perl):

T = .5/3 ( f(0) + 2f(.5) + 4f(1) + 2(f1.5) + f(2))

OpenStudy (perl):

well, i get the same answer if i use n = 8 in this calculator http://nastyaccident.com/calculators/calculus/simpsonsRule

OpenStudy (anonymous):

When you use n=4 in wolfram?

OpenStudy (usukidoll):

perl do you know differential equations? or calculus iv?

OpenStudy (perl):

hi usuki , yes i know it

OpenStudy (perl):

lessis, ok so for some reason n=2 in wolfram is n=4 for paul

OpenStudy (anonymous):

In your calculator, the n you use must be twice the n you use in wolfram. Because of how they are definind their intervals.

OpenStudy (usukidoll):

thank gawd need helpuuu

OpenStudy (usukidoll):

we're pulling all nighters :D

OpenStudy (perl):

lessis, this is how wolfram defines it http://mathworld.wolfram.com/SimpsonsRule.html

OpenStudy (anonymous):

Wolfram Intervals = n Pauls Intervals = 2n

OpenStudy (perl):

yeah, why is that?

OpenStudy (perl):

i would say its the other way around, wolf = 2n , paul = n

OpenStudy (perl):

wolf's is more accurate

OpenStudy (usukidoll):

I'm cold brrr

OpenStudy (anonymous):

They're defining intervals differently. Paul is using half intervals, for some weird reason.

OpenStudy (anonymous):

2 intervals in wolfram is the same as 4 with Paul 4 intervals in wolfram is the same as 8 with Paul n intervals in wolfram is the same as 2n with Paul

OpenStudy (perl):

hmm, oh i see something on line (9) An extended version of the rule can be written for f(x) tabulated at x_0, x_1, ..., x_(2n) as

OpenStudy (usukidoll):

vector field?

OpenStudy (perl):

so wolfram divides [a,b] into 2n , and paul divides it into n?

OpenStudy (perl):

its not so weird, if i found another calculator that does that

OpenStudy (perl):

so you were saying, the reason for using 2n is to ensure that there are an even number of points (you dont want to be stuck with an odd number of points)

OpenStudy (anonymous):

Yes. That's why the total number of intervals Wolfram uses (2n) is the same as the number of intervals Paul uses (which paul just calls n).

OpenStudy (perl):

is there such a condition on the trapezoid rule?

OpenStudy (anonymous):

Yeah, that's Pauls idea basically. With wolfram you can use uneven number of intervals, because it's using twice the number you give it. With the trapezoid rule, you can use any integer number of intervals you want, because you're not forming quadratics.

OpenStudy (perl):

and quadratics need at least 3 points (or 2 subintervals)

OpenStudy (perl):

, approximating by quadratics need 2n subintervals, (2n+1 points)

OpenStudy (anonymous):

Yes!

OpenStudy (perl):

well you solved the mystery :)

OpenStudy (perl):

haha, i feel stupid

OpenStudy (perl):

well maybe i will notify paul, ive written to him in the past

OpenStudy (anonymous):

It's kinda weird, honestly. Especially since Paul isn't really using the intervals. (Just the sub-intervals)

OpenStudy (anonymous):

I like the way Wolfram asks for input better, because It's basically asking you for the number of quadratics you want to use to approximate the curve.

OpenStudy (perl):

yeah im a bit confused now, so a subinterval is actually one quadratic subinterval

OpenStudy (usukidoll):

guys calc iv....plz

OpenStudy (perl):

oh i get it now, like the trapezoid is a trapezoid. a quadratic a quadratic

OpenStudy (perl):

so a subinterval in simpsons goes through three points, ok . i see ., thanks again

OpenStudy (usukidoll):

calc iv? perl?

OpenStudy (perl):

but the calculator is wrong then ? plug in the function http://nastyaccident.com/calculators/calculus/simpsonsRule

OpenStudy (perl):

ok usuki,

OpenStudy (usukidoll):

XD nasty accident.com not a good name for a site

OpenStudy (anonymous):

It's not wrong. It's just asking for a different thing. Wolfram asks for the number of intervals, which can be any integer (1, 2, 3, 4, etc), while Paul asks for the number of subintervals, which has to be a pair. (Which, when doing everything from scratch, I guess makes more sense, considering how you have to first give the subintervals, to form the quadratics in each interval, to calculate the area)

OpenStudy (usukidoll):

ahem perlll....

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!