这个作业是完成应用两次牛顿-拉夫森方法的迭代及其他数学问题
MATHS 270: Numerical Computation
Assignment 2
Questions
Due 3:00pm, May 15 via Speedgrader.
Marks 28 is full marks. Include your working, reasoning and justification with your answers.
Mechanical
All the questions in this section of the assignment are to be answered either by hand or by using a calculator. You can check your answers using a computer.
1. [2 marks] Apply two iterations of the Newton-Raphson method to f(x) = 0 where f(x) ≡ cos(x) + 0.45. Use x
(0) = 1. Use eight decimal places in your calculations.
2. [2 marks] Apply three iterations of the Secant method to f(x) = 0 where f(x) ≡ sin(x) + 0.45.
Use x
(0) = 1, x
(1) = 0. Use six decimal places in your calculations.
3. [4 marks] Apply three iterations of the Method of Bisection f(x) = 0 where f(x) ≡ tan(x)+0.45.
You will need to find a bracket. Use four decimal places in your calculations.
4. [4 marks] Apply two iterations of Newton’s method to exp(− exp(−x1 − x2)) − x2(1 + x1)
2 = 0, x1 cos(x2) + x2 sin(x1) − 0.5 = 0
Use x
(0) = [0.4, 0.6]T and the analytical Jacobian. This system of equations is from a mathworks help page for matlab.
A bit more thinking
5. A simple modification to the Newton-Raphson method is Householder’s iteration. The update formula for Householder’s iteration is xk = x(k−1) −ff′1 +ff′′2(f′)2 where on the right hand f and its derivatives are evaluated at x = x(k−1).
(a) [4 marks] Let f(x) = x−2 − π. Use Householder’s iteration to find the solution of f(x) = 0 to machine precision in Matlab. Start with x(0) = 1.
(b) [2 marks] Repeat part (a) using the Newton-Raphson method.
(c) [2 marks] For a general scalar problem f(x) = 0, would you use Householder’s iteration or the Newton-Raphson method? Justify your answer.
6. Let f(x) = 0 be the system of nonlinear equations x31 − 3x1x22 − 1 = 0, 3x21x2 − x32 = 0.1
(a) [4 marks] The system of equations has a root near [−0.6, 0.6]. Use Newton’s method with a forward difference approximation to the Jacobian to find the root. Use the f-test for convergence with tolf = 10−10 and the matlab function fdJac from class with h = 10−8.
(b) [2 marks] Repeat part (a) using a central difference approximation to the Jacobian. Use h = 10−5. The central difference approximation is f′ ≈ f(x + h) − f(x − h) 2h
(c) [2 marks] For a general problem would you prefer to use forward differencing or central differencing for the Jacobian? Justify your answer.
Expectations
As well as getting the right answer, you are expected to show your working. If you are using a computer to find your answer, hand in a printout of your commands. You might find it useful to include diagrams with some of your answers.
Getting help
You main sources of help are a) the section notes, the lecture notes and recordings, b) the textbook,
c) your poor old lecturer.