Poor Mr Boole

Numerical integration is awfully useful. Most of us will remember the trapezoid rule that we learn at school, where the function we are integrating is substituted by a straight line and the integral as estimated as the are under the curve:

I_2~=~\frac{1}{2}h\left(f_1-f_0\right)

where h is the interval that we split the curve into and f_1 and f_0 are the values of the function on either side of the function.

One way to obtain better methods is to interpolate higher order polynomials, and the integrate those. It is possible to, for example, use three points and interpolate with a parabola, four points and interpolate with a cubic or five points and interpolate with a quartic. This latter method is often called Bode’s rule. But here comes the shocking news: it wasn’t Bode who came up with, but the English mathematician Boole. It became known as Bode’s rule because of a misprint in a maths textbook from the 70s. I guess the consolation prize is that Boole got a whole branch of logic named after him.

So does Boole’s rule make a better approximation than the just applying the trapezoidal rule? In this picture I will show sin(x) with x between 0 and \pi/2 fitted with 5 straight lines (green curve) and with the polynomial used in Boole’s rule (red curve):

 

 

 

 

 

 

 

The red (corresponding to Boole’s rule) is pretty much right on the sin curve. If we actually take the difference between the fits and the sine curve we obtain the error:

where blue is the error using trapezoidal rule and green sticking with Boole.

 

 

 

 

The moral of the story is that you can get the name wrong, so long as you get the Maths rights!

Advertisements

About jakirkpatrick

I am a researcher in solar energy at the University of Oxford. I am interested in mathematics, programming and trying to understand why things work. I also like the great outdoors and riding my bike.
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Poor Mr Boole

  1. joe parker says:

    alway interesting, james… this stuff is great for people like me (who were even worse at maths the first time round)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s