Vous êtes sur la page 1sur 38

Fixed Point Iterations

Newton Raphson

Fixed point iterations


Our next two methods, Newton-Raphson and x=g(x) are
both called fixed point iterations
A starting value for x is used (called x0) which is known
to be close to the root of the equation.
A repetitive routine (called an iteration) calculates new
values for x. These are called x1, x2, x3 etc
The longer we carry out the routine the closer our
iterations x1, x2, x3, x4 etc get to the real solution
Eventually some figures become fixed (do not change)
hence the name fixed point iteration
The repetitive nature of the routines means IT can be
used to get solutions easily and quickly

The Newton Raphson method


Mark

Criteria

The method is applied successfully to find one root of


a second equation

All the roots of the equation are found

The method is illustrated graphically for one root

Error bounds are established for one of the roots

An example is given of an equation where the method


fails to find a particular root despite taking a starting
value close to it. There is an illustrated explanation of
why this has happened

1st mark - The NR method is applied successfully


to find one root of a second equation
You must use a new different equation
Your equation must have two or more roots. Not
too many as you later have to find them all!
Use Autograph to check none of the roots are
integers.
Do an integer search to find the rough positions
of the roots. These are used as a first estimate
for x0
Use Autographs Newton Raphson facility to find
one root to at least an accuracy of 5 sig. figs.

An integer search using Table of


Values in Autograph gives
x
-4
-3
-2
-1
0
1
2
3
4
5
6
7

f(x)
-124
-59
-20
-1
4
1
-4
-5
4
29
76
151

We can see there


are roots in the
intervals [-1, 0],
[1, 2] and [3, 4]
We will first find
the root in the
interval [3, 4]

Use Newton Raphson to find one root to the


desired level of accuracy

f (x n )
x n +1 = x n
f ( x n )

NR uses the iteration:


For the equation

If

So

x 4x + 4 =
0
3

2
f ( x) = x 3 4 x 2 + 4 then f ( x ) = 3 x 8 x

xn +=
xn
1

xn3 4 xn2 + 4
3 xn2 8 xn

Using our example x 4 x + 4 =


0
To find the root in the interval [3, 4] we can take
x0 = 3 or x0 = 4
Show the calculation of the first two
approximations by hand (we will use x0 = 3).
3

x 4x + 4
xn +=
xn
1
3 xn2 8 xn
3
n

2
n

If you do not use 4.6


here you will get large
rounding errors!

x03 4 x02 + 4
33 4 32 + 4 14
x1 = x0
= 3
=
= 4.6
2
2
3 x0 8 x0
3 3 8 3
3

3 4 4.6 2 + 4 757
x13 4 x12 + 4
4
.
6

x2 = x1
=
=
= 4.0052910
4
.
6
2
2

3 x1 8 x1
3 4.6 8 4.6 189

Autograph has a Newton Raphson facility to find the iteration


very quickly. Starting with x0=3 it gives the table below

link

x
3
4.6666664
4.0052909

|x|
1.6666664
0.66137551

The x column shows the iterations x0, x1, x2, x3, etc
The |x| column shows the difference in the successive
iterations. As |x| gets smaller the iterations are getting
nearer to the root
x
3.7092754

|x|
6.70E-07

Here you can see |x| is very small so we are very close
to the root. We can say the root is near to 3.7093

The table can be copied into Word but dont forget to add
column headings
xn
3
4.6666664
4.0052909
3.751331
3.7103203
3.709276
3.7092754

Change in xn
1.6666664
0.66137551
0.25395988
0.04101069
0.001044289
6.70E-07

We continue until the first six (or more) significant figures


are fixed
Nb Check your calculations done by hand are the same
as the Autograph values. Are any differences small
enough to be rounding errors?

xn
3
4.6666664
4.0052909
3.751331
3.7103203
3.709276
3.7092754

Change in xn
1.6666664
0.66137551
0.25395988
0.04101069
0.001044289
6.70E-07

6 fixed
figures

So the iteration shows the root as being


near to 3.7093 to 5 sig. Figs.

Congratulations you have


earned another mark!

2nd mark All the roots of the equation are found

Use Newton Raphson to find the two


remaining roots of the equation to the
desired level of accuracy. In our example
this means the two roots in the intervals
[1, 2] and [-1, 0]

Using Newton Raphson and Autograph to find the


root in the interval [1,2] starting with x0=1

Enlargement of the table

xn
1
1.2
1.193939
1.193937

Change in xn
0.2
0.006061
2.83E-06

6 fixed
figures

The iteration gives the root as


1.1939 correct to 5 sig. Figs.

Using Newton Raphson and Autograph to find the


root in the interval [-1,0] starting with x0=-1

Enlargement of the table

xn
-1
-0.90909091
-0.90323575
-0.90321193
-0.90321193

Change in xn
0.090909
0.005855
2.38E-05
3.95E-10

8 fixed
figures

The iteration gives the root as


-0.90321 correct to 5 sig. Figs.

Congratulations you have


earned another mark!

3rd mark - The method is illustrated graphically for


one root
This is easily done using Autograph
You must show the positions of x0, x1, x2 etc on
the x axis
You must also show arrows on your lines to
illustrate how the progression from x0 to x1 to x2
etc takes place.
You should explain how the graphical illustration
relates to what happens with the Newton
Raphson method as we calculate each iteration.
Do NOT just copy the graph from Autograph

Illustrate method graphically for one root

x0
x3 x2

x1

Newton Raphson converges to a value near to 3.7093


The annotation on the graph is very important !

Interpreted graphically the Newton Raphson method


follows these steps:
start at a point x0 on the x axis and draw a vertical line
up or down to meet the curve y=f(x)
At the point where this vertical line meets the curve a
tangent is drawn and extended to meet the x axis
This new point on the axis becomes x1
From x1 draw a vertical line up or down to meet the
curve y=f(x).
At the point where this vertical line meets the curve a
tangent is drawn and extended to meet the x axis.
This new point on the axis becomes x2
This procedure is repeated and the points generated on
the x axis get nearer and nearer to the root
You must write up this
explanation in your own words

Congratulations you have


earned a mark!

4th mark -Error bounds are established for one of


the roots
Unlike the C of S method the Newton Raphson
method does NOT trap the root between two
values so we do not yet have error bounds
In our example all we know the root is near to
3.7093. We need to show it is in fact nearest to
3.7093 and not nearer to 3.7092 or 3.7094
We use the change of sign method to trap the
root between two bounds
We evaluate f(3.70925) and f(3.70935)
f(3.70925) = -2.9421E-04
3.7093 0.00005
f(3.70935) = 8.6602E-04

Error bounds (cont)


The change of sign for f(3.70925) and
f(3.70935) demonstrates that there is a root
somewhere between these two values
We have therefore established solution bounds
as 3.70925 < x < 3.70935
We can also write the bounds as error bounds
3.7093 0.00005
Since all values in the range (3.70925, 3.70935)
round to 3.7093 we can say for certain that the
root is 3.7093 to 5 sig.figs.

Congratulations you have


earned another mark!

5th mark - An example is given of an equation where the


method fails to find a particular root despite taking a
starting value close to it. There is an illustrated
explanation of why this has happened
Firstly - what do we mean by success and failure of the
Newton Raphson method?
Success is when the Newton Raphson method
converges on the root near to where we started
Failure is when the method either diverges away from
the root near to where we started and ends up finding no
root at all or instead converges onto a different root.

Four reasons Newton Raphson fails are:


The graph crosses the x axis with a very steep
gradient
The starting value is the wrong side of a turning
point
The function has a discontinuity
The function is not defined over the whole of R.
You only have to find one of these failures

1. The graph crosses the x axis with a


very steep gradient
y=(x3-4x2+4)1/3

xn
4

The steep crossing points


were caused by the power 1/3

3.25
5.319
2.39
-5.481

x4

x3

x1

x0

0.8074

x2

2.086
-1.485
-0.1718
-8.122
0.9581
1.696
0.1006

link

As can be seen the iteration is


not converging to the root near 4
despite starting near to 4

x4

x3

x1

x0

x2

The failure was initially caused by the steep x axis


crossing near to x0 which took iterations further away
from 4 rather progressively nearer to 4
Later in the iteration (x3x4) the turning point near
to x3 caused the iteration to diverge off wildly

2. The starting value is close to a


turning point
xn
1
2.5

x0
y = (x 0.8)(x 1.2)(x 2.5)

link

x1

2.5
2.5

Expanded this becomes:

2.5

Y = x3 4.5x2 + 5.96x 2.4

2.5

The equation must be given in expanded


form y = x3 4.5x2 + 5.96x 2.4 and
not as y = (x 0.8)(x 1.2)(x 2.5)

As can be seen the


iteration converges
but not to the roots
near to where we
started at x0 = 1

x0

x1

The turning point near to x0 caused the


divergence

3. The function has a discontinuity


1
y= 3
+5
2
x 4x + 4

xn

The reciprocal causes


discontinuities

9.25

5633

x1
Unfortunately Autograph does not
draw this graph correctly so it
would need editing

This divergence has been caused by the


discontinuity at the root near to 4

Divergent

x2

As can be seen
the iteration does
not converge to
the root near to 4

link

The function is not defined over the


whole of R
xn

3.25

x1

x0

Overflow

y = ( x 3 4 x 2 + 4) 0.5
y = x3 4 x 2 + 4
As can be seen the iteration
does not converge on the
root near to 4

Since square roots are undefined


for negative values then y is not
defined over the whole range

link

x1

The

x0

function was not defined over the


whole of R. Our iteration quickly fell into the
undefined part and could not continue

What you have to do


Find an equation where the Newton Raphson
method fails to converge on a particular root
despite taking a starting value close to it.
You must show a table giving sufficient iterations
to clearly demonstrate that it is not converging to
the root near to where you started
You must also give a graphical illustration and a
brief explanation as to why the method has
failed
You ONLY need ONE failure case. Do NOT try
to do each type of failure!

Congratulations you have


earned another mark!

Now its time for you to begin!


Start something like this
I am going to use Newton Raphsons iterative
method to solve the equation
x3 2 x 2 5x + 6 = 0
Always include an image of the graph
We are using the Newton Raphson iterative
method to solve the equation, NOT Autograph.
Autograph is only our tool to help us do this

End
of
presentation

Vous aimerez peut-être aussi