Calculus VII: Approximations

Although I’ll have a very busy summer with consulting, I’ve taken some time to start reading more again.  You know, those books which have been sitting on your shelves for years….

So I’ve started Volume I of A Treatise on the Integral Calculus by Joseph Edwards.

Day150Cover

I include a picture of the cover page, since you can google it and download a copy online.  Between Volumes I and II, there’s about 1800 pages of integral calculus….

Since I’ll likely be working with a calculus curriculum later this year, I thought I’d look at some older books and see what calculus was like back in the day.  I’m continually surprised at how much there is to learn about elementary calculus, despite having taught it for over 25 years.

My approach will be a simple one — I’ll organize my posts by page number.  As I read through the books and solve interesting problems, I’ll share with you things I find novel and interesting.  The more I read books like these and think about calculus, the more I think most current textbooks simply are not up to the task of presenting calculus in any meaningful way.  Sigh.

This is not the time to be on my soapbox — this is the time for some fun!  So here is the first topic:  Weddle’s Rule, found on page 21.

Ever hear of it?  Bonus points if you have — but I never did.  It’s another approximation rule for integrals.  Here it is: given a function f on the interval [a,b], divide the interval into six equal subintervals with points x_0, x_1,\ldots x_6 and corresponding function values y_0=f(x_0),\ldots,y_6=f(x_6).  Then

\displaystyle\int_a^bf(x)\,dx\approx \dfrac{b-a}{20}\left(y_1+5y_2+y_3+6y_4+y_5+5y_6+y_7\right).

Yikes!  Where did that come from?  I’ll present my take on the idea, and offer a theory.  If there are any historians of mathematics out there, I’d be happy to hear if my theory is correct.

One reason most of us haven’t heard of Weddle’s Rule is that approximations aren’t as important as they were before calculators and computers.  So many exercises in this book involve approximation techniques.

So how would you come up with Weddle’s Rule?  I’ll share my (likely mythical) scenario with you.  It’s based on some notes I wrote up a while ago on Taylor series.  So before diving into Weddle’s Rule, I’ll show you how I’d derive Simpson’s Rule — the technique is the same, but the algebra is easier.  And by the way, if anyone has seen this technique before, please let me know!  I’m sure it must have been done before, but I’ve never been able to find a source illustrating it.

Let’s assume we want to approximate

F(x)=\displaystyle\int_a^xf(t)\,dt

by using three equally-spaced points on the interval [a,x].  In other words, we want to find weights p, q, and r such that

S(x)=\left(p f(a)+ q f\left(\dfrac{a+x}2\right)+rf(x)\right)(x-a)\approx F(x).

How might we approach this?  We can create Taylor series for F(x) and S(x) about the point a.  The first is easy using the Fundamental Theorem of Calculus, assuming sufficient differentiability:

F(x)=f(a)(x-a)+\dfrac{f'(a)}{2!}(x-a)^2+\dfrac{f''(a)}{3!}(x-a)^3+\cdots

Now to construct the Taylor series of S(x) about x=a, we need to evaluate several derivatives at a. This is not difficult to do by hand, but it is easy to do using Mathematica and a command such as

Day150Mma

Doing so yields the following:Day150derivs2

Now the problem becomes a simpler algebra problem — to force as many of the coefficients of the derivatives on the right-hand side to be 1 as possible.  This will make the derivatives of F and S match, and the Taylor polynomials will be equal up to some order.

Solving the first three such equations,

Day150eqns

yields, as we expect, p=1/6, q=2/3, and r=1/6. Note that these values also imply that

\dfrac12q+4r=1,

but

\dfrac5{16}q+5r=\dfrac{25}{24}.

This implies that

S(x)-F(x)=\dfrac1{24}\cdot\dfrac{(x-a)^5}{5!}+O((x-a)^6)

on each subinterval, so that

S(x)-F(x)=O((x-a)^5)

on each subinterval, giving that Simpson’s rule is O((x-a)^4).

So how we apply these to derive Weddle’s rule?  We could try to find weights w_1,\ldots w_7 to create an approximation

W(x)=\left(w_1 f(a)+w_2f\left(\dfrac{5a+x}6\right)+\cdots+w_7f(x)\right)(x-a).

If we apply precisely the same procedure as we did with Simpson’s Rule, we get the following as the sequence of weights to create the best approximation:

\dfrac{41}{840},\ \dfrac9{35},\ \dfrac9{280},\ \dfrac{34}{105},\ \dfrac9{280},\ \dfrac9{35},\ \dfrac{41}{480}.

Not exactly easy to work with — remember, no calculators or computers.

So let’s make the approximation a little worse.  Recall how the weights were found — a system of seven equations in seven unknowns was solved, analogous to the three equations in three unknowns for Simpson’s rule.  Instead, we specify w_1, and solve the first six equations in terms of w_1.  This gives us

Day151Weddle.png

Now all weights must be positive; this gives the constraint

0.046\overline6\approx\dfrac7{150}<w_1<\dfrac{13}{200}=0.065.

Let’s put w_1=1/20, which is in the interval just described.  This gives the sequence of weights to be

\dfrac1{20},\ \dfrac5{20},\ \dfrac1{20},\ \dfrac6{20},\ \dfrac1{20},\ \dfrac5{20},\ \dfrac1{20},

where all fractions are written with the same denominator.  Now imagine factoring out the 1/2, and you notice that all divisions are by 10.  Can you see the advantage?  If you have a table of values for your functions, you just need to multiply function values by a single-digit number, and then move the decimal place over one.  An approximators dream!

So Weddle’s approximation is exact for fifth-degree polynomials, even though it is possible to use six subintervals to get weights which are exact for sixth-degree polynomials.  Yes, we lose an order of accuracy — but now our computations are much easier to carry out.

Was this Weddle’s thinking?  I can’t be sure; I wasn’t able to locate the original article online.  But it is a way for me to make sense out of Weddle’s rule.

I will admit that in a traditional calculus class, I don’t address approximations in this way.  There is a time crunch to get “everything” done — that is, everything the student is expected to know for the next course in the calculus sequence.

Should these concepts be taught?  I’ll make a brief observation:  in reading through the first 200 pages of this calculus book, it seems that all that has changed since 1954 is that content was pared down significantly, and more calculator exercises were added.

This is not the solution.  We need to rethink what students need to now know and how that material should be taught in light of emerging technology.  So let’s get started!

Published by

Vince Matsko

Mathematician, educator, consultant, artist, puzzle designer, programmer, blogger, etc., etc. @cre8math

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s