Question: (Simpson's Rule). For each integral below, determine an appropriate number n of subintervals such that the error in Simpson's Rule |S_{n}-?_{a}^{b}f(x)dx| <10??. (Note: For #3,
(Simpson's Rule). For each integral below, determine an appropriate number n of subintervals such that the error in Simpson's Rule |S_{n}-?_{a}^{b}f(x)dx|<10??. (Note: For #3, no such n can be found; use n=500.) Use the formula |S_{n}-?_{a}^{b}f(x)dx|?((K(b-a)?)/(180n?)), where K is a bound on |f???(x)| on [a,b].
Write a C++ program to estimate the integral by Simpson's Rule; for each integral, input the value of n that you computed. Your program and output should be imported into Scientific Workplace.
Run the program for
1.??x?dx
2.???(x+(1/x))dx
3.???2?(1-x)dx (Note: There is no bound on |f???(x)| for this problem. Use n=500.)
4.??(1/(x+1))dx
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
