You are on page 1of 2

Simpsons Rule

Simpsons rule is a numerical method that approximates the value of a denite integral by using quadratic
polynomials.
Lets rst derive a formula for the area under a parabola of equation y = ax
2
+ bx + c passing through the
three points: (h, y
0
), (0, y
1
), (h, y
2
).
x
y
h h
0
y
0
y
1
y
2
(h, y
0
)
(0, y
1
)
(h, y
2
)
x
y = ax
2
+ bx + c
A =
_
h
h
(ax
2
+ bx + c) dx
=
_
ax
3
3
+
bx
2
2
+ cx
_

h
h
=
2ah
3
3
+ 2ch
=
h
3
_
2ah
2
+ 6c
_
Since the points (h, y
0
), (0, y
1
), (h, y
2
) are on the parabola, they satisfy y = ax
2
+ bx + c. Therefore,
y
0
= ah
2
bh + c
y
1
= c
y
2
= ah
2
+ bh + c
Observe that
y
0
+ 4y
1
+ y
2
= (ah
2
bh + c) + 4c + (ah
2
+ bh + c) = 2ah
2
+ 6c.
Therefore, the area under the parabola is
A =
h
3
(y
0
+ 4y
1
+ y
2
) =
x
3
(y
0
+ 4y
1
+ y
2
) .
Gilles Cazelais. Typeset with LAT
E
X on April 23, 2008.
We consider the denite integral
_
b
a
f(x) dx.
We assume that f(x) is continuous on [a, b] and we divide [a, b] into an even number n of subintervals of
equal length
x =
b a
n
using the n + 1 points
x
0
= a, x
1
= a + x, x
2
= a + 2x, . . . , x
n
= a + nx = b.
We can compute the value of f(x) at these points.
y
0
= f(x
0
), y
1
= f(x
1
), y
2
= f(x
2
), . . . , y
n
= f(x
n
).
x
y
a = x
0
x
1
x
2
x
3
x
4 x
n
= b x
n1
x
n2
y
0
y
1
y
2
y
3
y
4
y
n
y
n1
y
n2
x
We can estimate the integral by adding the areas under the parabolic arcs through three successive points.
_
b
a
f(x) dx
x
3
(y
0
+ 4y
1
+ y
2
) +
x
3
(y
2
+ 4y
3
+ y
4
) + +
x
3
(y
n2
+ 4y
n1
+ y
n
)
By simplifying, we obtain Simpsons rule formula.
_
b
a
f(x) dx
x
3
(y
0
+ 4y
1
+ 2y
2
+ 4y
3
+ 2y
4
+ + 4y
n1
+ y
n
)
Example. Use Simpsons rule with n = 6 to estimate
_
4
1
_
1 + x
3
dx.
Solution. For n = 6, we have x =
41
6
= 0.5. We compute the values of y
0
, y
1
, y
2
, . . . , y
6
.
x 1 1.5 2 2.5 3 3.5 4
y =

1 + x
3

2

4.375 3

16.625

28

43.875

65
Therefore,
_
4
1
_
1 + x
3
dx
0.5
3
_

2 + 4

4.375 + 2(3) + 4

16.625 + 2

28 + 4

43.875 +

65
_
12.871

You might also like