Computer Science, asked by Swarup1998, 11 months ago

Write a program in C or FORTRAN 90 to evaluate \int_{1}^{5}\frac{dx}{\sqrt{5+x^{2}}} by Trapezoidal rule with 40 subinterval.​

Answers

Answered by as7640733gmailcom
0

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.

Answered by Ompravassahoo
0

Answer:

please mark me as brainliest

Explanation:

Recall that we have used different numerical methods to approximate the value of definite integrals. The methods we have looked at so far use rectangular or trapezoidal segmentation of the area under the function curve and might not be as accurate for functions where straight line segments are not the best approximation to the function curve. It is reasonable to think that other methods of approximating curves might be more applicable for some functions. Simpson’s Rule is a method that uses parabolas to approximate the curve instead of line segments. Do you think that the use of parabolas would give a more accurate result than the use of rectangles? Why? Can you think of any reason why the concavity of the function curve would matter in the accuracy of the area estimation using parabolas?

Similar questions