Develop an M-file function to implement Romberg integration based on Fig. 20.2. Test the function by using

Question:

Develop an M-file function to implement Romberg integration based on Fig. 20.2. Test the function by using it to determine the integral of the polynomial from Example 20.1. Then use it to solve Prob. 20.1.

Fig.20.2

Example 20.1


Data From Problem 20.1

Use Romberg integration to evaluate

to an accuracy of εs = 0.5%.Your results should be presented in the format of Fig. 20.1. Use the analytical solution of the integral to determine the percent relative error of the result obtained with Romberg integration. Check that εt is less than εs.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: