Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

python 3.9 using adaptive integration method please! image text in transcribed
image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

6(3x-2) Factor 18x - 12 completely. 3(6x-4) 2(9x-6) 6x(3x-2)

Answered: 1 week ago