Comparing the Midpoint and Trapezoid Rules Apply 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:-Step1Given thatApply the Midpoint and Trapezoid Rules to the following integrals.n = 4,8, 16, and 32The exact values of the integrals are given for computing the error. Step2To find Make a table similar to Table 7.4 showing the approximations and errors for n = 4,8, 16, and 32.Step3 a=1 , b=5, n=4Using midpoint ruleStep4Midpoint sum for N=4++-------+)++-------+)=47.25Error for N=4 for midpoint rule===0.5275Step5Using midpoint ruleMidpoint sum for N=8++-------+)++-------+)=70.663Error for N=8 for midpoint rule===0.29337Step6Using midpoint ruleMidpoint sum for N=16++-------+)++-------+)=84.5513Error for N=16 for midpoint rule===0.154487=0.15449Step7Using midpoint ruleMidpoint sum for N=32++-------+)++-------+)=92.0769Error for N=32 for midpoint rule===0.079231Step8Table for midpoint approximation and errorNApproximationError447.250.5275870.6630.293371684.55130.154493292.07690.079231Step9N=4Using trapezoidal ruleTrapezoidal sum for N=4=102Error for N=4 for Trapezoidal rule===0.02Step10N=8Using trapezoidal ruleTrapezoidal sum for N=8=100.5Error for N=8 for Trapezoidal rule===0.005Step11N=16Using trapezoidal ruleTrapezoidal sum for N=16=100.125Error for N=16 for Trapezoidal rule===0.00125Step12N=32Using trapezoidal ruleTrapezoidal sum for N=32=100.0313Error for N=32 for Trapezoidal rule===0.000313Step 13Table for Trapezoidal approximation and errorNApproximationError41020.028100.50.00516100.1250.0012532100.03130.000313