Chapter 6: Techniques of Integration
Section 6.7: Numeric Methods
Sketch a derivation of Simpson's rule.
Figure 6.7.8(a) shows a black curve with five points corresponding to x=xk,k=0,…,4, with the first three points interpolated with a quadratic whose graph is shown in red along the curve.
The rightmost of these three points, and the next two are interpolated by a second quadratic whose graph is shown in green along the curve.
These five nodes determine two contiguous "double panels." Simpson's rule amounts to approximating the area under a curve with the area under such approximating quadratics.
The line along which the two double panels in the figure touch deliberatelyshows both red and green.
use plots in
g := x-> 2+sin(x);
a := .5; b := -1.;c:=.1;
p1:=plot([[x,P1,x =-1..0],[x,P2,x=0..1],[x,g(x),x=-1..1],[x,0,x=-1..1]],color=[red,green,black,black], thickness=[8,8,1,1],transparency=[.7,.7,0,0],scaling=constrained,axes=none,view=[-1..1,-.2..3]);
Figure 6.7.8(a) Two interpolating quadratics
The expression for a quadratic interpolating the three points in Table 6.7.8(a) is cumbersome, and integrating it between x=xk=a+k h and x=xk+2=a+k+2 h is an even more complex task. Surprisingly, though, this definite integral simplifies to h3 fk+4 fk+1+fk+2, so that the sum of a succession of such expressions collapses to the compact form of Simpson's rule.
Table 6.7.8(a) Points interpolated by quadratic
The actual calculations are so cumbersome that they are carried out only in Maple.
Interpolate xk,fk,xk+1,fk+1,xk+2,fk+2 with a polynomial quadratic in x
Enter a+k+n h,fk+n and press the Enter key.
Context Panel: Sequence≻n=0,2
Context Panel: Conversions≻To List
Context Panel: Curve Fitting≻Polynomial Interpolation≻x
→sequence w.r.t. n
→polynomial curve fit
Find the area under the interpolating polynomial
Context Panel: Definite Integral template
Integrate between a+k h and a+k+2 h then press the Enter key.
Context Panel: Simplify≻Simplify
∫a+k ha+k+2 hⅆx
Add the areas under three contiguous interpolating parabolas
Expression palette: Evaluation template
Set k=0,2,4 and add the results.
Context Panel: Factor
Generalize to the case of n/2 panels and n+1 nodes, x0,x1,…,xn.
If a=x0 and b=xn, then there are n+1 equispaced nodes in the interval a,b. If n is even, then the interval can be subdivided into n/2 contiguous "double panels" spanning three nodes. These three nodes can be interpolated by a quadratic polynomial (whose graph is a parabola), and the area under the generic parabola so formed is Ak=h3 fk+4 fk+1+fk+2. The sum of n/2 areas of this type will then be
∑k=0n/2Ak=h3y0+4∑k=1n/2f2 k−1+2∑k=1n/2−1f2 k+fn
<< Previous Example Section 6.7
Next Chapter >>
© Maplesoft, a division of Waterloo Maple Inc., 2023. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document