You are on page 1of 2

Numerical solution of equation Newton-Raphson method

Linear equations can be easily solved by basic algebra.


Example: Find the
solution(s)
of f (x) = 0 with the linear function f (x) = 2 · x − 3.
Set of solutions: √32 Newton-Raphson method.
Let r be the root of a non-linear equation f (x) = 0. Starting from an initial guess r0 , the
sequence defined as:
f (rn )
Non-linear equation such as quadratic equations that can be solved rn+1 = rn −
f ′ (rn )
is converging toward r. Using a computer, you use a for loop until the iteration n such
Example: Find the solution(s) with f (x) = a x2 + b x + c.
of f (x) = 0
√ √ as rn is close enough to r (i.e. depending of the accuracy required).
−b+ b2 −4ac −b− b2 −4ac
Set of solutions: 2a
, 2a

Lets consider the non-linear equation f (x) = 0. How do we compute the root r of
this equation ?

Newton-Raphson method Newton-Raphson method

To start the Newton-Raphson procedure, you need to choose an appropriate starting


value r0 not far from the solution r. You can :
1 plot a graph of the function and see approximately where the roots lie,

2 or evaluate the function at some obvious values.

The Newton-Raphson method normally requires a close initial estimate to the actual
root otherwise it may fail.

Example: Newton-Raphson method Example: Newton-Raphson method I



1 Lets define f (x) = x2 − a. The root r of f (x) = 0 is r = a.
Using the Newton-Raphson method we know that:

We want to compute (with a computer) a for a known number a > 0. f (rn ) rn2 − a
rn+1 = rn − ⇒ rn+1 = rn −
1 Using the Newton-Raphson procedure, imagine a program using only the basic f ′ (rn ) 2rn
√ √
operations + − /× to compute a. converge to the root r = a such f (r) = 0. Example of program:
◮ RzDNewtonRaphson.m

2 Compute then 2 (i.e. a = 2) with 2 decimal precision starting from r0 = 3.
2 Starting with r0 = 3. We get r1 = 1.83, r2 = 1.46, r3 = 1.42, r4 = 1.41 and r5 = 1.41.

3 Prove by induction that the sequence is {rn } defined in question 2, is bounded from We can then approximate 2 = 1.41.

below by a.

4 Prove that the sequence {rn } defined in question 2, is monotically decreasing.


Example: Newton-Raphson

method II √
Example: Newton-Raphson method III
3 We know r0 = 3 > a (when a = 2) and assuming rn > a, then we compute:
√ rn2 −a √
rn+1 − a = rn − 2rn
− a


2rn2 −rn2 −a− a2rn
= 2rn
4 We compute:

rn2 −2 arn −a rn2 −a
= rn+1 − rn = rn − 2rn
− rn
2rn

√ 2
= (rn − a)2
>0 = − rn2r−a
n
2rn
√ √ √
Then rn+1 > a. Hence by induction, we have ∀n rn > a (the sequence is From the previous question, we know that ∀n, rn > a. Then rn2 − a > 0, and

bounded from below). ∀n, rn+1 − rn 6 0 (The sequence is decreasing)

Exercises: Newton-Raphson method

1 Apply the Newton-Raphson procedure with the first approximation r0 = −2, to find
a root of the following equations to two decimal places:
1 x3 − 2x + 7 = 0
2 x4 − 3x2 − 2
3 ex − 2x − 5 = 0

2 The horizontal distance x travelled by a projectile is given by:

u2 π
x= sin(θ) · cos(θ), 0 < θ <
25 2
where u is the initial velocity and θ is the angle that the projectile makes with the
horizontal. Determine the value of θ which maximizes x.

You might also like