Use Freefind to search this site (or the web)
Site search Web search

powered by FreeFind

Tuesday, October 04, 2005

One job you can get with a math major

One can get a nomination to be on the Supreme Court of the United States!

Hat tip to Harriet Miers, a mathematics major at SMU (prior to getting her law degree at SMU).

Yeah, I am a Democrat, but it is good to see a math major make good.

I haven't posted much here as math blog posts take time, and most of my math time has been devoted to teaching a "numerical methods" course.

This course is time consuming as
  1. My last numerical analysis course was a long time ago.
  2. I wasn't that good at it then.
  3. I am learning the software packages as we go along.

I am not sure as to how I feel about the software packages; in my day we wrote our own code which helped us learn how the algorithms worked. On the other hand, we can cover more topics since coding isn't slowing us down.

What I can say is that I finally learned where the error formulas in the Simpson's rule approximation formula comes from.

What is Simpson's rule? It is a way of approximating a definite integral by approximating the function being integrated in a piecewise fashion by parabollas. Basically, you chop up the interval that you are integrating over into "n" equal intervals, subdivide each interval into two pieces, and over each piece you fit a parabola (three points determine a unique parabola (a line is considered a degenerate parabola). And it is easy to integrate a quadratic function.

So, over each interval, there is a maximum error; if the function being integrated has four continuous derivatives (can differentiate the function 4 times and still get a continuous function) then the error over each piece is bounded by the absolute value of

(M/2880)(b-a)^5 where the interval runs from "a" to "b" and M is the absolute value of the maximum value of the 4'th derivative of the function being integrated, taken over the interval from a to b.

Where in the world does the 2880 come from?

Well, if one uses the 3'rd degree Lagrange polynomial to approximate f over the interval from a to b, the maximum error is (M/4!)(where M is as before and the points x0, x1, x2, x3 run from a to b. But if you integrate the Lagrange polynomial over the interval, the cubic term vanishes (integrates to zero) and what you have left is the integral of the Lagrange quadratic polynomial through x0, x1, x2, which can be set so x0 =a, x1 = (1/2)(a+b) and x2 = b. that is, this is the unique quadratic that one integrates in Simpson's rule!

So, to find the error, we integrate (M/4!)(x-x0)(x-x1)(x-x2)(x-x3) from a to b, setting x0, x1 and x2 as before. we set x3=x2 which you really can't do if you are doing an approximation, but remember we are obtaining an upper bound for the error.

Set h = b-a and then make the substitution x = a + th, then dx = hdt and

x-x0 becomes th, x-x1 becomes h(t-1/2), (x-x2)(x-x3) becomes (h(t-1))^2

and the limits of the integral become 0 to 1. Pull all of the "h's" out of the integral sign to get the h^5 term, and integrate (t)(t-1/2)(t-1)^2 from 0 to 1 to obtain 1/120

and then 1/120 * (1/24) =2400 + 480 = 2880.

0 Comments:

Post a Comment

<< Home

View Counter Statsfree hit counter
frontline plus