Previous Back to Lab Intro Back to Tutorials Next

Tutorial: Trapezoidal Rule

Next, we multiply each entry by an appropriate constant.

Step 3: Multipy each entry by appropriate constants

We now need to multiply each entry by either 1 (for the first and last entry) or 2 (for the rest). We do this by putting the constants from the trapezoidal rule in column C for each entry:

 
A
B
C
D
1
x
f(x)
Constants
 
2
2.0
4
1
 
3
3.2
10.24
2
 
4
4.4
19.36
2
 
5
5.6
31.36
2
 
6
6.8
46.24
2
 
7
8.0
64
1
 

Then we just enter = C2*B2 into cell D2, and copy this down column D.
 
A
B
C
D
1
x
f(x)
Constants
 
2
2.0
4
1
4
3
3.2
10.24
2
20.48
4
4.4
19.36
2
38.72
5
5.6
31.36
2
62.72
6
6.8
46.24
2
92.48
7
8.0
64
1
64

Notice for example that in D2, we get (1)(f(2.0)) = (1)(4) = 4. The constants we are multiplying by correspond to the bolded entries in the Trapezoidal formula below:

(h/2)[1 f(x0) + 2f(x1) + 2f(x2) + ... +2f(xn-1) + 1 f(xn)]

Finally, all we need is to sum everything up and multiply by h/2. (Remember that h is 1.2.)

 

Previous Back to Lab Intro Back to Tutorials Next