You are on page 1of 2

Numerical solution of equation

Linear equations can be easily solved by basic algebra. Example: Find the solution(s) of f (x) = 0 with the linear function f (x) = Set of solutions:
3 2

Newton-Raphson method

2 x 3.

Newton-Raphson method. Let r be the root of a non-linear equation f (x) = 0. Starting from an initial guess r0 , the sequence dened as:

Non-linear equation such as quadratic equations that can be solved Example: Find the solution(s) of f (x) = 0 with f (x) = a x2 + b x + c. b+ b2 4ac b b2 4ac Set of solutions: , 2a 2a

rn+1 = rn

f (rn ) f (rn )

is converging toward r. Using a computer, you use a for loop until the iteration n such as rn is close enough to r (i.e. depending of the accuracy required).

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,

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 dene f (x) = x2 a. The root r of f (x) = 0 is r = Using the Newton-Raphson method we know that:

a.

We want to compute (with a computer)


1

a for a known number a > 0. rn+1 = rn converge to the root r =

Using the Newton-Raphson procedure, imagine a program using only the basic operations + / to compute a.

f (rn ) f (rn )

rn+1 = rn

2 rn a 2rn

a such f (r) = 0. Example of program:

RzDNewtonRaphson.m

Compute then

2 (i.e. a = 2) with 2 decimal precision starting from r0 = 3.


2

Prove by induction that the sequence is {rn } dened in question 2, is bounded from below by a.

Starting with r0 = 3. We get r1 = 1.83, r2 = 1.46, r3 = 1.42, r4 = 1.41 and r5 = 1.41. We can then approximate 2 = 1.41.

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

Example: Newton-Raphson method II


3

We know r0 = 3 >

a (when a = 2) and assuming rn > rn+1 a = rn = = =


2 rn a 2rn

a, then we compute:

Example: Newton-Raphson method III

2 2 2rn rn a a2rn 2rn


4

We compute: rn+1 rn = rn
2 2 rn a 2rn

2 rn 2 arn a 2rn (rn a)2 2rn

rn

= rn a 2rn n, From the previous question, we know that n, rn+1 rn rn


2 a. Then rn a

Then rn+1 >

bounded from below).

a. Hence by induction, we have n rn > a (the sequence is

0, and

0 (The sequence is decreasing)

Exercises: Newton-Raphson method

Apply the Newton-Raphson procedure with the rst approximation r0 = 2, to nd a root of the following equations to two decimal places:
1 2 3

x3 2x + 7 = 0 x4 3x2 2 ex 2x 5 = 0

The horizontal distance x travelled by a projectile is given by: x= u2 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