Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. (45 points) Evaluate by hand the definite integrals below. Subsequently, approx imate them by using the composite Trapezoidal ruletrap (h) for N-2, 4, 8,
1. (45 points) Evaluate by hand the definite integrals below. Subsequently, approx imate them by using the composite Trapezoidal ruletrap (h) for N-2, 4, 8, 16, 32 and 64, where h = (b-a)/N (a) (15 points) I(3x +1) dr (b) (15 points) If-xe dax (c) (15 points) I, To do so, write a MATLAB function (or in any other programming language) stored (cos (x) + 1) dr as trap.m whose first line should read function [y ] = trap ( f, a, b, N ) Include a copy of your code. For each of the cases above make a table with columns: column 1: N column 2: h . column 3: 1trap(h) (this is the approximation, i.e., the output y ) Column 4: |error! (this Is the absolute error) . column 5: errorl/h2 Are the numbers in the last column converging, and if so, what does this mean? Specifically, comment on the behavior of the error for (a) and (b). If your code is correct, you will notice that for (c) the last column is not converging, and that the approximation is very accurate. Can you explain briefly why
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started