Question: Consider the problem of evaluating the integrals y n = 0 1 x n x + 1 0 d x for n = 1 ,

Consider the problem of evaluating the integrals
yn=01xnx+10dx
for n=1,2,dots. Analytically we notice that
yn+10yn-1=01xn+10xn-1x+10dx=01xn-1dx=1n.
Also,
y0=011x+10dx=ln(11)-ln(10).
This gives us the following algorithm for computing y0,y1,dots :
Compute y0=ln(11)-ln(10).
For n=1,2,dots, evaluate yn=1n-10yn-1.
(a) Show that yn1 for all n and yn decreases monotonically to 0 as n.(A picture
would suffice for this!)
(b) Program the algorithm in a computer and find yn for n=1,2,dots,30. What happens?
Why does this happen?
(c) Derive an algorithm for computing the values of these integrals based on evaluating
the value of yn-1 from the value of yn.
(d) Suppose you want to calculate the values of y0,y1,dots,yN for some number N with
an absolute error of less than for some >0. Since the naive algorithm above
produces large errors (even though it is exact in theory), you will use the algorithm
in (c). But you need a starting value. Show that there exists MinN such that if you
take yM=0 and use the algorithm in (c), then, if calculations are performed with
infinite precision, the absolute errors in the calculations of y0,y1,dots,yN will be less
than .
(e) Explain why rounding errors in the computer do not produce excessive errors using
this algorithm.
(f) Use your algorithm (and the computer) to find the value of y30 to an accuracy of
10-5. Explain how you chose M in this case.
 Consider the problem of evaluating the integrals yn=01xnx+10dx for n=1,2,dots. Analytically

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!