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

False Position Method

The document discusses the False Position Method, a numerical technique for finding roots of nonlinear equations, which improves upon the Bisection Method by using a secant line for better accuracy. It outlines the algorithm for the method, including steps for choosing initial points, evaluating the function, and iteratively refining the interval until the root is approximated. An example is provided to illustrate the application of the method in finding a root of a specific equation.

Uploaded by

yousufimam15963
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)
4 views

False Position Method

The document discusses the False Position Method, a numerical technique for finding roots of nonlinear equations, which improves upon the Bisection Method by using a secant line for better accuracy. It outlines the algorithm for the method, including steps for choosing initial points, evaluating the function, and iteratively refining the interval until the root is approximated. An example is provided to illustrate the application of the method in finding a root of a specific equation.

Uploaded by

yousufimam15963
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/ 17

Chapter 02

Solution of Algebraic and


Transcendental Equations
Shirin Sultana
Assistant Professor
Department of CSE
Daffodil International University,
Ashulia, Dhaka, Bangladesh.
False Position Method

2
Introduction

• The Bisection Method has slow convergence and limited


adaptability to higher dimensions, which motivates the use of
improved techniques such as the False Position Method.
• The method of false position (or regula falsi) improves on
the bisection method by using a secant line through the
endpoints to estimate the root more accurately.

3
Method of False Position (1)
𝑌
The False Position Method (also known as Regula Falsi 𝒂, 𝒇 𝒂

Method) is a numerical technique used to find a root of the


𝑓(𝑎)
nonlinear equation 𝑓(𝑥) = 0. 𝑋′ 𝑐 𝑏 𝑋
𝑎
In this method: 𝑓(𝑏)
𝑓(𝑥)
• Two initial points 𝑎 and 𝑏 are chosen such that 𝑓(𝑎) and 𝑌′ 𝑏, 𝑓 𝑏
𝑔(𝑥)
𝑓(𝑏) have opposite signs, indicating a root lies between 𝑎
𝑓(𝑥)
and 𝑏 by the Intermediate Value Theorem. 𝑌
𝑔(𝑥)
𝑏, 𝑓 𝑏
• The nonlinear function 𝑓(𝑥) is approximated by a linear
function 𝑔(𝑥) that passes through the points (𝑎, 𝑓(𝑎)) and 𝑓(𝑏)
𝑋′ 𝑐 𝑋
(𝑏, 𝑓(𝑏)). 𝑎
𝑏
𝑓(𝑎)
• Find where this straight line crosses the x-axis, and call that
𝑎, 𝑓 𝑎 𝑌′
point 𝑐. This 𝑐 is the next guess for the root. 4
Method of False Position (2)
𝑌
• The root of the linear function 𝑔(𝑥), that is 𝑥 = 𝑐, is not 𝒂, 𝒇 𝒂

the actual root of the nonlinear function 𝑓(𝑥). 𝑓(𝑎)

• It is called a false position (in Latin, Regula Falsi), which 𝑋′


𝑎
𝑐 𝑏 𝑋

gives the method its name. 𝑓(𝑏)


𝑓(𝑥)
• After computing 𝑐, we have two subintervals: (𝑎, 𝑐) and 𝑌′ 𝑏, 𝑓 𝑏
𝑔(𝑥)
(𝑐, 𝑏).
𝑓(𝑥)
𝑌
• Just like in the Bisection Method, we choose the 𝑏, 𝑓 𝑏
𝑔(𝑥)

subinterval where the sign of 𝒇(𝒙) changes (i.e., either


𝑓(𝑎) × 𝑓(𝑐) < 0 or 𝑓(𝑐) × 𝑓(𝑏) < 0, because the root 𝑓(𝑏)
𝑋′ 𝑎 𝑐 𝑋
lies in that part. 𝑓(𝑎)
𝑏

• We repeat this process until we get close to the actual 𝑎, 𝑓 𝑎 𝑌′


root.
5
Method of False Position (3)
𝑌

Let the linear function 𝑔(𝑥) pass through: 𝒂, 𝒇 𝒂

𝑓(𝑎)
• Points 𝑎, 𝑓 𝑎 and 𝑏, 𝑓 𝑏 → slope is: 𝑋′ 𝑐 𝑏 𝑋
𝑎

𝑓 𝑎 −𝑓 𝑏 𝑓(𝑏)
𝑔 ′ 𝑥 = (1) 𝑓(𝑥)
𝑎−𝑏 𝑌′ 𝑏, 𝑓 𝑏
𝑔(𝑥)

• Points 𝑐, 𝑓 𝑐 and 𝑏, 𝑓 𝑏 → slope is: 𝑓(𝑥)


𝑌
𝑔(𝑥)
𝑏, 𝑓 𝑏

𝑓 𝑐 − 𝑓 𝑏
𝑔 𝑥 =
𝑐−𝑏 𝑓(𝑏)
𝑋′ 𝑎 𝑐 𝑋
𝑏
0−𝑓 𝑏 −𝑓 𝑏 𝑓(𝑎)
= = (2) 𝑎, 𝑓 𝑎
𝑐−𝑏 𝑐−𝑏 𝑌′
6
Method of False Position (4)
𝑌

Since it’s the same straight line, the slopes must be 𝒂, 𝒇 𝒂

equal. So, equating the equations (1) and 2 : 𝑓(𝑎)


𝑋′ 𝑐 𝑏 𝑋
𝑎
𝑓 𝑎 −𝑓 𝑏 −𝑓 𝑏 𝑓(𝑏)
=
𝑎−𝑏 𝑐−𝑏 𝑌′ 𝑏, 𝑓 𝑏
𝑓(𝑥)

𝑔(𝑥)
Now, solve for 𝑐:
𝑓(𝑥)
𝑓 𝑎 − 𝑓 𝑏 𝑐 − 𝑏 = −𝑓 𝑏 𝑎 − 𝑏 𝑌
𝑏, 𝑓 𝑏
𝑔(𝑥)

𝑓 𝑏 (𝑎 − 𝑏) 𝑓(𝑏)
𝑐=𝑏−
𝑓 𝑎 −𝑓 𝑏 𝑋′ 𝑎 𝑐
𝑏
𝑋

𝑓(𝑎)

𝑎𝑓 𝑏 − 𝑏𝑓 𝑎 𝑎, 𝑓 𝑎 𝑌′
=
𝑓 𝑏 −𝑓 𝑎 7
Algorithm
Step 1: Choose two approximations a and b 𝑏 > 𝑎 such that
𝑓 𝑎 × 𝑓 𝑏 < 0.
𝑎𝑓 𝑏 −𝑏𝑓 𝑎
Step 2: Evaluate the value of 𝑐 using 𝑐 = .
𝑓 𝑏 −𝑓 𝑎
Step 3: If 𝑓 𝑐 = 0, then 𝑐 is the root of the equation 𝑓 𝑥 = 0.
**If 𝑓 𝑐 ≠ 0, then the following two cases arise:
Case-1: If 𝑓 𝑎 × 𝑓 𝑐 < 0, we say that the root lies in the interval 𝑎, 𝑐 . We now
replace c by b for getting the new interval (𝑎, 𝑏).
Case-2: If 𝑓 c × 𝑓 b < 0, we say that the root lies in the interval 𝑐, 𝑏 . We now
replace c by a for getting the new interval (𝑎, 𝑏).
8
Algorithm (continue) 𝑌
𝒂, 𝒇 𝒂
Step 3: If 𝑓 𝑐 = 0, then 𝑐 is the root of the equation
𝑓(𝑎)
𝑓 𝑥 = 0. 𝑋′ 𝑐 𝑏 𝑋
𝑎
**If 𝑓 𝑐 ≠ 0, then the following two cases arise: 𝑓(𝑏)

Case-1: If 𝑓 𝑎 × 𝑓 𝑐 < 0, we say that the root lies in 𝑌′ 𝑏, 𝑓 𝑏


𝑓(𝑥)

𝑔(𝑥)
the interval 𝑎, 𝑐 . We now replace c by b for getting the Case-1
new interval (𝑎, 𝑏). 𝑓(𝑥)
𝑌
𝑔(𝑥)
𝑏, 𝑓 𝑏
Case-2: If 𝑓 c × 𝑓 b < 0, we say that the root lies in
the interval 𝑐, 𝑏 . We now replace c by a for getting the 𝑓(𝑏)
𝑋′ 𝑎 𝑐 𝑋
new interval (𝑎, 𝑏). 𝑓(𝑎)
𝑏

Step 4: Continue Step 2 and Step 3 until 𝑓 𝑐 ≈ 0. 𝑎, 𝑓 𝑎 𝑌′

Then 𝑐 is the root of the equation 𝑓 𝑥 = 0. Case-2 9


𝟑 𝟐
Find a root of the equation 𝒙 + 𝒙 − 𝟏 = 𝟎 using false
position method.
3 2
Solution: Given that, 𝑥 + 𝑥 − 1 = 0
3 2
Let 𝑓 𝑥 = 𝑥 + 𝑥 − 1
Step 1: For 𝑎 = 0,
3 2
𝑓 0 = 0 + 0 − 1 = −1 < 0

For 𝑏 = 1,
3 2
𝑓 1 =1 +1 −1=1>0

∴ 𝑓 𝑎 × 𝑓 𝑏 = 𝑓 0 × 𝑓 1 = −1 × 1 = −1 < 0
Since , 𝑓(𝑎) = 𝑓(0) is negative and 𝑓(𝑏) = 𝑓 (1) is positive, so at least
one real root lies between 0 and 1. 10
Step 2:

Find the value of 𝑐 such that,


𝑎 = 0, 𝑏 = 1
𝑎𝑓 𝑏 − 𝑏𝑓 𝑎
𝑐= .
𝑓 𝑏 −𝑓 𝑎 𝑎𝑓 𝑏 − 𝑏𝑓 𝑎 1
root, 𝑐 = = = 0.5
𝑓 𝑏 −𝑓 𝑎 2

c is the root of the given function if


𝑓 (𝑐) = 0; else follow the next step.

11
Step 3: Case I : If 𝒇 𝒂 × 𝒇 𝒄 < 𝟎 , then 𝒃 = 𝒄 3 2
Case II : If 𝒇 𝒄 × 𝒇 𝒃 < 𝟎 , then 𝒂 = 𝒄
𝑓 𝑥 =𝑥 +𝑥 −1
𝑎𝑓 𝑏 − 𝑏𝑓 𝑎
Iteration 𝑎 𝑏 𝑓(𝑎) 𝑓(𝑏) 𝑐=
𝑓 𝑏 −𝑓 𝑎
𝑓(𝑐) 𝑓(𝑎) ∗ 𝑓(𝑐) 𝑓(𝑐) ∗ 𝑓(𝑏) Change
1 0 1 -1 1 0.5 -0.625 >0 <0 a=c
2 0.5 1 -0.625 1 0.69231 -0.18889 >0 <0 a=c
3 0.69231 1 -0.18889 1 0.74119 -0.04344 >0 <0 a=c
4 0.74119 1 -0.04344 1 0.75197 -0.00934 >0 <0 a=c
5 0.75197 1 -0.00934 1 0.75426 -0.00198 >0 <0 a=c
6 0.75426 1 -0.00198 1 0.75475 -0.00042 >0 <0 a=c
7 0.75475 1 -0.00042 1 0.75485 -0.00009

Here, 𝑓 𝑐 ≈ 0.00009 or near to zero, which is the accuracy condition for the solution exact.
So, the required root of the given equation up to the four decimal places is 0.7548
13
𝟐
Using Regula Falsi Method find the root of 𝒙 + 𝒍𝒏 𝒙 − 𝟐 = 𝟎
that lies in 𝟏, 𝟐 correct up to four decimal places .
𝑥 2 + ln 𝑥 − 2 = 0
Solution: Given that,
2
Let 𝑓 𝑥 = 𝑥 + ln 𝑥 − 2
Step 1: For 𝑎 = 1,
2
𝑓 1 = 1 + ln 1 − 2 = −1 < 0

For 𝑏 = 2,
2
𝑓 2 = 2 + ln 2 − 2 = 2.69315 > 0

∴ 𝑓 𝑎 × 𝑓 𝑏 = 𝑓 1 × 𝑓 2 = −1 × 2.69315 = −2.69315 < 0


Since , 𝑓(𝑎) = 𝑓(1) is negative and 𝑓(𝑏) = 𝑓 (2) is positive, so at least
one real root lies between 1 and 2. 14
Step 2:
Find the mid point of 𝑎 and 𝑏 say, 𝑐
such that,
𝑎𝑓 𝑏 − 𝑏𝑓 𝑎 𝑎 = 1, 𝑏 = 2
𝑐= .
𝑓 𝑏 −𝑓 𝑎 𝑎𝑓 𝑏 − 𝑏𝑓 𝑎
root, 𝑐 = = 1.27077
𝑓 𝑏 −𝑓 𝑎
c is the root of the given function if
𝑓 (𝑐) = 0; else follow the next step.

15
Step 3: Case I : If 𝒇 𝒂 × 𝒇 𝒄 < 𝟎 , then 𝒃 = 𝒄 2
Case II : If 𝒇 𝒄 × 𝒇 𝒃 < 𝟎 , then 𝒂 = 𝒄
𝑓 𝑥 = 𝑥 + ln 𝑥 − 2
𝑐
Iteration 𝑎 𝑏 𝑓(𝑎) 𝑓(𝑏) 𝑎𝑓 𝑏 − 𝑏𝑓 𝑎 𝑓(𝑐) 𝑓(𝑎) ∗ 𝑓(𝑐) 𝑓(𝑐) ∗ 𝑓(𝑏) Change
=
𝑓 𝑏 −𝑓 𝑎
01 1 2 -1 2.69315 1.27077 -0.14552 >0 <0 a=c
02 1.27077 2 -0.14551 2.69315 1.30815 -0.02013 >0 <0 a=c
03 1.30815 2 -0.02012 2.69315 1.31328 -0.00277 >0 <0 a=c
04 1.31328 2 -0.00276 2.69315 1.31399 -0.00036 >0 <0 a=c
05 1.31399 2 -0.00038 2.69315 1.31408 -0.00006

Step 4.
Here, 𝑓 𝑐 ≈ −0.00006 or near to zero, which is the accuracy condition for the solution exact.
So, the required root of the given equation up to the four decimal places is 1.3140.
17
Algorithm of False Position Method

18
Homework
Find the root of the following equations using False position Method
by your own choosing interval.
𝑥
1. 2 − 5𝑥 + 2 = 0
2𝑥 𝑥
2. 𝑒 − 𝑒 − 2 = 0
3. 2𝑥 + cos 𝑥 − 3 = 0
4. cos 𝑥 − ln 𝑥 = 0
2
5. 𝑥 − 4𝑥 − 10 = 0
6. 2𝑥 = 1 + sin 𝑥
3 2
7. 𝑥 − 2𝑥 − 4 = 0

19

You might also like