Question: Please write the code using Python 2. Write a computer code to implement the Composite Trapezoidal Rule quadrature to approximate the definite integral b, where

Please write the code using Python
 Please write the code using Python 2. Write a computer code

2. Write a computer code to implement the Composite Trapezoidal Rule quadrature to approximate the definite integral b, where using the equally spaced points zo = a, = xo + h, x,-zo + 2h, . .. ,.EN 11 = (b-a)/N (a) Test your code with f(x) = 1/(1+1)2 in [0,2] by computing the error l[f-Th[nl for h = 2/20, 2/40.2/80, and verify that T, has a convergent trend at the expected. quadratic rate. (b) Let f(x)-2/3 in [O, 1]. Compute T1/N for N = 16, 32, 64, 128, Do you see a second order convergence to the exact value of the integral? Explain

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!