19: Newton-Raphson 19: Newton-Raphson IterationIteration
© Christine Crisp
““Teach A Level Maths”Teach A Level Maths”
Vol. 2: A2 Core Vol. 2: A2 Core ModulesModules
Newton-Raphson Iteration
Module C3
"Certain images and/or photos on this presentation are the copyrighted property of JupiterImages and are being used with permission under license. These images and/or photos may not be copied or downloaded without permission from JupiterImages"
MEI/OCR
Newton-Raphson Iteration
)(1 nn xgx
It isn’t always possible to find iterative formulae of the type
that will find the solution of every equation.
Another iterative method that is useful is called the Newton-Raphson method.
Newton-Raphson Iteration
)(xfy
Suppose we want to find an approximate solution to the equation0)( xf
The root lies between 1 and 2.
To see how the method works, we’ll sketchusing .
)(xfy 1)( 3 xxxf
We’ll zoom in near
Newton-Raphson Iteration
)(xfy
Suppose our first estimate is given by . 20 xWe draw the tangent to the curve at0x
0x
Each point , , . . . is closer to . 1x 2x
1x
Repeating . . .
2x
The point where the tangent meets the x-axis we call .1x
Newton-Raphson Iteration
)(xfy
0x1x
),( 00 yxx
To carry out the iteration we need to find the points where the tangents meet the x-axis.
The grad. of the tangentx
y
in change the
in change the
10
00 xx
yx
dx
dy
at
0y
10 xx
Newton-Raphson Iteration
)( 00 xfy and
10
00 xx
yx
dx
dy
at
We have and we need to find . 1x
Then,
10
00
/ )()(
xx
xfxf
Rearranging: )(
)(
0/
010
xf
xfxx
)(
)(
0/
001
xf
xfxx
Using and in the formula isn’t very
convenient, so, since we have)(xfy 0x
dx
dy at0y
)( 0/
10
00 xf
xx
yx
dx
dy
at
Newton-Raphson Iteration
)(
)(
0/
001
xf
xfxx So,
We just need to alter the subscripts to find : 2x
)(
)(
1/
112
xf
xfxx
Generalising gives
)(
)(/1
n
nnn
xf
xfxx
We don’t need a diagram to use this formula but we must know how to differentiate .
)(xfConvergence is often very fast.
Newton-Raphson Iteratione.g. Use the Newton-Raphson method with
to find the root of the equation 20 x
013 xxcorrect to 4 d.p.
Solution: Let 1)( 3 xxxf
Differentiate: 13)( 2/ xxf
)(
)(/1
n
nnn
xf
xfxx
)13(
)1(2
3
1
n
nnnn
x
xxxx
Using a calculator we need:
ENTER,2
)d.p. ( 461801x
ANS
ANS(ANSANS
)13(
)12
3
Then,
Newton-Raphson IterationSUMMAR
YTo use the Newton-Raphson method to estimate a root of an equation:
rearrange the equation into the form 0)( xf
choose a suitable starting value for 0x
substitute and into the formula )(xf )(/ xf
differentiate to find )(xf )(/ xf
Tip: It saves a lot of errors if, before you type the formula into your calculator, you write the formula with ANS replacing every x.
use a calculator to iterate
)(
)(/1
n
nnn
xf
xfxx
Newton-Raphson Iteration
Exercise
1. (a) Use the Newton-Raphson method to estimate the root of the following equation to 6 d.p. using the starting value given:
;022 23 xx 10 x
(b) What happens if you use ?
22 23 xxy
00 x(c) Use your calculator or a graph plotter to
sketch the graph of .(d) What is special about the graph at
and why does it explain the answer to (b) ?
00 x
2. Use the Newton-Raphson method to estimate one root of to 4 d.p. using
xx 1cos3 20 x
Newton-Raphson Iteration
Solution: Let 22)( 23 xxxf
;022 23 xx 10 x(a)
xxxf 43)( 2/
)(
)(/1
n
nnn
xf
xfxx
)43(
)22(2
23
1
nn
nnnn
xx
xxxx
ANS)ANS
ANS(ANSANS
43(
)222
23
...,8395450,8571430,1 210 xxx
) d.p. 6( 8392870x
Newton-Raphson Iteration
The iteration fails immediately.
(b) What happens if you use ?00 x
)43(
)22(2
23
1
nn
nnnn
xx
xxxx
(c)22 23 xxy
At x = 0, there is a stationary point.
We also notice that the tangent never meets the x-axis.
At a stationary point so in the formula we are dividing by 0.
0)(/ xf
Newton-Raphson Iteration
Solution:
,20 x
2. Use the Newton-Raphson method to estimate one root of to 4 d.p. using
xx 1cos3 20 x
Let xxxf 1cos3)(
1sin3)(/ xxf
)(
)(/1
n
nnn
xf
xfxx
)1sin3(
)1cos3(1
n
nnnn x
xxxx
Radians!
86241,85621 21 xx) d.p. ( 4 86241x
)1sin3(
)1cos3(1
ANS
ANSANSANSxn
Newton-Raphson Iteration
The Newton-Raphson method will fail if
i.e. at a stationary point 0)(/ xf
It will also sometimes fail to give the expected root if the initial value is close to a stationary point. Can you draw a graph to show what could happen in this case?
This is one example.
Newton-Raphson Iteration
152 23 xxxy
With the iteration gives the root
instead of the closer root .
910 x
5761x 1870x
0x
Newton-Raphson Iteration
Newton-Raphson Iteration
The following slides contain repeats of information on earlier slides, shown without colour, so that they can be printed and photocopied.For most purposes the slides can be printed as “Handouts” with up to 6 slides per sheet.
Newton-Raphson Iteration
)(1 nn xgx
It isn’t always possible to find iterative formulae of the type
that will find the solution of every equation.
Another iterative method that is useful is called the Newton-Raphson method.
Newton-Raphson IterationSUMMAR
YTo use the Newton-Raphson method to estimate a root of an equation:
rearrange the equation into the form 0)( xf
choose a suitable starting value for 0x
substitute and into the formula )(xf )(/ xf
differentiate to find )(xf )(/ xf
Tip: It saves a lot of errors if, before you type the formula into your calculator, you write the formula with ANS replacing every x.
use a calculator to iterate
Newton-Raphson Iteratione.g. Use the Newton-Raphson method with
to find the root of the equation 20 x
013 xxcorrect to 4 d.p.
Solution: Let 1)( 3 xxxf
Differentiate: 13)( 2/ xxf
)(
)(/1
n
nnn
xf
xfxx
13
12
3
1
n
nnnn
x
xxxx
Using a calculator we need:
ENTER,2
)d.p. ( 461801x
ANS
ANSANSANS
13
12
3
Then,
Newton-Raphson Iteration
The Newton-Raphson method will fail if
i.e. at a stationary point 0)(/ xf
It will also sometimes fail if the initial value is close to a stationary point.