Comparing the Midpoint and Trapezoid Rules

pply the Midpoint and Trapezoid Rules to the following integrals. Make a table similar to Table 7.4 showing the approximations and errors for n = 4,8, 16, and 32. The exact values of the integrals are given for computing the error.

Solution:-

Step1

Given that

Apply the Midpoint and Trapezoid Rules to the following integrals.

n = 4,8, 16, and 32

The exact values of the integrals are given for computing the error.

Step2

To find

Make a table showing the approximations and errors for n = 4,8, 16, and 32.

Step3

a=0 , b=0.7854, (N=4,8,16,32)

Using midpoint rule

Step4

Midpoint sum for N=4

++-------+)

++-------+)

=0.93193

Error for N=4 for midpoint rule

===0.37871

Step5

Using midpoint rule

Midpoint sum for N=8

++-------+)

++-------+)

=1.2093

Error for N=8 for midpoint rule

===0.19379

Step6

Using midpoint rule

Midpoint sum for N=16

++-------+)

++-------+)

=1.3536

Error for N=16 for midpoint rule

==