Newton-Raphson Method - Lesson
Newton-Raphson Method - Lesson
(Newton’s Method)
Jamie Frost
www.drfrost.org
@DrFrostMaths
𝑥 0=3
We hope that our
estimate of the solution to
the equation ‘converges’
to the true solution
reasonably quickly.
Our solution was correct
to 3 decimal places by
the 4th iteration, which
isn’t bad!
But fixed-point iteration isn’t the only technique we can use.
Other methods differ in both the speed they typically converge
to the solution, but also the circumstances in which they
might fail to converge.
𝑦 𝑦 = 𝑓 ( 𝑥)
Fixed-point iteration, Newton-Raphson
and linear interpolation are all
𝑥 examples of root-finding
𝛼
Roo algorithms, where we are trying to
t find a value of such that
Introducing the Newton-Raphson Method
(also known as Newton’s
method) We wish to find the root .
Suppose we start with the
𝑦 indicated approximation of the
root, . At the moment, is far
away from the true solution .
A seemingly sensible thing to do Terminology reminder:
is to follow the direction of the The roots of a graph are its
line, i.e. use the gradient of the -intercepts, i.e. the where
tangent.
If the line was reasonably straight,
the point the tangent hits the -axis is closer to than was.
would be close to the root. We could then repeat the
process to get a better
Our current value of is approximation of the root,
now pretty close to the , which again we hope is
root . closer to .
𝛼 𝑥
𝑥2 𝑥1 𝑥0
𝒚 =𝒇 ( 𝒙 )
Demo (Courtesy of
Wikipedia)
We are
interested
Equation of tangent: where the
𝛼2 𝑥 -intercept of tangent:
tangent hits
the -axis. This
is when .
Test Your Understanding drfrost.org/
s/
611a
4 2
1 A function is defined as . 𝑦 = 𝑓 ( 1 )=1 −1 +1 −2=−1
′ 3
𝑓 ( 𝑥 )=4 𝑥 − 2 𝑥 +1
We wish to find the value
such that .
We start with as an
approximate value of . 𝑦
Use the principle of
Newton-Raphson method
once to find a better
approximation of , to 𝑚=3
decimal places.
𝑥𝛼
? 𝑥
0
𝑥
𝑦 1
( 1 , −1 )
Equation of tangent:
1𝛼 𝑥
-intercept of tangent:
When Will Newton-Raphson Fail? drfrost.org/
s/
611b
𝑦
What starting value of for this
graph will cause the algorithm to
fail?
If the starting value of coincides with
a stationary point, then the tangent
𝑥0 𝛼 𝑥
will be horizontal and never cuts
the -axis.
tangen
t
𝑥
𝑦=
√ 1 + 𝑥2 Newton-Raphson also suffers from the
𝑦
same drawbacks as solving by fixed-
point iteration, in that it’s possible for
𝑥1 𝛼 𝑥0 𝑥2
𝑥 the values of to diverge.
In this example, the oscillate either side
of 0, but gradually getting further away
from .
Deriving an Iterative Formula for Newton-
Raphson
𝑦 To have an iterative formula, we
need in terms of , i.e. how to
get from one approximation of
the root (the th) to the next.
(𝑥𝑛 ,𝑓 ( 𝑥𝑛) )
What is the equation of this
tangent? ′
𝑦 − 𝑓 ( 𝑥 𝑛 ) = 𝑓 ( 𝑥𝑛 ) ( 𝑥 − 𝑥 𝑛 )
Intersects at :
! Newton-Raphson
iterative formula:
𝑥𝑛+1 𝑥 𝑛
𝑥
𝛼
𝑦 = 𝑓 ( 𝑥)
Quickfire Recurrences drfrost.org/
s/
611c
2 ! Newton-Raphson
Using the Newton-Raphson process,
iterative formula:
state the recurrence relation to find the
roots of the following functions:
( 𝒙 𝒏 )𝟑 − 𝟐
a𝑓 ( 𝑥 ) =𝑥 3 − 2 𝒙 𝒏+𝟏 = 𝒙 𝒏 − 𝟐
?
𝟑 ( 𝒙 𝒏)
𝟐
2
( 𝒙 𝒏) − 𝒙 𝒏−𝟏
𝑓b ( 𝑥 ) =𝑥 − 𝑥 − 1 𝒙 𝒏+𝟏 = 𝒙 𝒏 −
𝟐 𝒙𝒏 −𝟏
?
𝐭𝐚𝐧 𝒙 𝒏 𝟏
𝑓c ( 𝑥 ) =tan 𝑥 𝒙 𝒏+𝟏 =𝒙 𝒏 − 𝟐
=𝒙 𝒏?−
𝟐
𝐬𝐢𝐧 ( 𝟐 𝒙 𝒏 )
𝐬𝐞𝐜 𝒙 𝒏
𝐬𝐢𝐧𝟐 𝒙𝒏 𝟏
d
2
𝑓 ( 𝑥 ) =sin 𝑥 𝒙 𝒏+𝟏 =𝒙𝒏 − ? =𝒙 𝒏 − 𝐭𝐚𝐧 𝒙 𝒏
𝟐 𝐬𝐢𝐧 𝒙 𝒏 𝐜𝐨𝐬 𝒙 𝒏 𝟐
𝐥𝐧 𝒙 𝒏 − ( 𝒙 𝒏 )𝟐
2 𝒙 𝒏+𝟏 = 𝒙 𝒏 −
e 𝑓 ( 𝑥 ) =ln 𝑥 − 𝑥 𝟏 ?
−𝟐 𝒙𝒏
𝒙𝒏
The Full Process ! Newton-Raphson
iterative formula:
𝑦 𝑦 =1 −2 𝑥 sin 𝑥
Remember, on your
Taking as the first answer, type 0.5=,
approximation of , use the then write the RHS
of the formula using
Newton-Raphson process the ANS key in place
If you keep pressing ,
three times to obtain a you will see that the root of .
better approximation to , remains the same to
giving your answer to d.p., so we converged to
decimal places. the solution quickly.
Test Your Understanding drfrost.org/
s/
611d
3 ! Newton-Raphson
The equation has a root in iterative formula:
the range .
𝑦 1
𝑦 =ln 2 𝑥+ −2
𝑥
0.5 𝑥
𝛼
?
Determine
?
Finding a Turning Point Using Newton-
Raphson
Recall that at a turning point, the gradient is 0, i.e. .
We can then solve that equation using Newton-Raphson in the normal
way.
A curve has the equation
a
a Show that the turning The turning
When , points occur
point has an coordinate when
in the range . When ,
b Using as a first
approximation to the The gradient is continuous
coordinate of the turning and there is a change in sign
in the gradient. Therefore, the
point, use the Newton-
turning point must lie in
Raphson method once to
find a better
𝑦
approximation.
𝑦 =( 𝑥 −5 ) ln 𝑥
Recall that to show a root of an
equation lies in a range,
substitute in the two ends of
the range, and show there is a
0.47 2.61 𝑥 change of sign. This would
mean that must pass at some
? point.
Finding a Turning Point Using Newton-
Raphson
Recall that at a turning point, the gradient is 0, i.e. .
We can then solve that equation using Newton-Raphson in the normal
way.
A curve has the equation ! Newton-Raphson
iterative formula:
a Show that the turning
point has an coordinate
in the range .
b Using as a first b
approximation to the
coordinate of the turning We are solving
point, use the Newton- , so apply Newton-
Raphson method once to Raphson to
find a better equation.
𝑦
approximation.
𝑦 =( 𝑥 −5 ) ln 𝑥
0.47 2.61 𝑥
? Form a recurrence in the usual
way.
Test Your Understanding drfrost.org/
s/
611f
5 ! Newton-Raphson
[CCEA A Level 2019 P1 Pure
iterative formula:
Q9iii]
A curve has the equation
𝑥
?
(5 marks)