Professional Documents
Culture Documents
Numerical Solution of Equation Newton-Raphson Method: Example
Numerical Solution of Equation Newton-Raphson Method: Example
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,
The Newton-Raphson method normally requires a close initial estimate to the actual root otherwise it may fail.
Lets dene f (x) = x2 a. The root r of f (x) = 0 is r = Using the Newton-Raphson method we know that:
a.
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
RzDNewtonRaphson.m
Compute then
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.
We know r0 = 3 >
a, then we compute:
We compute: rn+1 rn = rn
2 2 rn a 2rn
rn
0, and
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.