Menu

[Solved]6 Trapezoidal Vs Simpson Lecture Slides Discussed Pseudocodes Evaluate Integrations Using Q37157568

6. Trapezoidal vs. Simpson. In the lecture slides we discussed pseudocodes to evaluate integrations using Simpsons 1/3 rule

“6. Trapezoidal vs. Simpson. In the lecture slides we discussed pseudocodes to evaluate integrations using Simpson’s 1/3 rule and the trapezoidal rule. (a) Develop a single MATLAB function (call it trap_simp) that performs both types of approximations on an even number of intervals. The function needs from the use the limits of integrations (a,b) and the number of segments to be integrated. The function outputs the approximate value of the integration using both Simpson 1/3 and trapazoidal rules. (b) Test your function on the integration: 20kx-1 0.1 The true value of this integration is 0.60229807098. (c) Develop a MATLAB script (call it pset5_prob6) that calculates the value of integration using both Simpson 1/3 and trapezoidal by invoking the previous MATLAB function while varying the number of segments from n-2 to n-1000,000 (Warning this might take long time! You do not need to go from n-2 to n-1000,000 in steps of 1!). Plot the true percent error for both Simpson’s 1/3 and trapezoidal as a function of the number of segments on the same graph. We recommend using log-log plot. of might take long Show transcribed image text “6. Trapezoidal vs. Simpson. In the lecture slides we discussed pseudocodes to evaluate integrations using Simpson’s 1/3 rule and the trapezoidal rule. (a) Develop a single MATLAB function (call it trap_simp) that performs both types of approximations on an even number of intervals. The function needs from the use the limits of integrations (a,b) and the number of segments to be integrated. The function outputs the approximate value of the integration using both Simpson 1/3 and trapazoidal rules. (b) Test your function on the integration: 20kx-1 0.1 The true value of this integration is 0.60229807098. (c) Develop a MATLAB script (call it pset5_prob6) that calculates the value of integration using both Simpson 1/3 and trapezoidal by invoking the previous MATLAB function while varying the number of segments from n-2 to n-1000,000 (Warning this might take long time! You do not need to go from n-2 to n-1000,000 in steps of 1!). Plot the true percent error for both Simpson’s 1/3 and trapezoidal as a function of the number of segments on the same graph. We recommend using log-log plot. of might take long

Expert Answer


Answer to “6. Trapezoidal vs. Simpson. In the lecture slides we discussed pseudocodes to evaluate integrations using Simpson’s 1/3… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *