Question
Suppose a0 dollars are deposited in a bank that pays 5% interest per year, compounded quarterly. After one quarter the value of the account isa0
Suppose a0 dollars are deposited in a bank that pays 5% interest per year, compounded quarterly. After one quarter the value of the account isa0 (1 + (0.05)/4)dollars. At the end of the second quarter, the bank pays interest not only on the original amount a0 but also on the interest earned in the first quarter; thus the value of the investment at the end of the second quarter is[a0 (1 + (0.05)/4)] (1 + (0.05)/4) = a0 (1 + (0.05)/4)2dollars. At the end of the third quarter, the bank pays interest on this amount so that the account is now wortha0 (1 + (0.05)/4)3dollars, and at the end of the whole year the investment is finally wortha0 (1 + (0.05)/4)4dollars. In general, if a0 dollars are deposited at an annual interest rate x, compounded n times per year, then the account value after one year isa0 In(x) where In(x) = (1 + x/n)n.
This is the compound interest formula. It is well known that for fixed x,lim n In(x)= ex.
(a) Determine the relative condition number for the problem of evaluating. For x = 0.05, would you say that this problem is well-conditioned or ill-conditioned?
(b) Use MATLAB to compute for x = 0.05 and for n = 1, 10, 102, . . . , 1015. Use 'format long e' so that you can see if your results are converging to ex, as one might expect. Turn in a table with your results and a listing of the MATLAB command(s) you used to compute these results.
(c) Try to explain the results of part (b). In particular, for n = 1015, you probably computed 1 as your answer. Explain why. To see what is happening for other values of n, consider the problem of computing zn, where z = (1 + x/n) when n is large. What is the relative condition number of this problem? If you make an error of about 10-16in computing z, about what size error would you expect in zn?
(d) Can you think of a better way than the method you used in part (b) to accurately compute for x = 0.05 and for large values of n? Demonstrate your new method in MATLAB or explain why it should give more accurate results.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started