need help with simpsons rule, paul's online notes and wolfram seem to be producing two different answer
so the function I am looking at is here, simpsons rule http://tutorial.math.lamar.edu/Classes/CalcII/ApproximatingDefIntegrals.aspx
using n = 4, approximate integral exp(x^2), x =0..2 using simpsons rule. paul got 17.3536 wolfram got a different answer
i dont see any problem with paul's work
you might have to put that function into wolfram's widget
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).
(Because you're approximating with quadratics, and not with lines)
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).
here http://www.wolframalpha.com/input/?i=integrate++e%5E%28x%5E2%29+using+simpsons+rule+from+0+to+2+using+4+intervals i fixed it
now plug the same function into this calculator http://nastyaccident.com/calculators/calculus/simpsonsRule
also if you scroll down to pauls, he gets 17
look, it should be 1/6 in front, not 1/12
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.
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).
sorry i dont understand
hmm
the subinterval should be [0,.5] [.5,1] [1,1.5] and [1.5,2]
When you use two intervals in wolfram, h = 0.5. Which Is the same distance between subintervals you're using in the other calculator.
T = .5/3 ( f(0) + 2f(.5) + 4f(1) + 2(f1.5) + f(2))
well, i get the same answer if i use n = 8 in this calculator http://nastyaccident.com/calculators/calculus/simpsonsRule
When you use n=4 in wolfram?
perl do you know differential equations? or calculus iv?
hi usuki , yes i know it
lessis, ok so for some reason n=2 in wolfram is n=4 for paul
In your calculator, the n you use must be twice the n you use in wolfram. Because of how they are definind their intervals.
thank gawd need helpuuu
we're pulling all nighters :D
lessis, this is how wolfram defines it http://mathworld.wolfram.com/SimpsonsRule.html
Wolfram Intervals = n Pauls Intervals = 2n
yeah, why is that?
i would say its the other way around, wolf = 2n , paul = n
wolf's is more accurate
I'm cold brrr
They're defining intervals differently. Paul is using half intervals, for some weird reason.
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
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
vector field?
so wolfram divides [a,b] into 2n , and paul divides it into n?
its not so weird, if i found another calculator that does that
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)
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).
is there such a condition on the trapezoid rule?
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.
and quadratics need at least 3 points (or 2 subintervals)
, approximating by quadratics need 2n subintervals, (2n+1 points)
Yes!
well you solved the mystery :)
haha, i feel stupid
well maybe i will notify paul, ive written to him in the past
It's kinda weird, honestly. Especially since Paul isn't really using the intervals. (Just the sub-intervals)
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.
yeah im a bit confused now, so a subinterval is actually one quadratic subinterval
guys calc iv....plz
oh i get it now, like the trapezoid is a trapezoid. a quadratic a quadratic
so a subinterval in simpsons goes through three points, ok . i see ., thanks again
calc iv? perl?
but the calculator is wrong then ? plug in the function http://nastyaccident.com/calculators/calculus/simpsonsRule
ok usuki,
XD nasty accident.com not a good name for a site
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)
ahem perlll....
Join our real-time social learning platform and learn together with your friends!