Write a program in C or FORTRAN 90 to evaluate by Trapezoidal rule with 40 subinterval.
Answers
Answer:
into
n
sub-intervals of length
△x=b−an
.
Parabolas are then constructed through each group of three consecutive points on the graph. The graph below shows this process for the first three such parabolas for the case of
n=6
sub-intervals. You can see that every interval except the first and last contains two estimates, one too high and one too low, so the resulting estimate will be more accurate.
Using parabolas in this way produces the following estimate of the area from Simpson’s Rule:
∫abf(x)dx≈△x3[f(x0)+4f(x1)+2f(x2)+4f(x3)+2f(x4)…+2f(xn−2)+4f(xn−1)+f(xn)].
We see that it has a similar appearance to the Trapezoidal Rule. However, there is one distinction we need to note. The process of using three consecutive
xi
to approximate parabolas will require that we assume that
n
must always be an even number.
Error Estimates for Simpson’s Rule
As with the Trapezoidal Rule, we have a formula that suggests how we can choose
n
to ensure that the errors are within acceptable boundaries. The following method illustrates how we can choose a sufficiently large
n
.
Suppose
|f4(x)|≤k
for
a≤x≤b
. The error estimate is then given by
|Errorsimpson|≤k(b−a)5180 n4.
Apply the information above and use Simpson’s Rule to approximate
∫141xdx
with
n=6
.
We find
△x=b−an=4−16=12
.
∫141xdx≈16[f(1)+4f(32)+2f(2)+4f(52)+2f(3)+4f(72)+f(4)]=16[1+(4⋅23)+(2⋅12)+(4⋅25)+(2⋅13)+(4⋅27)+14]=16[3517420]=1.3956.
This turns out to be a pretty good estimate, since we know that
∫141xdx=lnx]41=ln(4)−ln(1)=1.3863.
Therefore the error is less than 0.01.
Answer:
please mark me as brainliest
Explanation: