Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program, or modify an earlier one, to once more calculate the value of the integral from Example (5.28), using the trapezoidal rule with

Write a program, or modify an earlier one, to once more calculate the value of the integral image text in transcribed from Example (5.28), using the trapezoidal rule with 20 slices, but this time have the program also print an estimate of the error on the result, calculated using the method of Eq. (5.28). To do this you will need to evaluate the integral twice, once with N1 = 10 slices and then again with N2 = 20 slices. Then Eq. (5.28) gives the error. How does the error calculated in this manner compare with a direct computation of the error as the difference between your value for the integral and the true value of 4.4? Why do the two not agree perfectly?

image text in transcribed

Simpson's rule: (a) Write a program to calculate an value for the integral f(x4 2x + 1) dx from Ex- ample 5.1, but using Simpson's rule with ten slices instead of the trapezoidal rule. (b) Run the program and compare your result to the known correct value of 4.4. What is the fractional error on your calculation? (c) Modify the program to use a hundred slices instead, then a thousand. Note the improvement in the result. How do the results compare with those from Example 5.1 for the trapezoidal rule with the same number of slices

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

What is the principle of thermodynamics? Explain with examples

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago