# Numerical Integration by Simpson's 1/3 and 3/8 Rules

Numerical Integration by Simpson's 1/3 and 3/8 Rules

Definite integrals can be approximated using numerical methods such as Simpson’s rule. A better approximation is obtained as you increase , the number of subintervals.

n

Let and , where , and set .

h=(b-a)/n

x=a+kh

k

k=0,1,2,…,n

y=f(x)

k

k

Simpson's 1/3 rule: .

∫f(x)dx≈A=y+y+4∑y+2∑y

b

a

h

3

0

n

n-1

i=1,iodd

i

n-2

i=2,ieven

i

Simpson's 3/8 rule: .

∫f(x)dx≈B=y+y+3(y+y+y+y+⋯+y+y)+2(y+y+⋯+y)

b

a

3h

8

0

n

1

2

4

5

n-2

n-1

3

6

n-3

In the graphic, approximations for a given are computed using the two rules and compared with the exact value of the integral.

n