MATHS 270: Numerical Computation
Assignment 2
Questions
Due 3:00pm, May 15 via Speedgrader.
Mechanical
All the questions in this section of the assignment are to be answered either by hand or by using
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
x
k = x
(k−1) −
f
f


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
(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
6. Let f(x) = 0 be the system of nonlinear equations
x
3
1 − 3x1x
2
2 − 1 = 0, 3x
2
1×2 − x
3
2 = 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
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
Getting help
You main sources of help are a) the section notes, the lecture notes and recordings, b) the textbook,
2 EasyDue™ 支持PayPal, AliPay, WechatPay, Taobao等各种付款方式!

E-mail: easydue@outlook.com  微信:easydue

EasyDue™是一个服务全球中国留学生的专业代写公司