Lecture 5

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

KIL1005: NUMERICAL METHODS FOR ENGINEERING

SEMESTER 2, SESSION 2022/2023

LECTURE 5: FINDING ROOTS OF


EQUATIONS

DR MAHAR DIANA HAMID


DEPARTMENT OF CHEMICAL ENGINEERING
NEWTON-RAPHSON METHOD
• Most widely used method.
• Based on Taylor series expansion:
x 2
f ( xi 1 )  f ( xi )  f ( xi )x  f ( xi )  Ox 3
2!
The root is the value of x i 1 when f(x i 1 )  0
Rearrangin g,
Solve for

0  f(xi )  f (xi )( xi 1  xi )
f ( xi )
xi 1  xi  Newton-Raphson formula
f ( xi )
2
Fig. 6.5

• A convenient method for


functions whose derivatives can
be evaluated analytically. It may
not be convenient for functions
whose derivatives cannot be
evaluated analytically.

3
Fig. 6.6

Pitfalls of the
Newton-Raphson
Method

4
EXAMPLE 6
Use the Newton Raphson method to estimate the root of Example 5. Employ an initial
guess of x0 = 0. Calculate until the fifth iteration.

5
THE SECANT METHOD
A slight variation of Newton’s method for functions whose derivatives are difficult to
evaluate. For these cases the derivative can be approximated by a backward finite
divided difference.

Substitute the above equation into the Newton Raphson equation will give us the
Secant equation:

𝑓(𝑥 )(𝑥 − 𝑥 )
𝑥 =𝑥
𝑓 𝑥 − 𝑓(𝑥 )
6
Fig. 6.7
• Requires two initial estimates of
x , e.g, xo, x1. However,
because f(x) is not required to
change signs between estimates,
it is not classified as a
“bracketing” method.
• The Secant method has the
same properties as Newton’s
method. Convergence is not
guaranteed for all xo, f(x).

7
Fig. 6.8

8
EXAMPLE 7
Use the Secant method to estimate the root of Example 4 with initial estimates of 0 and 1.

You might also like