Sei sulla pagina 1di 6

2

Functions of two variables (Lecture 8)

2.5

Newtons Method for solving the pair of equations f (x, y) = 0 and g(x, y) = 0

Newtons method is an algorithm for solving n nonlinear


equations in n unknowns. We shall describe it for the
case n = 2 but it is simple to see how it can be extended
for any n. We shall use it here to find the solution of
f (x, y) = x + x2y 2 2y + 3 = 0

(1)

g(x, y) = y x3 + 2xy 2 2 = 0

(2)

The method is a generalisation of the Newton Raphson


method for solving the scalar equation f (x) = 0 (with
the simple root ) which we have already discussed and
which can be described in the following way.
i) Choose an initial estimate x0 for the root .
ii) Iterate, i = 0, 1, 2, . . .
evaluate f (xi) and f 0(xi);
compute correction i that satisfies
f 0(xi)i = f (xi);
update the estimate xi+1 = xi + i.
Optional Extra Slide Derivation of Newtons method
for 2 equations
1

Newtons method for solving (1) and (2) is


i) Choose an initial estimate (x0, y0) for the root.
ii) Iterate, i = 0, 1, 2, . . .

For example, equations (1) and (2) have a root near


(0.1, 1.5). Using these values as an initial estimate the
first iteration of Newtons method is
(x0, y0) = (0.1, 1.5)

The next iteration is


(x1, y1) = (0.0914, 1.5559)
f (x1, y1) = 0.0001 and g(x1, y1) = 0.0023

!
1.4426 1.9740
J=
4.8163 1.5689
1 = 0.0004 and 2 = 0.0002
(x2, y2) = (0.0918, 1.5561)
which is correct to 4 decimal places.
3

Example 2.5.1
Use Newtons method to find the two points of intersection of the curves
x2 + 3y 2 = 1
(x 2)2 + (y 1)2 = 4.
(Can you sketch these two curves and prove that there
are two intersections near (0,0.5) and (0.5,-0.4)?)
Solution

For the solution near (0,0.5) we get:

and the second iteration is


(x1, y1) = (0.04166667, 0.58333333)
f (x1, y1) = 0.02256944 and g(x1, y1) = 0.00868056

!
0.08333333
3.5000000
J=
3.91666667 0.83333333
1 = 0.00360659 and 2 = 0.00653428
(x2, y2) = (0.04527325, 0.57679905)
and the third iteration is
(x2, y2) = (0.04527325, 0.57679905)
f (x2, y2) = 0.00014110 and g(x2, y2) = 0.00005570

!
0.09054650 3.46079430
J=
3.90945350 0.84640191
1 = 0.00002320 and 2 = 0.00004138
(x3, y3) = (0.04529646, 0.57675767)
After a further iteration we get (x4, y4) = (0.04529646, 0.57675767),
the same as (x3, y3) to eight decimal places.
For the solution near (0.5,-0.4) we get:
(x0, y0) = (0.5, 0.4)
f (x0, y0) = 0.27 and g(x0, y0) = 0.21


J=

1 2.4
3 2.8

1 = 0.126 and 2 = 0.06


(x1, y1) = (0.626, 0.46)
and the second iteration is
(x1, y1) = (0.626, 0.46)
f (x1, y1) = 0.026676 and g(x1, y1) = 0.019476

!
1.252 2.76
J=
2.748 2.92
1 = 0.00214764 and 2 = 0.00869100
(x2, y2) = (0.62385236, 0.45130900)
and the third iteration is
(x2, y2) = (0.62385236, 0.45130900)
f (x2, y2) = 0.00023121 and g(x2, y2) = 0.00008015

!
1.24770472 2.70785401
J=
2.75229528 2.90261800
1 = 0.00004100 and 2 = 0.00006649
(x3, y3) = (0.62381136, 0.45124251)
After a further iteration we get (x4, y4) = (0.62381136, 0.45124251),
the same as (x3, y3) to eight decimal places.
6

Potrebbero piacerti anche