0% found this document useful (0 votes)
21 views66 pages

Unit 2 (Locating Roots of Algebraic Equations)

The document discusses numerical methods for locating roots of algebraic equations. It covers the graphical method, bisection method, Newton-Raphson method, and secant method. The graphical method uses plotting to obtain a rough estimate of roots. The bisection method repeatedly bisects an interval and determines the subinterval containing the root to refine the estimate. An example demonstrates applying the graphical and bisection methods to find the drag coefficient of a parachutist.

Uploaded by

ebrahim5936
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views66 pages

Unit 2 (Locating Roots of Algebraic Equations)

The document discusses numerical methods for locating roots of algebraic equations. It covers the graphical method, bisection method, Newton-Raphson method, and secant method. The graphical method uses plotting to obtain a rough estimate of roots. The bisection method repeatedly bisects an interval and determines the subinterval containing the root to refine the estimate. An example demonstrates applying the graphical and bisection methods to find the drag coefficient of a parachutist.

Uploaded by

ebrahim5936
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

Numerical Methods (CIE-301)

Unit-2
(Locating Roots of Algebraic Equations)
Dr. Muhammad Majid Gulzar (CIE-KFUPM)
Contents (Unit-2):
1) Graphical Method (Sec 5.1)

2) Bisection Method (Sec 5.2)

3) Newton-Raphson Method (Sec 6.2)

4) Secant Method (Sec 6.3)

5) Multiple Roots (Sec 6.5)

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Roots of Algebraic Equations:
 Many problems in Science and Engineering are expressed as
 Given a continuous function 𝑓𝑓(𝑥𝑥), find the value 𝑟𝑟 such that 𝑓𝑓 𝑟𝑟 = 0

 These problems are called root finding problems.

 A number 𝑟𝑟 that satisfies an equation is called a root of the equation.

 The equation 𝑥𝑥 4 − 3𝑥𝑥 3 − 7𝑥𝑥 2 + 15𝑥𝑥 = −18 has 4 roots.

 Any number 𝑟𝑟 for which 𝑓𝑓(𝑟𝑟) = 0 is called a zero of the function.

 The equation 𝑓𝑓 𝑥𝑥 = (𝑥𝑥 − 2)(𝑥𝑥 − 3) having 2 & 3 as zeros.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Roots of Algebraic Equations:
f ( x) = ( x − 1)
2
f ( x) = x 3 f ( x) = (x + 1)( x − 2)

Double zeros at 𝑥𝑥 = 1 Triple zeros at 𝑥𝑥 = 0 Two zeros at 𝑥𝑥 = −1 & 2

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Roots of Algebraic Equations:
 Several ways to solve equations
 Analytical Method
 Possible for special equations only

Analyticalsolution of a x 2 + b x + c = 0
− b ± b 2 − 4ac
roots =
2a
No analytical solution is available for x − e− x = 0

 Bracketing Method

 Open Method

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Roots of Algebraic Equations:
Roots of Equations

Bracketing Methods Open Methods

Graphical Bisection Newton-Raphson Secant


Method Method Method Method

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bracketing Methods:
 These techniques are called bracketing methods because two initial guesses for the root
are required. As the name implies, these guesses must “bracket” or be on either side of,
the root.
 Graphical Method

 Bisection Method

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Graphical Method (Sec 5.1)
Graphical Method:
 A simple method for obtaining an estimate of the root of the equation 𝑓𝑓 𝑥𝑥 = 0 is to
make a plot of the function and observe where it crosses the 𝑥𝑥 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎.

 This point, which represents the 𝑥𝑥 value for which 𝑓𝑓 𝑥𝑥 = 0 , provides a rough

e− x
approximation of the root.
𝑥𝑥 = 𝑒𝑒 −𝑥𝑥
2 Root

x
1

1 2

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Graphical Method (Example):
Use the graphical approach to determine the drag coefficient 𝑐𝑐 needed for a parachutist of mass 𝑚𝑚 =
68.1 𝑘𝑘𝑘𝑘 to have a velocity of 40 𝑚𝑚/𝑠𝑠 after freefalling for time 𝑡𝑡 = 10 𝑠𝑠.
Note: The acceleration due to gravity is 9.81 𝑚𝑚/𝑠𝑠 2 .
Given Data:
𝑚𝑚 = 68.1
Firstly write equation in terms of function 𝑓𝑓 𝑣𝑣 = 40
𝑔𝑔𝑔𝑔 𝑡𝑡 = 10
𝑓𝑓 = 1 − e− c/𝑚𝑚 𝑡𝑡 − 𝑣𝑣 = 0 g = 9.81
𝑐𝑐
As 𝑐𝑐 is unknown here, therefore the equation can be written in terms of unknown variable as
𝑔𝑔𝑔𝑔 −
c 𝑡𝑡
𝑓𝑓 c = 1 − e 𝑚𝑚 − 𝑣𝑣
𝑐𝑐
9.8 68.1 c
− 68.1 10 668.06
𝑓𝑓 c = 1−e − 40 = 1 − e−0.146843𝑐𝑐 − 40
𝑐𝑐 𝑐𝑐

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Graphical Method (Example):
668.06
𝑓𝑓 c = 1 − e−0.146843𝑐𝑐 − 40
𝑐𝑐
Now insert different values of 𝑐𝑐 and draw the graph

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Graphical Method (Example):
 The resulting curve crosses the 𝑐𝑐 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 between 12 and 16.
 Visual inspection of the plot provides a rough estimate of the root of 14.75.
 The validity of the graphical estimate can be checked by substituting it into
equation (Note: True root is 14.7802)

668.06
𝑓𝑓 14.75 = 1 − e−0.146843(14.75) − 40 = 0.100 ≅ 0
14.75

 It can also be checked by substituting it into given equation

9.8 68.1 −
14.75
𝑣𝑣 = 1−e 68.1 10 = 40.100 ≅ 40
14.75

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Graphical Method (Example):
 Observations:
 Graphical techniques are of limited practical value because they are not precise.

 However, graphical methods can be utilized to obtain rough estimates of roots.

 These estimates can be employed as starting guesses for numerical methods.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Graphical Method:
 Usually, if 𝑓𝑓(𝑥𝑥𝑙𝑙 ) and 𝑓𝑓(𝑥𝑥𝑢𝑢 ) have the same sign,
there are either no roots or an even number of
roots between the values.
 (a) & (c)

 Usually, if 𝑓𝑓(𝑥𝑥𝑙𝑙 ) and 𝑓𝑓(𝑥𝑥𝑢𝑢 ) have opposite


signs, there are an odd number of roots in the
interval.
 (b) & (d)

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Graphical Method:
 Functions that are tangential to the 𝑥𝑥 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 like
(𝑓𝑓 𝑥𝑥 = 𝑥𝑥 − 2 𝑥𝑥 − 2 𝑥𝑥 − 4 ) can violate these
principles.
 (a)

 Functions that are discontinuous functions can violate


these principles.
 (b)

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Computer Graphics to Locate Roots:

𝑓𝑓 𝑥𝑥 = 𝑠𝑠𝑠𝑠𝑠𝑠 10𝑥𝑥 + cos(3𝑥𝑥) Seems double root at about Infact distinct roots at about
𝑥𝑥 = 4.2 𝑥𝑥 = 4.23 & 4.26

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method (Sec 5.2)
Bisection Method:
 Bisection method is the modifications of the graphical method.

 In graphical method, it is observed that 𝑓𝑓(𝑥𝑥) changes sign on opposite sides of the root.

 In general, if 𝑓𝑓(𝑥𝑥) is real and continuous in the interval from 𝑥𝑥𝑙𝑙 𝑡𝑡𝑡𝑡 𝑥𝑥𝑢𝑢 and 𝑓𝑓(𝑥𝑥𝑙𝑙 ) and
𝑓𝑓(𝑥𝑥𝑢𝑢 ) have opposite signs (𝑓𝑓(𝑥𝑥𝑙𝑙 )𝑓𝑓 𝑥𝑥𝑢𝑢 < 0), then there is at least one real root between
𝑥𝑥𝑙𝑙 and 𝑥𝑥𝑢𝑢 .

 The bisection method, which is alternatively called binary chopping, interval halving or
Bolzano’s method, in which the interval is always divided in half.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method:
 If a function changes sign over an interval, the function value at the midpoint is
evaluated.

 The location of the root is then determined as lying at the midpoint of the subinterval
within which the sign change occurs.

 The process is repeated to obtain refined estimates.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method:
+ + -

+ - -

+ + -

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method:
 Step 1:
 Choose lower 𝑥𝑥𝑙𝑙 and upper 𝑥𝑥𝑢𝑢 guesses for the root such that the function changes sign over
the interval. This can be checked by ensuring that 𝑓𝑓(𝑥𝑥𝑙𝑙 )𝑓𝑓 𝑥𝑥𝑢𝑢 < 0.

 Step 2:
 An estimate of the root 𝑥𝑥𝑟𝑟 is determined by

𝑥𝑥𝑙𝑙 + 𝑥𝑥𝑢𝑢
𝑥𝑥𝑟𝑟 =
2

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method:
 Step 3:
 Make the following evaluations to determine in which subinterval the root lies:
 If 𝑓𝑓(𝑥𝑥𝑙𝑙 )𝑓𝑓 𝑥𝑥𝑟𝑟 < 0, the root lies in the lower subinterval. Thus, set 𝑥𝑥𝑢𝑢 = 𝑥𝑥𝑟𝑟 and return to step 2.

 If 𝑓𝑓 𝑥𝑥𝑙𝑙 𝑓𝑓 𝑥𝑥𝑟𝑟 > 0, the root lies in the upper subinterval. Thus, set 𝑥𝑥𝑙𝑙 = 𝑥𝑥𝑟𝑟 and return to step 2.

 If 𝑓𝑓 𝑥𝑥𝑙𝑙 𝑓𝑓 𝑥𝑥𝑟𝑟 = 0, the root equals 𝑥𝑥𝑟𝑟 . Thus, terminate the computation.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method (Example):
For the given equation, find 𝑐𝑐 using bisection method till 6 iterations in the bracket [12, 16].
Note: The true root is 14.7802.
668.06
𝑓𝑓 c = 1 − e−0.146843𝑐𝑐 − 40
𝑐𝑐

As 9.850 is greater than zero, thus no sign change occurs between the lower bound and the
midpoint. Consequently, the root must be located between 14 and 16.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method (Example):

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method (Example):

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method (Example):
 True and Approximate Error

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method (Example):
 Relation between number of iterations 𝑛𝑛 and approximate error 𝜀𝜀𝑎𝑎 .
 Benefit of the bisection method is that the number of iterations required to attain an absolute
error can be computed prior.

 Absolute Error after 0th Iteration:

 Absolute Error after 1st Iteration:

 Absolute Error after nth Iteration:

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method (Example):
Verify (without solving using complete bisection method) that it will takes 6 iterations to
get an approximate error of 0.0625.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Bisection Method:
 Advantages:
 Simple and easy to implement
 One function evaluation per iteration
 The size of the interval containing the zero is reduced by 50% after each iteration
 The number of iterations can be determined a priori
 No knowledge of the derivative is needed

 Disadvantage:
 Slow to converge
 Good intermediate approximations may be discarded

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Roots of Algebraic Equations:
Roots of Equations

Bracketing Methods Open Methods

Graphical Bisection Newton-Raphson Secant


Method Method Method Method

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Open Methods:
Bracketing Method Open Method
 These techniques are called open
methods because they require only a Diverge

single starting value of 𝑥𝑥 or two starting


values that do not necessarily bracket
the root.
 Newton-Raphson Method
Converge
 Secant Method

Diverge or converge, depends on the initial.


Dr. Muhammad Majid Gulzar (CIE-KFUPM)
Newton-Raphson Method (Sec 6.2)
Newton-Raphson Method:
 If the initial guess at the root is 𝑥𝑥𝑖𝑖 , a
tangent can be extended from the point
[𝑥𝑥𝑖𝑖 , 𝑓𝑓(𝑥𝑥𝑖𝑖 )]. The point where this tangent
crosses the 𝑥𝑥 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎 usually represents
an improved estimate of the root.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Newton-Raphson Method (Example):
Use the Newton-Raphson method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 − 𝑥𝑥, employing an
initial guess of 𝑥𝑥0 = 0.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Newton-Raphson Method (Example):
The approach rapidly converges on the true root (0.56714329).

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Newton-Raphson Method (Class Activity):
Use the Newton-Raphson method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑥𝑥 3 − 2𝑥𝑥 2 + 𝑥𝑥 − 3, employing an
initial guess of 𝑥𝑥0 = 4.

𝑓𝑓′(𝑥𝑥) = 3𝑥𝑥 2 − 4𝑥𝑥 + 1

𝑓𝑓(𝑥𝑥0 ) 33
Iteration 1: 𝑥𝑥1 = 𝑥𝑥0 − =4− =3
𝑓𝑓′(𝑥𝑥0 ) 33

𝑓𝑓(𝑥𝑥1 ) 9
Iteration 2: 𝑥𝑥2 = 𝑥𝑥1 − =3− = 2.4375
𝑓𝑓′(𝑥𝑥1 ) 16

𝑓𝑓(𝑥𝑥2 ) 2.0369
Iteration 3: 𝑥𝑥3 = 𝑥𝑥2 − = 2.4375 − = 2.2130
𝑓𝑓′(𝑥𝑥2 ) 9.0742
Dr. Muhammad Majid Gulzar (CIE-KFUPM)
Newton-Raphson Method (Class Activity):
Use the Newton-Raphson method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑥𝑥 3 − 2𝑥𝑥 2 + 𝑥𝑥 − 3,
employing an initial guess of 𝑥𝑥0 = 4.

Iteration 𝒙𝒙𝒌𝒌 𝒇𝒇(𝒙𝒙𝒌𝒌 ) 𝒇𝒇′ (𝒙𝒙𝒌𝒌 ) 𝒙𝒙𝒌𝒌 +1 |𝒙𝒙𝒌𝒌+𝟏𝟏 – 𝒙𝒙𝒌𝒌 |


0 4 33 33 3 1
1 3 9 16 2.4375 0.5625
2 2.4375 2.0369 9.0742 2.2130 0.2245
3 2.2130 0.2564 6.8404 2.1756 0.0384
4 2.1756 0.0065 6.4969 2.1746 0.0010

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Newton-Raphson Method (Example):
Use the Newton-Raphson method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑥𝑥 10 − 1, employing an
initial guess of 𝑥𝑥0 = 0.5.

Thus, after the first poor prediction, the technique is converging on


the true root of 1, but at a very slow rate.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Newton-Raphson Method (Pitfalls):
 Diverge from the root.
 (a)

 Oscillate around a local maximum or


minimum.
 (b)

x1=x3=x5

x0=x2=x4

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Newton-Raphson Method (Pitfalls):
 An initial guess that is close to one root
can jump to a location several roots
away.
 (c)

 Solution shoots off horizontally and


never hits the 𝑥𝑥 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎.
 (d)

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Newton-Raphson Method:
 Observation:
 There is no general convergence criterion for Newton-Raphson.

 Its convergence depends on


 The nature of the function

 Accuracy of the initial guess

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Newton-Raphson Method:
 Advantages:
 One of the fastest convergences to the root

 Disadvantage:
 Must find the derivative
 May encounter a zero derivative

 Dependent on initial guess


 May be too far from local root

 May loop indefinitely

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Secant Method (Sec 6.3)
Secant Method:
 A potential problem in implementing
the Newton-Raphson method is the
evaluation of the derivative.

 Although this is not inconvenient for


polynomials and many other functions,
there are certain functions whose
derivatives may be extremely difficult
or inconvenient to evaluate.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Secant Method:
 Notice that the approach requires two
initial estimates of 𝑥𝑥. However, because
𝑓𝑓(𝑥𝑥) is not required to change signs
between the estimates, it is not
classified as a bracketing method.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Comparison:
Newton-Raphson Method Secant Method

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Secant Method (Example):
Use the Secant method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 − 𝑥𝑥, employing an initial guess
of 𝑥𝑥−1 = 0 and 𝑥𝑥0 = 1. Note: The true root is 0.56714329. . . .

1st Iteration:

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Secant Method (Example):
Use the Secant method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 − 𝑥𝑥, employing an initial guess
of 𝑥𝑥−1 = 0 and 𝑥𝑥0 = 1. Note: The true root is 0.56714329. . . .

2nd Iteration:

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Secant Method (Example):
Use the Secant method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 − 𝑥𝑥, employing an initial guess
of 𝑥𝑥−1 = 0 and 𝑥𝑥0 = 1. Note: The true root is 0.56714329. . . .

3rd Iteration:

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Secant Method (Class Activity):
Use the Secant method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑥𝑥 5 + 𝑥𝑥 3 + 3, employing an initial
guess of 𝑥𝑥−1 = −1 and 𝑥𝑥1 = −1.1, with 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒 < 0.001.

Iteration 𝒇𝒇(𝒙𝒙𝒊𝒊 ) 𝒙𝒙𝒊𝒊 +1 |𝒙𝒙𝒊𝒊+𝟏𝟏 – 𝒙𝒙𝒊𝒊 | 50

40

-1.0000 1.0000 30

20

-1.1000 0.0585 -1.1062 0.0062 10

0
-1.1062 0.0102 -1.1052 0.0009 -10

-1.1052 0.0001 -1.1052 0.0000 -20

-30

-40
Dr. Muhammad Majid Gulzar (CIE-KFUPM) -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Modified Secant Method:
 Rather than using two arbitrary values to estimate the derivative, an alternative approach
involves a fractional perturbation of the independent variable to estimate 𝑓𝑓 ′ (𝑥𝑥).

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Modified Secant Method:
 If 𝛿𝛿 is too small, the method can be swamped by round-off error caused by subtractive
cancellation in the denominator.

 If 𝛿𝛿 is too big, the technique can become inefficient and even divergent.

 However, if chosen correctly, it provides a nice alternative for cases where evaluating
the derivative is difficult and developing two initial guesses is inconvenient.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Modified Secant Method (Example):
Use the modified Secant method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 − 𝑥𝑥. Use a value of
0.01 for 𝛿𝛿 and start with 𝑥𝑥0 = 1. Note: The true root is 0.56714329. . . .

1st Iteration:

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Modified Secant Method (Example):
Use the modified Secant method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 − 𝑥𝑥. Use a value of
0.01 for 𝛿𝛿 and start with 𝑥𝑥0 = 1. Note: The true root is 0.56714329. . . .

2nd Iteration:

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Modified Secant Method (Example):
Use the modified Secant method to estimate the root of 𝑓𝑓 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 − 𝑥𝑥. Use a value of
0.01 for 𝛿𝛿 and start with 𝑥𝑥0 = 1. Note: The true root is 0.56714329. . . .

3rd Iteration:

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Comparison:
Reliable, Slow
One function evaluation per iteration
Bisection
Needs an interval [𝑎𝑎, 𝑏𝑏] containing the root, 𝑓𝑓(𝑎𝑎)𝑓𝑓(𝑏𝑏) < 0
No knowledge of derivative is needed
Fast (if near the root) but may diverge
Newton-
Two function evaluation per iteration
Raphson
Needs derivative and an initial guess 𝑥𝑥0 , 𝑓𝑓 ′ (𝑥𝑥𝑥) is nonzero
Fast (slower than Newton) but may diverge
one function evaluation per iteration
Secant
Needs two initial points guess 𝑥𝑥0 , 𝑥𝑥1 such that 𝑓𝑓(𝑥𝑥0 ) − 𝑓𝑓 (𝑥𝑥1 ) is nonzero
No knowledge of derivative is needed

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Comparison:

𝑓𝑓 𝑥𝑥 = 𝑒𝑒 −𝑥𝑥 − 𝑥𝑥

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Multiple Roots (Sec 6.5)
Multiple Roots:
 A multiple root corresponds to a point where a function is tangent to the 𝑥𝑥 − 𝑎𝑎𝑎𝑎𝑎𝑎𝑎𝑎.

 In general, odd multiple roots cross the axis, whereas even ones do not.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Multiple Roots:
 Difficulty in finding multiple roots:
 May not get change of sign when using Bracketing Methods.

 𝑓𝑓 ′ 𝑥𝑥 also goes to zero in addition to 𝑓𝑓 𝑥𝑥 at the root when using Newton-Raphson and
Secant Methods. This results in division by zero when solution converges very close to the
root.
 Solution: This can be check in the program and computation can be terminated.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Multiple Roots:
 Difficulty in finding multiple roots:
 Newton-Raphson and Secant methods are linearly, rather than quadratically convergent for
multiple roots.
 Solution: By knowing the multiplicity of the root (i.e. 𝑚𝑚) beforehand. The formula can be used

 Solution: The formula can be used

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Multiple Roots (Example):
Use both the standard and modified Newton-Raphson method to evaluate the multiple roots
of 𝑓𝑓 𝑥𝑥 = 𝑥𝑥 − 3 𝑥𝑥 − 1 𝑥𝑥 − 1 , with an initial guess of 𝑥𝑥0 = 0.

Standard Newton-Raphson Method:

As anticipated, the method is linearly convergent toward the true value of 1.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Multiple Roots (Example):
Use both the standard and modified Newton-Raphson method to evaluate the multiple roots
of 𝑓𝑓 𝑥𝑥 = 𝑥𝑥 − 3 𝑥𝑥 − 1 𝑥𝑥 − 1 , with an initial guess of 𝑥𝑥0 = 0.

Modified Newton-Raphson Method:

As anticipated, the method is quadratically convergent toward the true value of 1.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Multiple Roots (Example):
Use both the standard and modified Newton-Raphson method to evaluate the single roots
of 𝑓𝑓 𝑥𝑥 = 𝑥𝑥 − 3 𝑥𝑥 − 1 𝑥𝑥 − 1 , with an initial guess of 𝑥𝑥0 = 4.

Thus, both methods converge quickly, with the standard method being somewhat more efficient.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)


Multiple Roots (Example):
 Observation:
 The preceding example illustrates the trade-offs involved in opting for the modified Newton-
Raphson method.

 Although it is preferable for multiple roots, it is somewhat less efficient and requires more
computational effort than the standard method for simple roots.

Dr. Muhammad Majid Gulzar (CIE-KFUPM)

You might also like