Question: Write a single Matlab code (as opposed to a separate code for each method) to compute this integral using the methods listed below. Your code

 Write a single Matlab code (as opposed to a separate code

Write a single Matlab code (as opposed to a separate code for each method) to compute this integral using the methods listed below. Your code should print (i) value of the integral, and (ii) absolute error (for all methods.) Include a hard copy of your code and the output of your code in your solutions.

i. (1 pts.) Left-end point method using 9 function evaluations (8 sub intervals) ii. (1 pts.) Right-end point method using 9 function evaluations (8 sub intervals)

iii. (1 pts.) Trapezoid method and using 9 function evaluations (8 sub intervals) 1

iv. (1 pts.) Simpsons method using 9 function evaluations (8 sub intervals) v. (2 pts.) Romberg method and using 9 function evaluations (4 levels)

vi. (2 pts.) Gaussian quadrature using 3 function evaluations vii. (2 pts.) Gaussian quadrature using 4 function evaluations viii. (2 pts.) Gaussian quadrature using 5 function evaluations

Consider the following integral (sin x + cos x) dx = 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!