$5-6$ . Use (a) the Midpoint Rule and (b) Simpson's Rule to
approximate the given integral with the specified value of $n .$
(Round your answers to six decimal places.) Compare your
results to the actual value to decimal places.) Compare your
approximation.
$$\int_{0}^{\pi} x \cos x d x, \quad n=4$$