Question: (35 pts.) Write a matlab program that computes an integral numerically, using the composite Trapezoidal, Mid-point and Simpson methods. Input for the program consists of

(35 pts.) Write a matlab program that computes an integral numerically, using the composite Trapezoidal, Mid-point and Simpson methods. Input for the program consists of the ends of the integration interval, and the number of (uniform) subintervals (r). Apply your program to the following integral ???? 0 Run your program for r 2, 4, 8, 16, 32) and print out the output and the absolute error for all methods as in the example (Note that h- b-a _trap etrap l_ mid e_mid _simp e_simp r-2 3.1000 4.16e-02 3.1624 -2.08e-02 3.1333 8.26e-03
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
