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 showing the approximations and errors for n = 4,8, 16, and 32.Step3 a=-2 , b=6, n=4Using midpoint ruleStep4Midpoint sum for N=4++-------+)++-------+)=-2.624Error for N=4 for midpoint rule===1.656Step5Using midpoint ruleMidpoint sum for N=8++-------+)++-------+)=-1.1483Error for N=8 for midpoint rule===1.2871Step6Using midpoint ruleMidpoint sum for N=16++-------+)++-------+)=0.8719Error for N=16 for midpoint rule===0.78202Step7Using midpoint ruleMidpoint sum for N=32++-------+)++-------+)=2.2843Error...