python 3.9 using adaptive integration method please!
DIE Exercise 5.7: Consider the integral I= = 1 sin sin? 100x dx. a) Write a program that uses the adaptive trapezoidal rule method of Section 5.3 and Eq. (5.34) to calculate the value of this integral to an approximate accuracy of e = 10-6 (i.e., correct to six digits after the decimal point). Start with one single integration slice and work up from there to two, four, eight, and so forth. Have your program print out the number of slices, its estimate of the integral, and its estimate of the error on the integral, for each value of the number of Slices N, until the target accuracy is reached. (Hint: You should find the result is around I = 0.45.) b) Now modify your program to evaluate the same integral using the Romberg in- tegration technique described in this section. Have your program print out a triangular table of values, as on page 161, of all the Romberg estimates of the in- tegral. Calculate the error on your estimates using Eq. (5.49) and again continue the calculation until you reach an accuracy of e = 10-6. You should find that the Romberg method reaches the required accuracy considerably faster than the trapezoidal rule alone. DIE Exercise 5.7: Consider the integral I= = 1 sin sin? 100x dx. a) Write a program that uses the adaptive trapezoidal rule method of Section 5.3 and Eq. (5.34) to calculate the value of this integral to an approximate accuracy of e = 10-6 (i.e., correct to six digits after the decimal point). Start with one single integration slice and work up from there to two, four, eight, and so forth. Have your program print out the number of slices, its estimate of the integral, and its estimate of the error on the integral, for each value of the number of Slices N, until the target accuracy is reached. (Hint: You should find the result is around I = 0.45.) b) Now modify your program to evaluate the same integral using the Romberg in- tegration technique described in this section. Have your program print out a triangular table of values, as on page 161, of all the Romberg estimates of the in- tegral. Calculate the error on your estimates using Eq. (5.49) and again continue the calculation until you reach an accuracy of e = 10-6. You should find that the Romberg method reaches the required accuracy considerably faster than the trapezoidal rule alone