0% found this document useful (0 votes)
32 views

Module 6 Finding The Roots of Nonlinear Equations Using Iterative Methods Part 1-Of-2

Uploaded by

2022309114
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)
32 views

Module 6 Finding The Roots of Nonlinear Equations Using Iterative Methods Part 1-Of-2

Uploaded by

2022309114
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/ 10

Department of Civil Engineering

CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS


6. Finding the Roots of Nonlinear Equations using Iterative Methods
Solving for the zeros of an equation, a process known as root finding, is one of the oldest problems in
mathematics. Some general features of root finding are discussed in this section.
6.1 General Features of Root Finding
There are two distinct phases in finding the roots of a nonlinear equation: (1) bounding the solution and (2)
refining the solution. These two phases are discussed below. In general, nonlinear equations can behave in many
different ways in the vicinity of the root.
6.1.1 Bounding the Solution
Bounding the solution involves finding rough estimate of the solution that can be used as the initial approximation,
or the starting point, in a systematic procedure that refines the solution to a specified tolerance in an efficient
manner. If possible, the root should be bracketed between two points at which the value of the nonlinear function
has opposite signs. Several possible bounding procedures are:
1. Graphing the function
2. Incremental search
3. Past experiences with the problem or a similar problem
4. Solution of simplified approximate model
5. Previous solution in a sequence of solutions
Graphing the function involves plotting the nonlinear function over the range of interest. Many hand calculators
have the capability to graph a function simply by defining the function and specifying the range of interest.
Spreadsheets generally have graphing capability, as does software like Matlab and Mathcad. Very little effort is
required. The resolution of the plots is generally not precise enough for an accurate result. However, the results
are generally accurate enough to bound the solution. Plots of a nonlinear function display the general behavior
of the nonlinear equation and permit the anticipation of problems.
An incremental search is conducted by starting at one end of the region of interest and evaluating the nonlinear
function at small increments across the region. When the value of the function changes sign, it is assumed that
a root lies in that interval. The two end points of the interval containing the root can be used as initial guesses for
a refining method. If multiple roots are suspected, check for sign changes in the derivative of the function between
the ends of the interval.
6.1.2 Refining the Solution
Refining the solution involves determining the solution to a specified tolerance by an efficient systematic
procedure. Several methods for refining the solution are:
1. Trial and error
Trial and error methods simply guess the root, 𝒙 = 𝜶, evaluate 𝒇(𝜶), and compare to zero. If 𝒇(𝜶) is
close enough to zero, quit. If not, guess another 𝜶, and continue until 𝒇(𝜶) close enough to zero. This
approach is totally unacceptable.
2. Closed domain (bracketing) methods

Page 1 of 10
Department of Civil Engineering
CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS
Closed domain (bracketing) methods are methods that start with two values of 𝒙 which bracket the root,
𝒙 = 𝜶 and systematically reduce the interval while keeping the root trapped within the interval. Two such
methods are
• Interval halving (bisection)
• False position (regula falsi)
Bracketing methods are robust in that they are guaranteed to obtain a solution since the root is trapped in
the closed interval. They can be slow to converge.
3. Open domain methods
Open domain methods do not restrict the root to remain trapped in a closed interval. Consequently, they
are not as robust as bracketing methods and can actually diverge. However, they use information about
the nonlinear function itself to refine the estimates of the root. Thus, they are considerably more efficient
than bracketing methods. Four open domain methods are presented in here:
• The fixed-point iteration method
• Newton’s method
• The secant method
• Muller’s method
6.2 Closed Domain (Bracketing) Methods
Two of the simplest methods for finding the roots of a nonlinear equation are:
1. Interval halving (bisection)
2. False position (regula falsi)
In these two methods, two estimates of the root which bracket the root must first be found by the bounding
process. The root, 𝒙 = 𝜶, is bracketed by the two estimates. The objective is to locate the root to within a
specified tolerance by a systematic procedure while keeping the root bracketed.
Methods which keep the root bracketed during the refinement process are called closed domain, or bracketing,
methods
6.2.1 Internal Halving (Bisection)
One of the simplest methods for finding a root of a nonlinear equation is interval halving (also known as bisection).
In this method, two estimates of the root, 𝒙 = 𝒂 to the left of the root and 𝒙 = 𝒃 to the right of the root, which
bracket the root, must first be obtained which illustrates the two possibilities with 𝒇’(𝒙) > 𝟎 and 𝒇(𝒙) < 𝟎.
The root, 𝒙 = 𝒄, obviously lies between 𝒂 and 𝒃, that is, in the interval (𝒂, 𝒃). The interval between 𝒂 and
𝒃 can be halved by averaging 𝒂 and 𝒃. Thus,
𝒂+𝒃
𝒄 =
𝟐
There are now two intervals: (𝒂, 𝒄) and (𝒄, 𝒃). The interval containing the root, 𝒙 = 𝜶, depends on value of
𝒇(𝒄). If 𝒇(𝒂) ∙ 𝒇(𝒄) < 𝟎, the root is in the interval (𝒂, 𝒄). Thus, set 𝒃 = 𝒄 and continue. If 𝒇(𝒂) ∙ 𝒇(𝒄) > 𝟎,
the root is in the interval (𝒄, 𝒃). Thus, set 𝒂 = 𝒄 and continue. If 𝒇(𝒂)𝒇(𝒄) = 𝟎, 𝒄 is the root. Terminate the
iteration.

Page 2 of 10
Department of Civil Engineering
CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS
The algorithm is as follows:
𝒂+𝒃
𝒄 =
𝟐
If 𝒇(𝒂) ∙ 𝒇(𝒄) < 𝟎 Retain 𝒂 = 𝒂 Set 𝒃 = 𝒄
If 𝒇(𝒂) ∙ 𝒇(𝒄) > 𝟎 Set 𝒂 = 𝒄 Retain 𝒃 = 𝒃
Interval halving is an iterative procedure. The solution is not obtained directly by a single calculation. The
iterations are continued until the size of the interval decreases below a pre-specified tolerance 𝜺𝟏 , that is,
|𝒃 − 𝒂| < 𝜺𝟏 , or the value of 𝒇(𝒙) decreases below a certain tolerance 𝜺𝟐 , that is, |𝒇(𝒄𝟏 )| ≤ 𝜺𝟐 .
Example 6.2.1.1
Solve for the root/s of the equation 𝒙𝟑 + 𝟑𝒙𝟐 + 𝟑𝒙 + 𝟏 = 𝟎 using Internal Halving (Bisection) process.
Set the left end of the bracket 𝒂 = −𝟓 and the right end of the bracket as 𝒃 = 𝟓. Use a tolerance value
for |𝒇(𝒄)| < 𝝐𝟐 = 𝟎. 𝟎𝟎𝟎𝟎𝟏.
Solution:
Initially, if the interval—with which you would find the root—is not given, you set your own interval by
assigning a value of 𝒂 and 𝒃.
Next, setup the function as 𝒇(𝒙) = 𝒙𝟑 + 𝟑𝒙𝟐 + 𝟑𝒙 + 𝟏
Then, create a table with the following column headers
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1
2
3
4
5
For this method, it is better to solve it in the tabular for. You can easily program this in a spreadsheet. So,
start by filling out the fist row of the table which represents the first iteration. You start by writing the
assigned value of 𝒂 and 𝒃.
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1 −𝟓 𝟓
Then, apply the “halving” process by finding the value of 𝒄 using the formula 𝒄 = (𝒂 + 𝒃)/𝟐.
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1 −𝟓 0 𝟓

Page 3 of 10
Department of Civil Engineering
CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS
Then, you can fill out the next three columns which are 𝒇(𝒂), 𝒇(𝒃), and 𝒇(𝒄). Use the function 𝒇(𝒙)
above and input the values of 𝒂, 𝒃, and 𝒄.
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1 −𝟓 0 𝟓 −𝟔𝟒 𝟏 𝟐𝟏𝟔
Lastly, for the first iteration, get the product of 𝒇(𝒂) and 𝒇(𝒄).
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1 −𝟓 0 𝟓 −𝟔𝟒 𝟏 𝟐𝟏𝟔 −𝟔𝟒
Before proceeding to the next iteration, check first for the tolerance level. If |𝒇(𝒄)| is already less than the
tolerance level 𝟎. 𝟎𝟎𝟎𝟎𝟏, you have to stop the iteration. For this iteration, the value of 𝒇(𝒄) = 𝟏 >
𝟎. 𝟎𝟎𝟎𝟎𝟎𝟏, so the iterative process must go on.
For the second iteration, you must find a new value of 𝒂 and 𝒃. This will be based on the value of the
product of 𝑓(𝒂) and 𝒇(𝒄). If the product is negative, the value of 𝒂 is the same as the previous iteration
while 𝒃 is replaced the value of 𝒄. If the product is positive, the value of 𝒃 is the same as the previous
iteration while 𝒂 is replaced the value of 𝒄.
For this particular example, the product 𝒇(𝒂)𝒇(𝒄) is −𝟔𝟒 which is negative, of course. So, the value of
𝒂 retains while 𝒃 is replaced by the value of 𝒄.
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1 −5 0 5 −64 1 216 −64
2 −𝟓 𝟎
Then, apply the “halving” process by finding the value of 𝒄 using the formula 𝒄 = (𝒂 + 𝒃)/𝟐.
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1 −5 0 5 −64 1 216 −64
2 −𝟓 −𝟐. 𝟓 𝟎
Then, you can fill out the next three columns which are 𝒇(𝒂), 𝒇(𝒃), and 𝒇(𝒄). Use the function 𝒇(𝒙)
above and input the values of 𝒂, 𝒃, and 𝒄.
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1 −5 0 5 −64 1 216 −64
2 −𝟓 −𝟐. 𝟓 𝟎 −𝟔𝟒 −𝟑. 𝟑𝟕𝟓 𝟏
Lastly, for the first iteration, get the product of 𝒇(𝒂) and 𝒇(𝒄).
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1 −5 0 5 −64 1 216 −64

Page 4 of 10
Department of Civil Engineering
CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS
2 −𝟓 −𝟐. 𝟓 𝟎 −𝟔𝟒 −𝟑. 𝟑𝟕𝟓 𝟏 𝟐𝟏𝟔
Before proceeding to the next iteration, check first for the tolerance level. If |𝒇(𝒄)| is already less than the
tolerance level 𝟎. 𝟎𝟎𝟎𝟎𝟏, you have to stop the iteration. For this iteration, the value of |𝒇(𝒄)| =
|−𝟑. 𝟑𝟕𝟓| = 𝟑. 𝟑𝟕𝟓 > 𝟎. 𝟎𝟎𝟎𝟎𝟎𝟏, so the iterative process must go on.
The product 𝒇(𝒂)𝒇(𝒄) is 𝟐𝟏𝟔 which is positive, of course. So, the value of 𝒃 retains while 𝒂 is replaced
by the value of 𝒄.
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇 ( 𝒃) 𝒇(𝒂)𝒇(𝒄)
1 −5 0 5 −64 1 216 −64
2 −5 −2.5 0 −64 −3.375 1 216
3 −𝟐. 𝟓 𝟎
The process continues and the summary of the solution is as follows.
Iteratio
𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
n
1 −5 0 5 −64 1 216 −64
2 −5 −2.5 0 −64 −3.375 1 216
3 −2.5 −1.25 0 −3.375 −0.01563 1 0.05273
4 −1.25 −0.625 0 −0.01563 0.05273 1 −0.00082
5 −1.25 −0.9375 −0.625 −0.01563 0.00024 0.05273 0.00000
6 −0.9375 −1.09375 −0.625 0.00024 −0.00082 0.05273 0.00001
7 −1.09375 −1.01563 −0.625 −0.00082 −𝟎. 𝟎𝟎𝟎𝟎𝟎 0.05273 0.00000
After performing the 7th iteration, the value of |𝒇(𝒄)| = |−𝟎. 𝟎𝟎𝟎𝟎𝟎 … | = 𝟎. 𝟎𝟎𝟎𝟎𝟎 … <
𝟎. 𝟎𝟎𝟎𝟎𝟎𝟏. So, the iteration should be stopped. So, the root of the function is the latest value of 𝒄, which
is 𝒙 = −𝟏. 𝟎𝟏𝟓𝟔𝟑. This is very far from the actual solution, though. This is because of the rounding-off
errors and very few iterations performed.
Matter-of-factly, if you use the analytical method (you’re factoring method or other simpler techniques)
in finding the root of the function 𝒇(𝒙) = 𝒙𝟑 + 𝟑𝒙𝟐 + 𝟑𝒙 + 𝟏, the root is actually 𝒙 = −𝟏.
The answer obtained from the iterative process can be improved by decreasing the value of the
tolerance level, which would consequently increase the number of iterations performed. This will then show
convergence to the actual solution which is 𝒙 = −𝟏.
Example 6.2.1.2
Solve for the root/s of the equation 𝒆−𝒙 = 𝒙 using Internal Halving process. Set the left end as 𝒂 = 𝟎
and the right end of the bracket as 𝒃 = 𝟏. Use a tolerance value for |𝒇(𝒄)| < 𝝐𝟐 = 𝟎. 𝟎𝟎𝟎𝟎𝟏.
Solution:

Page 5 of 10
Department of Civil Engineering
CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS
Initially, if the interval—with which you would find the root—is not given, you set your own interval by
assigning a value of 𝒂 and 𝒃. Then, setup the function as 𝒇(𝒙) = 𝒆−𝒙 − 𝒙
Next, create a table with the following column headers and fill it out using the internal halving process.
Iteration 𝒂 𝒄 𝒃 𝒇(𝒂) 𝒇(𝒄) 𝒇(𝒃) 𝒇(𝒂)𝒇(𝒄)
1 0 0.5 1 1 0.10653 −0.63212 +0.10653
2 0.5 0.75 1 0.10653 −0.27763 −0.63212 −0.02958
3 0.5 0.625 0.75 0.10653 −0.08974 −0.27763 −0.00096
4 0.5 0.5625 0.625 0.10653 0.00728 −0.08974 +0.00078
5 0.5625 0.59375 0.625 0.00728 −0.04150 −0.08974 −0.00030
6 0.5625 0.57813 0.59375 0.00728 −0.01718 −0.04150 −0.00013
7 0.5625 0.57031 0.57813 0.00728 −0.00496 −0.01718 −0.00004
8 0.5625 0.56641 0.57031 0.00728 0.00116 −0.00496 +0.00001
9 0.56641 0.56836 0.57031 0.00116 −0.00191 −0.00496 −0.00000
10 0.56641 0.56738 0.56836 0.00116 −0.00038 −0.00191 −0.00000
11 0.56641 0.56689 0.56738 0.00116 −0.00039 −0.00038 −0.00000
12 0.56689 0.56714 0.56738 0.00039 −0.00001 −0.00038 −0.00000
13 0.56714 0.56726 0.56738 0.00001 −0.00018 −0.00038 −0.00000
14 0.56714 0.56720 0.56726 0.00001 −0.00009 −0.00018 −0.00000
15 0.56714 0.56717 0.56720 0.00001 −0.00004 −0.00009 −0.00000
16 0.56714 0.56715 0.56717 0.00001 −0.00002 −0.00004 −0.00000
17 0.56714 𝟎. 𝟓𝟔𝟕𝟏𝟓 0.56715 0.00001 −0.00000 −0.00002 −0.00000
Since |𝒇(𝒄)| = 𝟎. 𝟎𝟎𝟎𝟎𝟎 … < 𝟎. 𝟎𝟎𝟎𝟎𝟏 = 𝝐𝟐 , then the last value of c is the root of the function.
Therefore, 𝒙 = 𝟎. 𝟓𝟔𝟕𝟏𝟓
6.2.2 False Position (Regula Falsi)
The interval-halving (bisection) method brackets a root in the interval (𝒂, 𝒃) approximates the root as the
midpoint of the interval. In the false position (regula falsi) method, the nonlinear function 𝒇(𝒙) is assumed to be
a linear function 𝒈(𝒙) in the interval (𝒂, 𝒃), and the root of the linear function 𝒈(𝒙), 𝒙 = 𝒄, is taken as the next
approximation of the root of the nonlinear function 𝒇(𝒙), 𝒙 = 𝛼. The process is illustrated graphically below.

Page 6 of 10
Department of Civil Engineering
CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS

Figure 1. Illustration of Regula Falsi (False Position) Method


This method is also called the linear interpolation method. The root of the linear function 𝒈(𝒙), that is, 𝒙 = 𝒄,
is not the root of the nonlinear function 𝒇(𝒙). It is a false position (in Latin, regula falsi), which gives the method
its name. We now have two intervals, (𝒂, 𝒄) and (𝒄, 𝒃). As in the interval-halving (bisection) method, the interval
containing the root of the nonlinear function f(x) is retained, so the root remains bracketed.
The equation of the linear function 𝒈(𝒙) is
𝑓(𝑐) − 𝑓(𝑏)
= 𝑔′(𝑥)
𝑐−𝑏
where 𝒇(𝒄) = 𝟎, and the slope of the linear function given by
𝒇(𝒃) − 𝒇(𝒂)
𝒈′ (𝒙) =
𝒃−𝒂
Solving this for which 𝒇(𝒄) = 𝟎, you get
𝒇(𝒃)
𝒄= 𝒃− ′
𝒈 (𝒙)
Note that 𝒇(𝒂) and 𝒂 could have been used in the above equation instead of 𝒇(𝒃) and 𝒃. The equation for 𝒄
above is applied repetitively until either one or both of the following two convergence criteria are satisfied:
|𝒃 − 𝒂| < 𝜺𝟏 and/or |𝒇(𝒄𝒊 )| ≤ 𝜺𝟐
Example 6.2.2.1
Solve for the root/s of the equation 𝒙𝟑 + 𝟑𝒙𝟐 + 𝟑𝒙 + 𝟏 = 𝟎 using Internal Halving (Bisection) process.
Set the left end of the bracket 𝒂 = −𝟏. 𝟐𝟓 and the right end of the bracket as 𝒃 = −𝟎. 𝟓𝟎. Use a
tolerance value for |𝒇(𝒄)| < 𝝐𝟐 = 𝟎. 𝟎𝟎𝟎𝟏.
Solution:
Just as with bisection method, the equation should be written in the form 𝒇(𝒙) = 𝒙𝟑 + 𝟑𝒙𝟐 + 𝟑𝒙 + 𝟏.
First, evaluate the value of 𝒇(𝒃) since 𝒃 and 𝒇(𝒃) will be fixed all throughout the simulation.

Page 7 of 10
Department of Civil Engineering
CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS
𝒇(−𝟎. 𝟓𝟎) = (−0.50)3 + 3(−0.50)2 + 3(−0.50) + 1
𝒃 = −𝟎. 𝟓𝟎
= 𝟎. 𝟏𝟐𝟓
Create a table with the following column headers and write the value of the left endpoint 𝒂.
Interval 𝒂 𝒇(𝒂) 𝒈′(𝒙) 𝒄 𝒇(𝒄)
1 −𝟏. 𝟐𝟓
Next, evaluate 𝒇(𝒂).
Interval 𝒂 𝒇(𝒂) 𝒈′(𝒙) 𝒄 𝒇(𝒄)
1 −𝟏. 𝟐𝟓 −𝟎. 𝟎𝟏𝟓𝟔𝟑
Then, using the first formula for Regula Falsi, evaluate 𝒈’(𝒙)
𝒇(𝒃) − 𝒇(𝒂) 0.125 − (−0.01563)
𝒈’(𝒙) = = = 𝟎. 𝟏𝟖𝟕𝟓𝟎
𝒃−𝒂 −0.50 − (−1.25)
Interval 𝒂 𝒇(𝒂) 𝒈′(𝒙) 𝒄 𝒇(𝒄)
1 −𝟏. 𝟐𝟓 −𝟎. 𝟎𝟏𝟓𝟔𝟑 𝟎. 𝟏𝟖𝟕𝟓𝟎
Knowing that 𝒃 and 𝒇(𝒃) are constant all throughout the simulation, then the formula to solve for 𝒄 can
be rewritten
𝒇(𝒃) 𝟎. 𝟏𝟐𝟓
𝒄=𝒃− ′ → 𝒄 = −𝟎. 𝟓𝟎 − ′
𝒈 (𝒙) 𝒈 (𝒙)
Interval 𝒂 𝒇(𝒂) 𝒈′(𝒙) 𝒄 𝒇(𝒄)
1 −𝟏. 𝟐𝟓 −𝟎. 𝟎𝟏𝟓𝟔𝟑 𝟎. 𝟏𝟖𝟕𝟓𝟎 −𝟏. 𝟏𝟔𝟔𝟔𝟕
Then, evaluate the value of 𝒇(𝒄).
Interval 𝒂 𝒇(𝒂) 𝒈′(𝒙) 𝒄 𝒇(𝒄)
1 −𝟏. 𝟐𝟓 −𝟎. 𝟎𝟏𝟓𝟔𝟑 𝟎. 𝟏𝟖𝟕𝟓𝟎 −𝟏. 𝟏𝟔𝟔𝟔𝟕 −𝟎. 𝟎𝟎𝟒𝟔𝟑
Check then if the value of 𝒇(𝒄) is less than the tolerance level. Since it is still greater than the tolerance
level, then you must proceed with the iteration.
For the second iteration, the new value of 𝒂 and 𝒇(𝒂) are the values of 𝒄 and 𝒇(𝒄), respectively, from
the previous iteration.
Interval 𝒂 𝒇(𝒂) 𝒈′(𝒙) 𝒄 𝒇(𝒄)
1 −𝟏. 𝟐𝟓 −𝟎. 𝟎𝟏𝟓𝟔𝟑 𝟎. 𝟏𝟖𝟕𝟓𝟎 −𝟏. 𝟏𝟔𝟔𝟔𝟕 −𝟎. 𝟎𝟎𝟒𝟔𝟑
2 −𝟏. 𝟏𝟔𝟔𝟔𝟕 −𝟎. 𝟎𝟎𝟒𝟔𝟑
Then, evaluate the value of the new 𝒈’(𝒙). And solve for the new 𝒄 and 𝒇(𝒄).

Page 8 of 10
Department of Civil Engineering
CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS
Interval 𝒂 𝒇(𝒂) 𝒈′(𝒙) 𝒄 𝒇(𝒄)
1 −𝟏. 𝟐𝟓 −𝟎. 𝟎𝟏𝟓𝟔𝟑 𝟎. 𝟏𝟖𝟕𝟓𝟎 −𝟏. 𝟏𝟔𝟔𝟔𝟕 −𝟎. 𝟎𝟎𝟒𝟔𝟑
2 −𝟏. 𝟏𝟔𝟔𝟔𝟕 −𝟎. 𝟎𝟎𝟒𝟔𝟑 𝟎. 𝟏𝟗𝟒𝟒𝟒 −𝟏. 𝟏𝟒𝟐𝟖𝟔 −𝟎. 𝟎𝟎𝟐𝟗𝟐
Continuing on with the process,
Interval 𝒂 𝒇(𝒂) 𝒈′(𝒙) 𝒄 𝒇(𝒄)
1 −1.25 −0.01563 0.18750 −1.16667 −0.00463
2 −1.16667 −0.00463 0.19444 −1.14286 −0.00292
3 −1.14286 −0.00292 0.19898 −1.12821 −0.00211
4 −1.12821 −0.00211 0.20233 −1.11779 −0.00163
5 −1.11779 −0.00163 0.20498 −1.10982 −0.00132
6 −1.10982 −0.00132 0.20715 −1.10342 −0.00111
7 −1.10342 −0.00111 0.20898 −1.09813 −0.00094
8 −1.09813 −0.00094 0.21056 −1.09364 −0.00082
9 −1.09364 −0.00082 0.21195 −1.08977 −0.00072
10 −1.08977 −0.00072 0.21317 −1.08638 −0.00064
11 −1.08638 −0.00064 0.21427 −1.08337 −0.00058
12 −1.08337 −0.00058 0.21527 −1.08068 −0.00053
13 −1.08068 −0.00053 0.21617 −1.07825 −0.00048
14 −1.07825 −0.00048 0.21700 −1.07604 −0.00044
15 −1.07604 −0.00044 0.21776 −1.07402 −0.00041
16 −1.07402 −0.00041 0.21847 −1.07216 −0.00038
17 −1.07216 −0.00038 0.21913 −1.07045 −0.00035
18 −1.07045 −0.00035 0.21974 −1.06886 −0.00033
19 −1.06886 −0.00033 0.22031 −1.06738 −0.00031
20 −1.06738 −0.00031 0.22085 −1.06599 −0.00029
21 −1.06599 −0.00029 0.22136 −1.06469 −0.00027
22 −1.06469 −0.00027 0.22184 −1.06347 −0.00026
23 −1.06347 −0.00026 0.22229 −1.06232 −0.00024

Page 9 of 10
Department of Civil Engineering
CENUMES 313 – NUMERICAL SOLUTIONS TO CIVIL ENGINEERING PROBLEMS
⋮ ⋮ ⋮ ⋮ ⋮ ⋮
48 −1.04595 −0.00010 0.22914 −1.04511 −0.00009
Since the value of 𝒇(𝒄) is less than the tolerance level, then the root of the function is 𝒙 = −𝟏. 𝟎𝟒𝟓𝟏𝟏,
which based on the analytic method, is approximately equal to the actual xolution 𝒙 = −𝟏.

Example 6.2.1.2
Solve for the root/s of the equation 𝒆−𝒙 = 𝒙 using False Position (Regula Falsi) Method. Set the left end
as 𝒂 = 𝟎 and the right end of the bracket as 𝒃 = 𝟏. Use a tolerance value for |𝒇(𝒄)| < 𝝐𝟐 =
𝟎. 𝟎𝟎𝟎𝟎𝟏.
Solution:
Just as with bisection method, the equation should be written in the form 𝒇(𝒙) = 𝒆−𝒙 − 𝒙.
First, evaluate the value of 𝒇(𝒃) since 𝒃 and 𝒇(𝒃) will be fixed all throughout the simulation.
𝒃 = 𝟏. 𝟎𝟎 𝒇(𝟏) = 𝑒 −(1) − (1) = −𝟎. 𝟔𝟑𝟐𝟏𝟐
Then use the following formula to perform the iterations:
𝒇(𝒃) − 𝒇(𝒂) (−𝟎. 𝟔𝟑𝟐𝟏𝟐)
𝒈’(𝒙) = and 𝒄=𝟏−
𝒃−𝒂 𝒈′ (𝒙)
Interval 𝒂 𝒇(𝒂) 𝒈′(𝒙) 𝒄 𝒇(𝒄)
1 0 1 −1.63212 0.61270 −0.07081
2 0.61270 −0.07081 −1.44928 0.56384 −0.00518
3 0.56384 −0.00518 −1.46116 0.56739 −0.00038
4 0.56739 −0.00038 −1.46029 0.56713 −0.00003
5 0.56713 −0.00003 −1.46035 0.56714 −0.00000
By the fifth iteration, the value of 𝒇(𝒄) is already less than the required tolerance level, so the iteration can
now be stopped. The value of 𝒙 = 𝟎. 𝟓𝟔𝟕𝟏𝟑.

Page 10 of 10

You might also like