- 1)
- (6 pts)
Write a program that will use the trapezoidal method to
approximate the value of

and determine the relative error in the approximation. Your program should read in the value of*n*. You will need to compute the exact value of the intergral, but let your program do most of the work. Obtain a formula for the value of the integral in terms of*a*and*b*, then have your program evaluate this formula. Don't manually compute the exact value, then assignexact = x.xxxxxxxxxd0

How large does

*n*have to be in order for the relative error to be less than For this last question, use a trial and error approach. You don't have the find the exact value of*n*that satisfies the criteria, but you should get close (for example, if the exact value of*n*that meets the accuracy criteria is*n*= 250, then*n*= 300 would be ok, but*n*= 1000 is not). - 2)
- (6 pts) Repeat Problem 1, but this time, use the integral

Explain any differences in the value of*n*you find here compared to the value of*n*from Problem 1. - 3)
- (2 pts) Can you use the trapezoidal rule to evaluate

Explain why or why not.