Math 3607: Homework 6 2022
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Math 3607: Homework 6
2022
TOTAL: 30 points
• Problems marked with r are to be done by hand; those marked with 旦 are to be solved using a computer.
• Important note. Do not use Symbolic Math Toolbox. Any work done using sym or syms will receive NO credit.
• Another important note. When asked write a MATLAB function, write one at the end of your live script.
1. (Annuity with fzero; FNC 4.1.4) 旦 A basic type of investment is an annuity: One makes monthly deposits of size P for n months at a fixed annual interest rate r, and at maturity collects the amount
˜ ˆ1 ` ˙n ´ 1¸ .
Say you want to create an annuity for a term of 300 months and final value of $1,000,000. Using fzero, make a table of the interst rate you will need to get for each of the different contribution values P = 500, 550, . . . , 1000.
2. (Lambert’s W function; FNC 4.1.6) 旦 Lambert’s W function is defined as the inverse of xex . That is, y = W pxq if and only if x = yey . Write a function y = lambertW(x) that computes W using fzero. Make a plot of W pxq for 0 ď x ď 4.
3. (Fixed-point iteration; adapted from FNC 4.2.1 and 4.2.2.) In each case below,
• gpxq = ´x ` ¯ , r = 3.
• gpxq = π ` sinpxq, r = π .
• gpxq = x ` 1 ´ tanpx\4q, r = π .
(a) r Show that the given gpxq has a fixed point at the given r and that fixed point iteration can converge to it.
(b) 旦 Apply fixed point iteration in MATLAB and use a log-linear graph (using semilogy) of the error to verify (linear) convergence. Then use numerical values of the error to determine an approximate value for the rate σ .
4. (Convergence of Newton’s method) r In the case of a multiple root, where fprq = f\ prq = 0, the derivation of the quadratic error convergence of Newton’s method is invalid. Redo the derivation to show that in this circumstance and with f2 prq ‰ 0 the error converges only linearly.
5. (Predicting next error) r Let f pxq = x3 ´ 4x.
(a) The function f pxq has a root at r = 2. If the error ϵk = xk ´ r after four steps of Newton’s method is ϵ4 = 10 ´6, estimate ϵ5 .
(b) Do the same to the root r = 0.
2022-07-25