Please help me question 2, I don't know what to do. Thank you
Assignment 3 STMATH 405 Fall 2019 Due Thursday, Oct 24, before 11:59 pm 1. [16 points] Suppose we want to calculate W for some positive real number I). This calculation arises frequently in applications; for example, when normalizing vectors (dividing by their length). (a) Use Newton's method to derive an iteration that converges quadratically to E, which uses only multiplication and addition/subtraction. The iteration must not require dividing or taking the square root of any numbers. However, you can assume that fractional constants (e.g. %. %, etc.) can be piecomputed, and so do not require division. Hint: It may help to review Lab 5 to nd a function f that will work for this problem. (b) Write a Matlab function with the following signature: function [y, num_its] = rsqrt(b,x0,atol,N) which iteratively computes E using your iteration from part (a). The iteration should start from :m and 1 rim until |ar:;c 7 mkcl| : xrm _ m We ) 'f'(x"\"))' Note that any root of f is still a xed point of this iteration. Show that this iteration will converge quadratically, not linearly, to the multiple root of f. Hint: A couple of our results from the class when we discussed convergence of Newton's method are helpful 7 you donit need to rederive them. (b) Consider the function f(x) = 2 x2 + sin(ar2 2). Note that 90* = is a root of f. Run newtons.m on the function f, starting from an initial guess of x0 = 1.5, with atol = 1e-12 and N = 20. How many digits of the answer are correct? Based on the linear ratio column output by the method, what is the multiplicity of the root? c o i . newtons.m o imp emen e mo 1 e i era ion rom par. a . our new me o s ou a e in Md'fv t'l tth d'd't t' f t Y thdhldtk' an extra parameter, :11, corresponding to the multiplicity of the root. Run the modied iteration on the problem from part b), passing in the correct value of m. What do you observe? To submit: Written answers to parts a)7c), printout of results for parts 1)) and c), code for part c) Question 3 is on the next page