0% found this document useful (0 votes)
6 views15 pages

Module 5 Transcedential, Non-Linear

The document discusses methods for finding roots of non-linear equations, specifically focusing on the Bisection method, which is a reliable but not the fastest method for root-finding. It outlines the learning outcomes for students, including the use of Bisection, False Position, Newton-Raphson, and Secant methods. The document provides detailed examples and an algorithm for the Bisection method, illustrating its application in solving equations.

Uploaded by

jmilag9232003
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)
6 views15 pages

Module 5 Transcedential, Non-Linear

The document discusses methods for finding roots of non-linear equations, specifically focusing on the Bisection method, which is a reliable but not the fastest method for root-finding. It outlines the learning outcomes for students, including the use of Bisection, False Position, Newton-Raphson, and Secant methods. The document provides detailed examples and an algorithm for the Bisection method, illustrating its application in solving equations.

Uploaded by

jmilag9232003
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

CVE08 – Numerical Solutions To CE Problems

MODULE 5 – ROOTS OF NON-LINEAR EQUAITONS


Activities: Reading, Comprehension, Solving-problems and Hands-On Exercises.

INTRODUCTION
One of the most common problem encountered in engineering analysis is that given a
function𝑓 (𝑥 ), find the values of 𝑥 for which𝑓(𝑥 ) = 0. The solution (values 𝑥) are known as the
roots of the equation𝑓 (𝑥 ) = 0, or the zeroes of the function𝑓 (𝑥 ).
The roots of equations may be real or complex. In general, an equation may have any
number of (real) roots or no roots at all. For example, sin 𝑥 − 𝑥 = 0 has a single root, namely,
𝑥 = 0, whereas tan 𝑥 − 𝑥 = 0 has infinite number of roots (𝑥 = 0, ±4.493, ±7.725 … ). There
are two types of methods available to find the roots of algebraic and transcendental equations of
the form 𝑓 (𝑥 ) = 0 namely, Direct Methods and Indirect Methods.
Direct Methods give the exact value of the roots in a finite number of steps, assuming there is no
round off errors can determine all the roots at the same time. Indirect or Iterative Methods are
based on the concept of successive approximations. The general procedure is to start with one or
more initial approximation to the root and obtain a sequence of iterates (𝑥𝑘 ) which in the limit
converges to the actual or true solution to the root. Indirect or iterative methods determine one
or two roots at a time.
Indirect or Iterative Methods are divided into two categories: bracketing and open methods. The
bracketing methods require the limits between which the root lies, whereas the open methods
require the initial estimation of the solution. Bisection and False position methods are two known
examples of the bracketing methods. Among the open methods, the Newton-Raphson and the
method of successive approximation are most commonly used. The most popular method for
solving non-linear equation is the Newton-Raphson method and this method has a high rate of
convergence to a solution.

LEARNING OUTCOMES
At the end of this topic, you are expected to;
a) Use the Bisection method in finding the roots of the equations.
b) Use the False Position method in finding the roots of the equations
c) Use the Newton - Raphson method in finding the roots of the equations.
d) Use the Secant method in finding the roots of the equations.

A. BISECTION METHOD
After a root of 𝑓(𝑥) = 0 has been bracketed in the interval(𝑎, 𝑏). Bisection method can be used to close in
on it. The Bisection method accomplishes this by successfully halving the interval until it becomes
sufficiently small. Bisection method is also known as the interval halving method. Bisection method is not
the fastest method available for finding roots of a function, but it is the most reliable method. Once a has
been bracketed, Bisection method will always close in on it.
We assume that f (x) is a function that is real-valued and that x is a real variable. Suppose that
𝑓(𝑥)is continuous on an interval 𝑎 ≤ 𝑥 ≤ 𝑏 and that 𝑓(𝑎)𝑓(𝑏) < 0. When this is the case, 𝑓(𝑥) will have
opposite signs at the end points of the interval (𝑎, 𝑏). As shown in Fig. 3.1 (𝑎)and (𝑏)), if 𝑓(𝑥) is
continuous and has a solution between the points 𝑥 = 𝑎 and𝑥 = 𝑏 , then either 𝑓(𝑎) > 0 and 𝑓(𝑏) < 0
or f 𝑓(𝑎) < 0 and 𝑓(𝑏) > 0 . In other words, if there is a solution between 𝑥 = 𝑎 and 𝑥 = 𝑏,
then 𝑓(𝑎)𝑓(𝑏) < 0.
The method of finding a solution with the Bisection method is illustrated in Fig. 3.2. It starts by
finding points 𝑎 and 𝑏 that define an interval where a solution exists. The midpoint of the interval 𝑥𝑠1 is
then taken as the first estimate for the numerical solution. The true solution is either in the portion
between points a and 𝑥𝑠1 , or in the portion between points 𝑥𝑠1 and 𝑏. If the solution obtained is not
accurate enough, a new interval that contains the true solution is defined. The new interval selected is the
half of the original interval that contains the true solution, and its midpoint is taken as the new (second)
estimate of the numerical solution. The procedure is repeated until the numerical solution is accurate
enough according to a certain criterion that is selected.

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 1 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

Algorithm for the Bisection Method

1. Compute the first estimate of the numerical solution 1s x by

𝑎+𝑏
𝑥𝑠1 =
2

2. Determine whether the true solution is between 𝑎 and 𝑥𝑠1 or between 𝑥𝑠1 and 𝑏 by checking the sign
of the product
𝑓(𝑎)𝑓(𝑥𝑠1 ):

If 𝑓(𝑎)𝑓(𝑥𝑠1 ) < 0, the true solution is between 𝑎 and 𝑥𝑠1 .

If 𝑓(𝑎)𝑓(𝑥𝑠1 ) > 0, the true solution is between 𝑥𝑠1 and 𝑏


If 𝑏 − 𝑐 ≤ ∈, then accept 𝑐 as the root and root stop. ∈ is the error tolerance, ∈ > 0.

3. Choose the subinterval that contains the true solution


Steps 1 through 3 are repeated until a specified tolerance or error bound is attained

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 2 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

Example 1
Use the Bisection method to find a root of the equation 𝑥 3 − 4𝑥 − 8.95 = 0 accurate to the three
decimal places using Bisection method.
Solution. 𝑓 ′(𝑥) = 3𝑥 2 − 4 > 0

𝑓(𝑥) = 𝑥 3 − 4𝑥 − 8.95 = 0
𝑓(2) = 23 − 4(2) − 8.95 = −8,95 < 0
𝑓(3) = 33 − 4(3) − 8.95 = 6.05 > 0
Therefore, the root lies between 2 and 3.

Bisection Method Results


ANS: 2.70374
n a b 𝑥 𝑠1 𝑓 𝑎 𝑓𝑏 𝑓 𝑥𝑠1 ∆‰ ∆‰(t)
1 2 3 2.5 -8.95 6.05 -3.325 7.535488
2 2.50000 3.00000 2.75000 -3.32500 6.05000 0.84688 9.090909 1.710963
3 2.50000 2.75000 2.62500 -3.32500 0.84688 -1.36211 4.761905 2.912262
4 2.62500 2.75000 2.68750 -1.36211 0.84688 -0.28911 2.325581 0.600649
5 2.68750 2.75000 2.71875 -0.28911 0.84688 0.27092 1.149425 0.555157
6 2.68750 2.71875 2.70313 -0.28911 0.27092 -0.01108 0.578035 0.022746
7 2.70313 2.71875 2.71094 -0.01108 0.27092 0.12942 0.288184 0.266205
8 2.70313 2.71094 2.70703 -0.01108 0.12942 0.05905 0.1443 0.12173
9 2.70313 2.70703 2.70508 -0.01108 0.05905 0.02396 0.072202 0.049492
10 2.70313 2.70508 2.70410 -0.01108 0.02396 0.00643 0.036114 0.013373
11 2.70313 2.70410 2.70361 -0.01108 0.00643 -0.00232 0.01806 0.004687
12 2.70361 2.70410 2.70386 -0.00232 0.00643 0.00205 0.009029 0.004343
13 2.70361 2.70386 2.70374 -0.00232 0.00205 -0.00014 0.004515 0.000172
14 2.70374 2.70386 2.70380 -0.00014 0.00205 0.00096 0.002257 0.002086
15 2.70374 2.70380 2.70377 -0.00014 0.00096 0.00041 0.001129 0.000957
16 2.70374 2.70377 2.70375 -0.00014 0.00041 0.00014 0.000564 0.000392
17 2.70374 2.70375 2.70374 -0.00014 0.00014 0.00000 0.000282 0.00011
18 2.70374 2.70374 2.70374 -0.00014 0.00000 -0.00007 0.000141 3.08E-05
19 2.70374 2.70374 2.70374 -0.00007 0.00000 -0.00003 7.05E-05 3.97E-05
20 2.70374 2.70374 2.70374 -0.00003 0.00000 -0.00002 3.53E-05 7.5E-05
21 2.70374 2.70374 2.70374 -0.00002 0.00000 -0.00001 1.76E-05 9.26E-05
22 2.70374 2.70374 2.70374 -0.00001 0.00000 0.00000 8.82E-06 0.000101

Therefore, the root is 2.70374 accurate to three decimal places.

Example 2:
Find the root of 𝑒 𝑥 − 3𝑥 = 0 correct to two decimal places using the Bisection method.
Solution:
𝑓(𝑥) = 𝑒 𝑥 − 3𝑥
𝑓(1.5) = 𝑒 1.5 − 3(1.5) = −0.01831< 0
𝑓(1.6) = 𝑒 1.6 − 3(1.6) = 0.15303 > 0

𝑓 ′(𝑥) = 𝑒 𝑥 − 3 > 0 for in the interval (1.5, 1.6). hence, a root lies in the interval (1.5, 1.6). therefore,
here a = 1.5 and b – 1.6.

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 3 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

ANS: 1.5121
n a b 𝑥 𝑠1 𝑓 𝑎 𝑓𝑏 𝑓 𝑥𝑠1 ∆‰ ∆‰(t)
1 1.5 1.6 1.55 -0.0183 0.1530 0.0615 2.5064
2 1.5000 1.5500 1.5250 -0.0183 0.0615 0.0201 1.6393 0.8531
3 1.5000 1.5250 1.5125 -0.0183 0.0201 0.0006 0.8264 0.0265
4 1.5000 1.5125 1.5063 -0.0183 0.0006 -0.0090 0.4149 0.3869
5 1.5063 1.5125 1.5094 -0.0090 0.0006 -0.0042 0.2070 0.1802
6 1.5094 1.5125 1.5109 -0.0042 0.0006 -0.0018 0.1034 0.0769
7 1.5109 1.5125 1.5117 -0.0018 0.0006 -0.0006 0.0517 0.0252
8 1.5117 1.5125 1.5121 -0.0006 0.0006 0.0000 0.0258 0.0006
9 1.5121 1.5125 1.5123 0.0000 0.0006 0.0003 0.0129 0.0135
10 1.5121 1.5123 1.5122 0.0000 0.0003 0.0001 0.0065 0.0071
11 1.5121 1.5122 1.5122 0.0000 0.0001 0.0000 0.0032 0.0038
12 1.5121 1.5122 1.5121 0.0000 0.0000 0.0000 0.0016 0.0022
13 1.5121 1.5122 1.5121 0.0000 0.0000 0.0000 0.0008 0.0030
14 1.5121 1.5121 1.5121 0.0000 0.0000 0.0000 0.0004 0.0026
15 1.5121 1.5121 1.5121 0.0000 0.0000 0.0000 0.0002 0.0024
16 1.5121 1.5121 1.5121 0.0000 0.0000 0.0000 0.0001 0.0023
17 1.5121 1.5121 1.5121 0.0000 0.0000 0.0000 0.0001 0.0023
18 1.5121 1.5121 1.5121 0.0000 0.0000 0.0000 0.0000 0.0023
19 1.5121 1.5121 1.5121 0.0000 0.0000 0.0000 0.0000 0.0023
20 1.5121 1.5121 1.5121 0.0000 0.0000 0.0000 0.0000 0.0023

The root is 5.51 accurate up to two decimal places.

Example 3:
𝑔𝑚
Determine the largest root of 𝑓(𝑐) of the equation 𝑣 = [1 − 𝑒 −(𝑐/𝑚)𝑡 ]; where v= 40m/s and
𝑐
t=10s, accurate to within ∈= 0.001. Use bisection method.
Solution
n a b 𝑥 𝑠1 𝑓 𝑎 𝑓𝑏 𝑓 𝑥𝑠1 ∆‰ ∆‰(t) SOLUTION
1 12 16 14 6.066936 -2.26876 1.568699 5.278708 14.7802
2 14 16 15 1.568699 -2.26876 -0.42484 6.666667 1.487098
3 14 15 14.5 1.568699 -0.42484 0.552319 3.448276 1.895805
4 14.5 15 14.75 0.552319 -0.42484 0.058954 1.694915 0.204353
5 14.75 15 14.875 0.058954 -0.42484 -0.18413 0.840336 0.641373
6 14.75 14.875 14.8125 0.058954 -0.18413 -0.06288 0.421941 0.21851
7 14.75 14.8125 14.78125 0.058954 -0.06288 -0.00204 0.211416 0.007078
8 14.75 14.78125 14.76563 0.058954 -0.00204 0.028438 0.10582 0.098638
9 14.76563 14.78125 14.77344 0.028438 -0.00204 0.013195 0.052882 0.04578
10 14.77344 14.78125 14.77734 0.013195 -0.00204 0.005576 0.026434 0.019351
11 14.77734 14.78125 14.7793 0.005576 -0.00204 0.001768 0.013215 0.006136
12 14.7793 14.78125 14.78027 0.001768 -0.00204 -0.00014 0.006607 0.000471
13 14.7793 14.78027 14.77979 0.001768 -0.00014 0.000816 0.003304 0.002833
14 14.77979 14.78027 14.78003 0.000816 -0.00014 0.00034 0.001652 0.001181
15 14.78003 14.78027 14.78015 0.00034 -0.00014 0.000102 0.000826 0.000355
16 14.78015 14.78027 14.78021 0.000102 -0.00014 -1.7E-05 0.000413 5.8E-05
17 14.78015 14.78021 14.78018 0.000102 -1.7E-05 4.28E-05 0.000206 0.000148
18 14.78018 14.78021 14.7802 4.28E-05 -1.7E-05 1.3E-05 0.000103 4.53E-05
19 14.7802 14.78021 14.7802 1.3E-05 -1.7E-05 -1.8E-06 5.16E-05 6.37E-06
20 14.7802 14.7802 14.7802 1.3E-05 -1.8E-06 5.6E-06 2.58E-05 1.94E-05

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 4 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

B. METHOD OF FALSE POSITION


The method of False Position (also called the Regular Falsi method, and the linear interpolation
method) is another well-known bracketing method. It is very similar to Bisection method with the
exception that it uses a different strategy to end up with its new root estimate. Rather than
bisecting the interval(𝑎, 𝑏), it locates the root by joining 𝑓(𝑎1 )and 𝑓(𝑏1 ) with a straight line. The
intersection of this line with the x-axis represents an improved estimate of the root.

Here again, we assume that within a given interval(𝑎, 𝑏)), 𝑓(𝑥)is continuous and the equation has a
solution. As shown in Fig. 3.3, the method starts by finding an initial interval (𝑎1 , 𝑏1 )that brackets
the solution𝑓(𝑎1 ) and 𝑓(𝑏1 )) are the values of the function at the end points a1 and b1. These end
points are connected by a straight line, and the first estimate of the numerical solution, 𝑥𝑠1 , is the
point where the straight line crosses the axis. For the second iteration, a new interval (𝑎2 , 𝑏2 )is
defined. The new interval is either (𝑎1 , 𝑥𝑠1 )where 𝑎1 is assigned to 𝑎2 and 𝑥𝑠1 to 𝑏2 or
(𝑥𝑠1 , 𝑏1 )where 𝑥𝑠1 is assigned to 𝑎2 and 𝑏1 to 𝑏2 . The end points of the second interval are
connected with a straight line, and the point where this new line crosses the x-axis is the second
estimate of the solution, 𝑥𝑠1 . A new subinterval (𝑎3 , 𝑏3 ) is selected for the third iteration and the
iterations will be continued until the numerical solution is accurate enough.
The equation of a straight line that connects points (𝑏, 𝑓(𝑏))to point (𝑎, 𝑓(𝑎))is given by

𝑓(𝑏)−𝑓(𝑎)
𝑦= (𝑥 − 𝑏) + 𝑓(𝑏) (1)
𝑏−𝑎

The points xs where the line intersects the x-axis is determined by substituting y = 0 in Eq. (3.7) and
solving the equation for x

Hence

𝑎 𝑓(𝑏)−𝑏 𝑓(𝑎)
𝑥𝑠 = (2)
𝑓(𝑏)−𝑓(𝑎)

Algorithm for the method of False Position


1. Define the first interval (𝑎, 𝑏)such that solution exists between them. Check 𝑓(𝑎)𝑓(𝑏) < 0.
2. Compute the first estimate of the numerical solution 𝑥𝑠 using Eq.(2).
3. Find out whether the actual solution is between 𝑎 and 𝑥𝑠1 or between 𝑥𝑠1 and 𝑏. This is accomplished
by checking the sign of the product 𝑓(𝑎)𝑓(𝑥𝑠1 ).
If 𝑓(𝑎)𝑓(𝑥𝑠1 ) < 0, the solution is between 𝑎 and 𝑥𝑠1 .
If 𝑓(𝑎)𝑓(𝑥𝑠1 ) > 0, the solution is between 𝑥𝑠1 and 𝑏. 4.
4. Select the subinterval that contains the solution (𝑎 to 𝑥𝑠1 , or 𝑥𝑠1 to 𝑏)is the new interval (𝑎, 𝑏)and go
back to step 2. Step 2 through 4 are repeated until a specified tolerance or error bound is attained. The
method of False Position always converges to an answer, provided a root is initially bracketed in the
interval (𝑎, 𝑏)).

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 5 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

Example 4:
Using the False Position method, find a root of the function 𝑓(𝑥) = 𝑒 𝑥 − 3𝑥 2 to an accurate of 5 digits. The
root is known to lie between 0.5 and 1.0.

Solution:

𝑎 𝑓(𝑏) − 𝑏 𝑓(𝑎)
𝑥𝑠 =
𝑓(𝑏) − 𝑓(𝑎)

n a b f(a) f(b) 𝑥 𝑠1 𝑓(𝑥 𝑠1 )


1 0.5 1 0.898721 -0.28172 0.880672 0.08577 -
2 0.88067 1.00000 0.08577 -0.28172 0.90852 0.00441 0.03065
3 0.90852 1.00000 0.00441 -0.28172 0.90993 0.00022 0.00155
4 0.90993 1.00000 0.00022 -0.28172 0.91000 0.00001 0.00008
5 0.91000 1.00000 0.00001 -0.28172 0.91001 0.00000 0.00000

The answer is 0.91 accurate at 5 digits.

EXAMPLE 5:
Find a real root ofcos 𝑥 − 3𝑥 + 3 = 0 . Correct to four decimal places using the method of False
Position method.
Solution.
𝑓(𝑥) = 𝑐𝑜𝑠𝑥 − 3𝑥 + 5 = 0
𝑓(0) = cos(0) − 3(0) + 5 = 5 > 0
𝜋 𝜋 3𝜋
𝑓(𝜋/2) = cos ( ) − 3 ( ) + 5 = − +5< 0
2 2 2

𝑎 𝑓(𝑏) − 𝑏 𝑓(𝑎)
𝑥𝑠 =
𝑓(𝑏) − 𝑓(𝑎)

n a b f(a) f(b) 𝑥 𝑠1 𝑓(𝑥 𝑠1 )


1 0.0000 1.5708 6.0000 0.2876 1.6499 -0.0287 -
2 1.6499 1.5708 -0.0287 0.2876 1.6427 0.0000 -4.36203E-03
3 1.6427 1.5708 0.0000 0.2876 1.6427 0.0000 -1.97320E-06

The root is 1.6427 accurate to four decimal places.

Example 6:
Using the method of False Position, find the real root of the equation 𝑥 4 − 11𝑥 + 8 accurate to four
decimal places.

𝑓(𝑥) = 𝑥 4 − 11𝑥 + 8
𝑓(1) = (1) − 11(1) + 8 = −2 < 0
𝑓(2) = (2)4 − 11(2) + 8 = 4 > 0

𝑎 𝑓(𝑏) − 𝑏 𝑓(𝑎)
𝑥𝑠 =
𝑓(𝑏) − 𝑓(𝑎)

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 6 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

n a b f(a) f(b) 𝑥 𝑠1 𝑓(𝑥 𝑠1 )


1 1 2 -2 2 1.5000 2
2 1.5 2 -3.4375 2 1.8161 2 1.74051E-01
3 1.816092 2 -1.09895 2 1.8813 2 3.46661E-02
4 1.88131 2 -0.16758 2 1.8905 2 4.85383E-03
5 1.890486 2 -0.02232 2 1.8917 2 6.39020E-04
6 1.891695 2 -0.00292 2 1.8919 2 8.34227E-05
7 1.891852 2 -0.00038 2 1.8919 2 1.08786E-05

The root is 1.8919 accurate to four decimal places.

C. NEWTON-RAPHSON METHOD
The Newton-Raphson method is the best-known method of finding roots of a function𝑓(𝑥). The method is
simple and fast. One drawback of this method is that it uses the derivative 𝑓′(𝑥) of the function as well as
the function 𝑓(𝑥) itself. Hence, the Newton-Raphson method is usable only in problems where 𝑓′(𝑥)can be
readily computed. Newton-Raphson method is also called Newton’s method. Here, again we assume that
𝑓(𝑥) is continuous and differentiable and the equation is known to have a solution near a given point.
Figure 3.4 illustrates the procedure used in Newton-Raphson method.

The solution process starts by selecting point 𝑥1 as the first estimate of the solution. The second estimate
x2 is found by drawing the tangent line to f(x) at the point(𝑥1 , 𝑓(𝑥1 ))and determining the intersection
point of the tangent line with the x-axis. The next estimate x3 is the intersection of the tangent line to
𝑓(𝑥)at the point (𝑥2 , 𝑓(𝑥2 ))with the x-axis, and so on. The slope𝑓′(𝑥1 ), of the tangent at point (𝑥1 , 𝑓(𝑥1 ))
is written as

𝑓(𝑥1 )−0
𝑓′(𝑥1 ) (1)
𝑥1 −𝑥2
Rewriting the equation

𝑓(𝑥1 )
𝑥2 = 𝑥1 − (2)
𝑓′(𝑥1 )

Generalizing to determine the nest solution 𝑥𝑖+1

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 7 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 − (3)
𝑓′(𝑥𝑖 )

The solution is obtained by repeated application of the iteration formula given by eq (3) for each successive
value of “I”

Algorithm for Newton-Raphson Method:


1. Select a point 𝑥1 as an initial guess of the solution.
2. For i = 1, 2, …, until the error is smaller than a specified value, compute 𝑥𝑖+1 by using Eq.(3). Two error
estimates that are generally used in Newton-Raphson method are given below:

𝑥𝑖+1 −𝑥𝑖
The iterations are stopped when the estimated relative error | | is smaller than a specified
𝑥𝑖
value ∈.
𝑥𝑖+1 −𝑥𝑖
| |≤ ∈ (4)
𝑥𝑖

The iterations are stopped when the absolute value of f (xi) is smaller than some number δ:
|𝑓(𝑥𝑖 )| ≤ 𝛿 (5)

The Newton-Raphson method, when successful, works well and converges fast. Convergence problems
occur when the value of 𝑓′(𝑥)is close to zero in the vicinity of the solution, where𝑓(𝑥) = 0. Newton-
Raphson method generally converges when 𝑓(𝑥), 𝑓′(𝑥) and 𝑓"(𝑥)are all continuous, if 𝑓′(𝑥)not zero at the
solution is and if the starting value 𝑥1 is near the actual solution.

i. CONVERGENCE OF NEWTON-RAPHSON METHOD


The Newton-Raphson iteration formula is given by

𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑛 − = ϕ(𝑥𝑥 ) (5a)
𝑓′(𝑥𝑖)

The general for of Eq (5a) is given by

𝑥 = 𝜙(𝑥) (5b)

The Newton_Raphsom iteration method given by (5b) converges if |𝜙′(𝑥)| < 1.

𝑓(𝑥𝑖 )
Here 𝜙(𝑥) = 𝑥 −
𝑓′(𝑥𝑖)

[𝑓 ′ (𝑥)]2 − 𝑓(𝑥)𝑓"(𝑥) 𝑓(𝑥)𝑓"(𝑥)


𝜙 ′ (𝑥) = 1 − [ ′ 2 ]=
[𝑓 (𝑥)] [𝑓′(𝑥)]2
𝑓(𝑥)𝑓"(𝑥)
Or |𝜙′(𝑥)| = | |
[𝑓′(𝑥)]2

Hence, Newton-Raphson method converges if

𝑓(𝑥)𝑓"(𝑥)
| |<1
[𝑓′(𝑥)]2

Or |𝑓(𝑥)𝑓"(𝑥)| < [𝑓′(𝑥)]2 (5c)

If α denotes the actual root of 𝑓(𝑥) = 0, then we can select a small interval in which 𝑓(𝑥), 𝑓′(𝑥) and
𝑓"(𝑥) are all continuous and the condition given by Eq.(5c) is satisfied. Therefore, Newton-Raphson

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 8 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

method always converges provided the initial approximation 𝑥0 is taken very close to the actual root
α.

ii. RATE OF CONVERGENCE OF NEWTON-RAPHSON METHOD


Let α denotes the exact value of the root of 𝑓(𝑥) = 0, and let 𝑥𝑖 , 𝑥𝑖+1 , be two successive
approximations to the actual root α. If ∈𝑖 and ∈𝑖+1 are the corresponding errors, we have

𝑥𝑖 = 𝛼 +∈𝑖 and 𝑥𝑖+1 = 𝛼 +∈𝑖+1

By Newton-Raphson’s Iterative formula

𝑓(𝛼 +∈𝑖 )
𝛼 +∈𝑖+1 = 𝛼 +∈𝑖 −
𝑓′(𝛼 +∈𝑖 )

𝑓(𝛼 +∈𝑖 )
∈𝑖+1 −∈𝑖 = −
𝑓′(𝛼 +∈𝑖 )

∈2 ∈2
𝑓(𝛼)+∈𝑖 𝑓′(𝛼)+( 2𝑖 )𝑓"(𝛼)+⋯ ∈𝑖 𝑓′ (𝛼)+( 2𝑖 )𝑓"(𝛼)+⋯
Or ∈𝑖+1 =∈𝑖 − =∈𝑖 − (𝑠𝑖𝑛𝑐𝑒 𝑓(𝛼) = 0)
𝑓′ (𝛼)+∈𝑖𝑓"(𝛼)+⋯ 𝑓′ (𝛼)+∈𝑖 𝑓"(𝛼)+⋯

∈𝑖
∈𝑖 [𝑓 ′ (𝛼) + 𝑓"(𝛼) + ⋯ ] 1 ∈2𝑖 𝑓"(𝛼)
= 2 = [ ]
𝑓 ′ (𝛼) +∈𝑖 𝑓"(𝛼) + ⋯ 2 𝑓 ′ (𝛼) +∈𝑖 𝑓"(𝛼) + ⋯

1 ∈2𝑖 𝑓"(𝛼) 𝑓"(𝛼)


[ ′ ] =∈𝑖+1 = (5d)
2 𝑓 (𝛼)(1+∈𝑖 𝑓"(𝛼) )+⋯ 2𝑓′(𝛼)
𝑓′(𝛼)

Equation (5d) shows that the error at each stage is proportional to the sequence of the error in the
previous stage. Hence, Newton-Raphson method has a quadratic convergence.

Example 7
Use Newton-Raphson method to find the real root near 2 of the equation 𝑥 4 − 11𝑥 + 8 = 0 accurate
to five decimal places.

Solution:
𝑓(𝑥) = 𝑥 4 − 11𝑥 + 8
𝑓′(𝑥) = 4𝑥 3 − 11
𝑥0 = 2
𝑓(𝑥0 ) = 𝑓(2) = (2)4 − 11(2) + 8 = 2
𝑓 ′ (𝑥0 ) = 𝑓′(2) = 4(2)3 − 11 = 21

Therefore,
𝑓(𝑥0 ) 2
𝑥1 = 𝑥0 − ′ =2− = 1.90476
𝑓 (𝑥0 ) 21

𝑓(𝑥1 ) (1.90476)4 − 11(1.90476) + 8


𝑥2 = 𝑥1 − = 1.90476 − = 1.89209
𝑓 ′ (𝑥1 ) 4(1.90476)3 − 11

𝑓(𝑥2 ) (1.89209)4 − 11(1.89209) + 8


𝑥3 = 𝑥2 − = 1.89209 − = 1.89188
𝑓 ′ (𝑥2 ) 4(1.89209)3 − 11

𝑓(𝑥3 ) (1.89188)4 − 11(1.89188) + 8


𝑥4 = 𝑥3 − = 1.89188 − = 1.89188
𝑓 ′ (𝑥3 ) 4(1.89188)3 − 11

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 9 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

The root of the equation is 1.89188.

Example 8:
Using Newton-Raphson method, find a root of the function 𝑓(𝑥) = 𝑒 𝑥 − 3𝑥 2 to an accurate of 5 digits.
The root is known to lie between 0.5 and 1.0. take the starting value of 𝑥 as 𝑥0 = 1.0.

Solution:
𝑓(𝑥) = 𝑒 𝑥 − 3𝑥 2
𝑓′(𝑥) = 𝑒 𝑥 − 6𝑥

n 𝑥𝑖 𝑓𝑥𝑖 𝑓′𝑥𝑖 𝑥𝑖+1


0 1.0 -0.28172 -3.28172 0.91416 0.09391
1 0.91416 -0.01237 -2.99026 0.91002 0.00455
2 0.91002 -0.00003 -2.97574 0.91001 0.00001
3 0.91001 0.00000 -2.97570 0.91001 6.61302E-11
4 0.91001 0.00000 -2.97570 0.91001 0.00000E+00
5 0.91001 0.00000 -2.97570 0.91001 0.00000E+00

EXAMPLE 9:
Evaluate √29 to five decimal places by Newton-Raphson method.
Solution.
Let 𝑥 2 = 29, → 𝑥 2 − 29 = 0
𝑓(𝑥) = 𝑥 2 − 29
𝑓 ′ (𝑥) = 2𝑥

the root lies between (5,6)

n 𝑥𝑖 𝑓𝑥𝑖 𝑓′𝑥𝑖 𝑥𝑖+1


0 2.0 -25.00000 4.00000 8.25000 0.75758
1 8.25000 39.06250 16.50000 5.88258 0.40245
2 5.88258 5.60470 11.76515 5.40619 0.08812
3 5.40619 0.22694 10.81239 5.38521 0.00390
4 5.38521 0.00044 10.77041 5.38516 0.00001
5 5.38516 0.00000 10.77033 5.38516 0.00000
6 5.38516 0.00000 10.77033 5.38516 0.00000
7 5.38516 0.00000 10.77033 5.38516 0.00000

D. MODIFIED NEWTON-RAPHSON METHOD


From derivation;
𝑓(𝑥𝑖 )𝑓′(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 −
[𝑓′𝑥𝑖 ]2 − 𝑓(𝑥𝑖 )𝑓"(𝑥𝑖 )

Example 10:
Use Modified Newton-Raphson method to find the real root near 2 of the equation 𝑥 4 − 11𝑥 + 8 = 0
accurate to five decimal places.
𝑓(𝑥) = 𝑥 4 − 11𝑥 + 8
𝑓′(𝑥) = 4𝑥 3 − 11
𝑓"(𝑥) = 12𝑥 2

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 10 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

n 𝑥𝑖 𝑓𝑥𝑖 𝑓′𝑥𝑖 𝑓" 𝑥 𝑖 𝑥𝑖+1


0 2 2 21 48 1.878261
1 1.878261 -0.21505 15.50499 42.33437 1.891624
2 1.891624 -0.00405 16.07476 42.93891 1.891876
3 1.891876 -1.4E-06 16.08557 42.95034 1.891876
4 1.891876 -1.5E-13 16.08557 42.95034 1.891876

E. SECANT METHOD
The secant method is very similar to the Newton-Raphson method. The main disadvantage of the
NewtonRaphson method is that the method requires the determination of the derivatives of the
function at several points. Often, the calculation of these derivatives takes too much time. In some
cases, a closed-form expression for 𝑓′(𝑥) may difficult to obtain or may not be available.
To remove this drawback of the Newton-Raphson method, the derivatives of the function
being approximated by finite differences instead of being calculated analytically. In particular, the
derivative 𝑓′(𝑥)is approximated by the backward difference

𝑓(𝑥)−𝑓(𝑥𝑖−1 )
𝑓 ′(𝑥𝑖) = (1)
𝑥𝑖 −𝑥𝑖−1

where 𝑥𝑖 and 𝑥𝑖−1 are two approximations to the root but does not require the condition
𝑓(𝑥𝑖 ). 𝑓(𝑥𝑖−1 ) < 0. Now, from the Newton-Raphson method, we have

𝑓(𝑥𝑖 ) 𝑓(𝑥𝑖 )(𝑥𝑖 −𝑥𝑖−1 )


𝑥𝑖+1 = 𝑥𝑖 − = 𝑥𝑖 − (2)
𝑓′ (𝑥𝑖 ) 𝑓(𝑥𝑖 )−𝑓(𝑥𝑖−1 )

It should be noted here from Eq.(3.18) that this method requires two initial guess values x0 and x1
for the root. The secant method is illustrated geometrically as shown in Fig. 3.6, where a secant is
drawn connecting f 𝑓(𝑥𝐼−1 )and𝑓(𝑥𝑖 ). The point where it intersects the x-axis is𝑥𝑖−1 . Another
secant is drawn connecting 𝑓(𝑥𝑖 )and 𝑓(𝑥𝑖+1 ) to obtain 𝑥𝑖+2 and the process continues.

CONVERGENCE OF THE SECANT METHOD


The formula for the secant method can be written as

(𝑥𝑛−𝑥𝑛−1 )
𝑥𝑛+1 = 𝑥𝑛 − (3)
𝑓(𝑥𝑛 )−𝑓(𝑥𝑛−1 )

Let ξ be the exact root of the equation 𝑓(𝑥) = 0 and 𝑓(𝜉) = 0. The error at the 𝑛𝑡ℎ iteration is given by

𝜖𝑛 = 𝑥𝑛 − 𝜉 (4)

Now Eq. (3) becomes


Engr. Delia O. Evangelista, CE,RMP Day &Time:
Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 11 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

(𝜖𝑛 − 𝜖𝑛−1 )𝑓(𝜖𝑛 + 𝜉)


𝜖𝑛+1 = 𝜖𝑛 −
𝑓(𝜖𝑛 + 𝜉) − 𝑓(𝜖𝑛−1 + 𝜉)

(𝜖𝑛 − 𝜖𝑛−1 )[𝑓(𝜉) + 𝜖𝑛 𝑓 ′ (𝜉) + (𝜖𝑛2 /2)𝑓"(𝜉) … ]


= 𝜖𝑛 −
1 2 )𝑓"(𝜉)
(𝜖𝑛 − 𝜖𝑛−1 )𝑓 ′(𝜉) + (𝜖𝑛2 − 𝜖𝑛−1 +⋯
2
2 −1
𝜖𝑛𝑓"(𝜉) 1 𝑓"(𝜉)
= 𝜖𝑛 − [𝜖𝑛 + + ⋯ ] [1 + (𝜖𝑛 + 𝜖𝑛−1 ) + ⋯]
2𝑓′(𝜉) 2 𝑓′(𝜉)

1 𝑓"(𝜉) 2 )
= 𝜖𝑛 𝜖𝑛−1 + 𝑂(𝜖𝑛2 𝜖𝑛−1 + 𝜖𝑛 𝜖𝑛−1 (5)
2 𝑓′(𝜉)

Equation (5) can be expressed as

𝜖𝑛+1 = 𝑐𝜖𝑛 𝜖𝑛−1 (6)

Where
1 𝑓"(𝜉)
𝑐= (7)
2 𝑓′(𝜉)

𝑝 𝑝
Equation (7) is a non-linear difference equation which can be solved by 𝜖𝑛+1 = 𝐴𝜖𝑛 or 𝜖𝑛 = 𝐴𝜖𝑛−1 and
which gives

1/𝑝
𝜖𝑛−1 = 𝜖𝑛 𝐴−1/𝑝
Hence

𝑝 1/𝑝
𝐴𝜖𝑛 = 𝑐𝜖𝑛 𝜖𝑛 𝐴−1/𝑝 (8)

Or

1 1
𝑝 −(1+𝑝) 1+𝑝
𝜖𝑛 = 𝑐𝐴 𝜖𝑛 (9)

Now by equating the power of 𝜖𝑛 both sides of Eq (9), we obtain

1
𝑝 = 1+
𝑝

Or

1
𝑝 = (1 ± √5 (10)
2

Therefore taking the positive sign in Eq (10), we get

𝑝 = 1.618
And

𝜖𝑛+1 = 𝐴𝜖𝑛1.618 (11)

Hence, the rate of convergence of the secant method is 1.618 which is lesser than the Newton-Raphson
method. The second method evaluates the function only once in each iteration whereas the Newton-
Raphson method evaluates two functions f and f ' in each iteration. Therefore, the second method is more
efficient than the Newton-Raphson method.

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 12 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

Example 11
Find the root of the equation 𝑥 3 − 8𝑥 − 5 = 0 using the Secant method.

Solution:
𝑓(𝑥) = 𝑥 3 − 8𝑥 − 5 = 0
𝑓(3) = (3)3 − 8(3) − 5 = −2
𝑓(4) = (4)3 − 8(4) − 5 = −27
Therefore one root lies between 3 and 4. Let the initial approximations be 𝑥0 = 3, and 𝑥1 = 3.5. Then 𝑥2 is
given by

𝑥0 𝑓(𝑥𝑖 ) − 𝑥𝑖 𝑓(𝑥0 )
𝑥2 =
𝑓(𝑥𝑖 ) − 𝑓(𝑥0 )

Secant Method
Find the root of the equation

𝑥0 𝑓 𝑥0 𝑥1 𝑓(𝑥1 ) 𝑥2 𝑓(𝑥2 )

3.00000 -2.00000 3.50000 9.87500 3.08421 -0.33558


3.50000 9.87500 3.08421 -0.33558 3.09788 -0.05320
3.08421 -0.33558 3.09788 -0.05320 3.10045 0.00039
3.09788 -0.05320 3.10045 0.00039 3.10043 0.00000
3.10045 0.00039 3.10043 0.00000 3.10043 0.00000
3.10043 0.00000 3.10043 0.00000 3.10043 0.00000
3.10043 0.00000 3.10043 0.00000 3.10043 0.00000

The root is 3.1004 correct up to the five significan figures.

Example 12:
Determine the root of the equation …
Solution :

𝑥0 𝑓 𝑥0 𝑥1 𝑓(𝑥1 ) 𝑥2 𝑓(𝑥2 )
1.00000 -5.00000 2.00000 14.00000 1.26316 -1.60227
2.00000 14.00000 1.26316 -1.60227 1.33883 -0.43036
1.26316 -1.60227 1.33883 -0.43036 1.36662 0.02291
1.33883 -0.43036 1.36662 0.02291 1.36521 -0.00030
1.36662 0.02291 1.36521 -0.00030 1.36523 0.00000
1.36521 -0.00030 1.36523 0.00000 1.36523 0.00000
1.36523 0.00000 1.36523 0.00000 1.36523 0.00000
1.36523 0.00000 1.36523 0.00000 1.36523 0.00000

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 13 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

LABORATORY EXERCISES:
1. Use the Bisection method to find a solution accurate to four decimal places for x = tanx in the
interval (4.4,4.6)
9
2. Determine the solution of the equation 8 − (𝑥 − 𝑠𝑖𝑛𝑥) = 0 by using the Bisection method
2
accurate to five decimal places in the interval (2, 3).
3. Use the Bisection method to compute the root of 𝑒 𝑥 − 3𝑥 = 0 correct to three decimal places in
the interval (1.5, 1.6)
4. Use Bisection method to find a root of the equation 𝑥 3 − 4𝑥 − 9 = 0 in the interval (2, 3), accurate
to four decimal places.
5. Use Bisection method to find the root of 𝑓(𝑥) = 𝑥 − 𝑡𝑎𝑛𝑥 in the interval (7, 8) correct to four
decimal places.
6. Use the method of False Position to find solution accurate to within 10−4 for the function 𝑓(𝑥) =
𝜋
𝑥 − 𝑐𝑜𝑠𝑥 in the interval (0, )
2
7. Use the method of False Position to find the solution accurate to within 10−4 for the function
𝑓(𝑥) = 𝑥 − 0.8𝑠𝑖𝑛𝑥 = 0 in the interval (0, π/2).
8. Use the method of False Position to solve xtanx +1 =0 accurate to three decimal places starting with
2.5 and 3.0 as the initial approximation to the root.
9. Use the method of False Position to solve the equation 𝑥𝑒 2 − 𝑐𝑜𝑠𝑥 = 0 correct to four decimal
places in the interval.
10. Use the method of False Positon to find a root correct to three decimal places of the function 𝑥 3 −
4𝑥 − 9 = 0
11. A root of 𝑓(𝑥) = 𝑥 3 − 10𝑥 2 + 5 = 0 lies close to x = 0.7. Determine this root with the
Newton_Raphson method to five decimal accuracy.
12. A root of 𝑓(𝑥) = 𝑒 𝑥 − 2𝑥 2 lies in the interval (1, 2). Determine this root with the Newton-Raphson
method to five decimal accuracy.
13. A root of 𝑓(𝑥) = 𝑥 3 − 𝑥 2 − 5 = 0 lies in the interval (2, 3). Determine this root with the Newton-
Rpahson method for four decimal places.
14. Use Newton-Raphson method to find solution accurate to within 10−4 for the function 𝑓(𝑥) = 𝑥 −
𝑐𝑜𝑠𝑥 in the interval (0, π/2).

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 14 of 15
MW 4:00 – 5:30 Laboratory
CVE08 – Numerical Solutions To CE Problems

𝑥2 𝑥3
15. A positive root of the equation 𝑒 𝑥 = 1 + 𝑥 + + 𝑒 0.3𝑥 lies in the interval (2, 3). Use Newton-
2 6
Raphson method to find this root accurate to five decimal places.
16. Use Secant method to find the root of 𝑓(𝑥) = 2 − 𝑒 𝑥 using 𝑥0 = 0 and 𝑥1 = 1, accurate to four
decimal places.
17. Use Secant Method to find the root of x − 0.8 − 0.2sinx = 0 on [0, 𝜋/2], accurate to five decimal
places.
18. Use Secant method for find solutions accurate within 10−5 for 2𝑥𝑐𝑜𝑠2𝑥 − (𝑥 − 2)2 = 0 on [2, 3]
and on [3, 4]
19. Use Secant method for find solutions accurate within 10−5 for 𝑒 𝑥 − 3𝑥 2 = 0 on [0, 1] and on [3, 5]
20. Use Secant method for find solutions accurate within 10−5 for (𝑥 − 2)2 − 𝑙𝑛𝑥 = 0 on [1, 2] and on
[𝑒, 4]

References:
1
Higher Engineering Mathematics, [Link] & Er. Rajnish Verma, S. Chand & Company Pvt. Ltd., 2011

Nuemrical Methods 3rd Edition, Faires & Burden, Brooks Cole, 2002
2
Advanced Engineering Mathematics 8th Edition, Peter V. O’Neil, Cengage Learning, 2018

Numerical Methods by Rao V. Dukkipati, New Age International (P) Ltd., Publishers, 2010
3
Numerical Methods and Methods of Approximation in Science and Engineering, Karan S. Surana, Taylor &
Francis Group, LLC, 2019

Engr. Delia O. Evangelista, CE,RMP Day &Time:


Southern Luzon State University, Lucban, Quezon MW/ 3:00 – 4:00 lecture Page 15 of 15
MW 4:00 – 5:30 Laboratory

You might also like