- May 15, 2020
MATH 317: Numerical AnalysisAssignment 1 : Due Tuesday 1 October, 2019Important: Submit a complete hard copy of all your solutions either in class or to the Math DeptOffice opposite the elevators on 10th floor of Burnside; this must include Course number, name and idnumber (or it will get lost). Solutions should be complete and include hardcopy of all electronic output,and code, together with explanations. Work not submitted on paper will not be graded. Submit allrelevant programme files and documentation to explain them. Get in the habit of including commentsin your code. Write your own code!1. a) How accurately do we need to specify pi to be able to compute pi1/3 with four correct decimals?b) Convert the binary number 10.111101 to base 10.2. The function [1 + x2 − ex]−1 (say x ≥ 0) is singular at x = 0, but in principle we should be able tocalculate it for arbitrarily small x. What would be the most accurate way to do this on a computer?3. Compute the root of the equation f(x) = x− cosx using the secant method and Newton-Raphson.You need to make initial guesses. Try a few. Explain the behaviour.4. For problem 3, above, consider the two fixed-point iterations: xn+1 = cosxn and xn+1 = cos−1 xn.Code these up and compare their performance to the methods of question 3 above. Explain thebehaviour.5. In class we looked at finding the root of x−e−x using the fixed-point iteration xn+1 = − lnxn. Since|φ′(x∗)| > 1 at the root, it diverges. Here’s an interesting idea: introduce an adjustable parameter λand iteratexn+1 =− lnxn + λxn1 + λ.a) show that the fixed point is the root of our function x− e−x regardless of the value of λ,b) would it be possible to choose λ such that convergence is restored? If so, for what range of values?,c) code this up and use it to determine the root to 6 decimal places. What is the value of λ thatconverges the fastest?