Merced College; Don Power

 

Midpoint Rule with EXCEL

 

Find  (the integral of 1/(x2+5) from 1 to 4) by the midpoint rule with n = 20, using an EXCEL worksheet.

 

The problem can be solved with the following worksheet (the formulas are shown below):

 

dx=(b-a)/n

 

 

 

0.15

 

 

 

dx/2

 

 

The initial x is a+dx/2, where a is the lower limit of integration.

 

The second and subsequent x's are formed by adding dx to the previous x

 

To extend formulas downward, move the cursor to the lower right corner of the cell to be extended until it changes to a solid +, click and hold with the mouse, and drag downward

 

0.075

 

 

 

 

 

f(x)

integral

n

x

1/(x^2+5)

dx * sum of f(x)

1

1.075

0.162453

 

2

1.225

0.153831

 

3

1.375

0.145125

 

4

1.525

0.136507

 

5

1.675

0.128113

 

6

1.825

0.120039

 

7

1.975

0.112352

 

8

2.125

0.10509

 

9

2.275

0.098274

 

10

2.425

0.091906

 

11

2.575

0.08598

 

12

2.725

0.080479

 

13

2.875

0.075383

 

14

3.025

0.070668

 

15

3.175

0.06631

 

16

3.325

0.062283

 

17

3.475

0.058563

Compare this midpoint rule approximation with the actual value of .286450284649, obtained from a graphing calculator.

 

18

3.625

0.055125

 

19

3.775

0.051946

 

20

3.925

0.049006

 

 

 

 

 

 

sum:

1.909434

0.286415161

 

The formulas I used to generate the worksheet are as follows:

 

dx=(b-a)/n

 

 

 

=(4-1)/20

 

 

 

dx/2

 

 

 

=A2/2

 

 

 

 

 

f(x)

integral

n

x

1/(x^2+5)

dx * sum of f(x)

1

=1+A4

=1/(B7^2+5)

 

=1+A7

=B7+0.15

=1/(B8^2+5)

 

=1+A8

=B8+0.15

=1/(B9^2+5)

 

=1+A9

=B9+0.15

=1/(B10^2+5)

 

=1+A10

=B10+0.15

=1/(B11^2+5)

 

=1+A11

=B11+0.15

=1/(B12^2+5)

 

=1+A12

=B12+0.15

=1/(B13^2+5)

 

=1+A13

=B13+0.15

=1/(B14^2+5)

 

=1+A14

=B14+0.15

=1/(B15^2+5)

 

=1+A15

=B15+0.15

=1/(B16^2+5)

 

=1+A16

=B16+0.15

=1/(B17^2+5)

 

=1+A17

=B17+0.15

=1/(B18^2+5)

 

=1+A18

=B18+0.15

=1/(B19^2+5)

 

=1+A19

=B19+0.15

=1/(B20^2+5)

 

=1+A20

=B20+0.15

=1/(B21^2+5)

 

=1+A21

=B21+0.15

=1/(B22^2+5)

 

=1+A22

=B22+0.15

=1/(B23^2+5)

 

=1+A23

=B23+0.15