Mathematical Tools for Physics

(coco) #1
11—Numerical Analysis 326

This is known as Simpson’s rule.


Simpson’s Rule
Before applying this last result, I’ll go back and derive it in a more systematic way, putting it into the form you’ll
see most often.
Integrate Taylor’s expansion over a symmetric domain to simplify the algebra:
∫h


−h

dxf(x) = 2hf(0) +

2


6


h^3 f′′(0) +

2


120


h^5 f′′′′(0) +···.

I’ll try to approximate this by a three point formulaα(−h) +βf(0) +γf(h)whereα,β, andγ, are unknown.
Because of the symmetry of the problem, you can anticipate thatα=γ, but let that go for now and it will come
out of the algebra.


αf(−h) +βf(0) +γf(h) =

α

[


f(0)−hf′(0) +

1


2


h^2 f′′(0)−

1


6


h^3 f′′′(0) +

1


24


h^4 f′′′′(0) +···

]


+βf(0)


[


f(0) +hf′(0) +

1


2


h^2 f′′(0) +

1


6


h^3 f′′′(0) +

1


24


h^4 f′′′′(0) +···

]


You now determine the three constants by requiring that the two series for the same integral agree to as
high an order as is possible for any f.


2 h=α+β+γ
0 =−αh+γh
1
3

h^3 =

1


2


(α+γ)h^2

=⇒ α=γ=h/ 3 , β= 4h/ 3

and so,

∫h

−h

dxf(x)≈

h
3

[


f(−h) + 4f(0) +f(h)

]


. (21)

Free download pdf