Welcome! Log In Create A New Profile

Advanced

Integration of Error Term for eg. Trapezoidal Rule

Posted by slow_eddy 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Integration of Error Term for eg. Trapezoidal Rule
April 29, 2011 03:00PM
I keep running into dead ends with this. I'm sure I did it a few months ago (my notes seem to suggest that), but I've completely forgotten the trick - if any. So why do the error terms for integration come out the way they do?

I know you just take the error term of your estimating polynomial and integrate that. It's the actual nitty gritty of that "Calculus 1 integration" that's clobbering me. Is it integration by parts or something like that?
avatar Re: Integration of Error Term for eg. Trapezoidal Rule
April 29, 2011 05:16PM
This might be of help with other open questions here:

http://people.hofstra.edu/stefan_waner/realworld/integral/numint.html

About half way down you get to a problem concerning minimizing error, and it turns out to be a "Calculus1" problem once you strip away some of the gritty bits. The term that matters is the fourth derivative, so this is the one you minimise. (You minimise your maximum).

So how do you do that? The usual way: Take its derivative, find out when that is zero on your interval. So f(5)(xi) = 0 (because the fifth derivative is the derivative of the fourth, and at zero you're at a minimum or maximum.)
Re: Integration of Error Term for eg. Trapezoidal Rule
April 30, 2011 11:15AM
Yo. I'm not sure what you're asking here. confused smiley

Are you trying to derive the error term from first principals? Cos that is not a requirement of this course.

The error term of Trapezoidal Rule is

((b-a)/12)*h2f(2)(E) per the textbook page
avatar Re: Integration of Error Term for eg. Trapezoidal Rule
April 30, 2011 12:31PM
Yes, more or less from first principles. I don't like just taking it as given. At the last moment I'll do that, but while there's a bit of time I prefer to bash my head against brick walls.

You see, frankly, I don't rate my chances of passing this supp all that great, so I just treat it as a convenient source of pressure to at least add to what I know about the subject. I'm more focused on "salvage" than on "going for it" and getting the credit.

Nice thing is that if you get the "from first principles version" you're not dead in the water if memory lets you down in the exam room, too. You can figure it.
Re: Integration of Error Term for eg. Trapezoidal Rule
April 30, 2011 12:44PM
Ouch. You will probably find something on the web. I suspect it is not the easiest thing to derive though...
avatar Re: Integration of Error Term for eg. Trapezoidal Rule
April 30, 2011 12:46PM
grinning smiley I'll give it up when the blood starts to run out of my ears again.
avatar Re: Integration of Error Term for eg. Trapezoidal Rule
April 30, 2011 02:14PM
Arf! Arf! It were never rocket science ... although already "part 1" has fallen out of my other ear, so the clarity I was after still eludes me:

Take the error term for a P1(x) that approximates a f(x) (this is the "part 1" I was on about ... now where did that xi come from again??). It's in the book under "Trapezoidal Rule", so I won't repeat it.

Now to get the error of a "single panel" / single trapezoid under the curve (geometrically being the slice of area between the flat line and the squiggly one) all you do is integrate the error term from P + e = f.

You change your constant of integration from dx to ds. Some fiddling about gives dx = h ds, so you've got one h from the change of constant and an h2 from the upstairs part of the error expression, which you can pop out as a constant and multiply by the new h, giving you an h3.

You don't want any complications, so you pop all the other constants you can find, too. The 1/2 goes out, as does the f''(xi), so all you're left with is {integral from 0 to 1 of ..} s(s-1). And here was where I kept messing it up for some reason. I've actually forgotten how to make a mess of this, so let me just say how to do it properly (and you can all reply 'uh duh' or something unflattering like that):

It's s3/3 - s2/2. Basic power rule for integration.

And then you evaluate it at the limits. So 1/3 - 1/2 gives you -1/6 ... Which you can now multiply by that 1/2 you popped out to get it out of the way earlier. Pow! -1/12 .... h3 (being h2*h) f''(xi).

...

And if you do the same thing with Simpson's 1/3 rule you'll have 1/5 - 1/3 at the end of evaluating the s terms that remain. That gives -1/15 to multiply by ... well it turns out that the constant you've popped has reduced to 1/6, so -1/6*15 gives -1/90.

All of which is wasted effort, I fear, because I don't think I'll have the time to calculate my way out of trouble in this case even if I can remember where to start. What's worse is the blood has started to run out of my ears.

«edit» I can see that cubed h becoming moderately controversial. This is Local error. You lose an h in the global term (of which the above is a common factor in the equivalent "sum of local errors" expression) because (b-a)/n = h further to which see the text book.

OK so how to visualise the composite error? Make a picture with lots of panels, each panel approximating one "square" of the area you're after. Each square has a straight line and a squiggly line, between which is an area you didn't account for. That's the error. So now it's easy to imagine adding all those slivers of space between the true and estimated lines to get total error (just as you'd add up the areas of all your panels to get total error.)

Anyone feeling insulted by the above simplification, relax. I'm explaining it to myself, that's all. It helps me to look at it thus, so I'll assume it might help some lurker too.
Sorry, only registered users may post in this forum.

Click here to login