Question: NUMERICAL INTEGRATION (35pts). Develop a function in Matlab that implements the iterative (recursive) trapezoidal rule technique covered in lecture, in which points are added in

NUMERICAL INTEGRATION (35pts). Develop a function in Matlab that implements the iterative (recursive) trapezoidal rule technique covered in lecture, in which points are added in between existing points to reach a desired level of accuracy. The function should take 4 arguments: a function handle that returns the mathematical function value at a desired point [func = @(x) ], the integration bounds (a,b), and the desired relative error (eps = 1e-4). It should return the (single) value of the definite integral. Use this code to integrate two functions. a. sin(x) over the interval (a, b) = (0, ?) b. cos(6 ? x) exp(-4 x) over the interval (a,b) = (0, 1 1/2).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!