Question: CPP PROGRAM! Estimating definite Integrals, L n = i = 0 n - 1 f ( x i ) x or the right end -

CPP PROGRAM!
Estimating definite Integrals, Ln=i=0n-1f(xi)x
or the right end-point approximation
Rn=i=1nf(xi)x
There are functions which have no anti-derivatives and thus one can't use the Fundamental Theorem of Calculus and instead must be estimated.
Hopefully you're all aware that increasing n which is the number of rectangles in the estimate usually increases the accuracy.
The idea is to increase until the difference between the two approximations is less than some tolerance which we call lon. For example, imagine that
the estimate for n1 and n2 rectangles are respectively Rn1=5.001 and Rn2=5.002 the difference between the two errors is
|Rn2-Rn1|=0.001
if the difference of the errors is less than the tolerance lon then we stop increasing the number of rectangles and use the last estimate as the estimating
value.
Program
You will create a program which estimates the definite integral of f(x) between x=a and x=b using either the left-end point or right-end point
approximation. The program will increase n until the difference of the errors is less than the given tolerance.
Use the header for some of the functions.
f(x)=x2+3x+6 between x=1 and x=5 with lon=0.2. What was the value of n? Compare to the actual value.
f(x)=cos(3x) between x=0 and x=0.5 with lon=0.1. What was the value of n? Compare to the actual value.
f(x)=32x+1 between x=4 and x=5 with lon=0.02. What was the value of n? Compare to the actual value.
 CPP PROGRAM! Estimating definite Integrals, Ln=i=0n-1f(xi)x or the right end-point approximation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!