Method of Linear Interpolation

:
 This

method is also known as the method of false position, and by the Latinized version regula falsi. It is also a very old method.

By: Ouday N. Ameen

By: Ouday N. Ameen

x3 = x2 – f(x2) [(x2 – x1)/(f(x2) – f(x1)] Where x3 represents the intersection of the strait line with the x-axis. We calculate f(x3) and then test: If f(x1) * f(x3) < 0 , then set x2 = x3 If f(x1) * f(x3) > 0 , then set x1 = x3 Repetition of this will give estimation of the root.


 

By: Ouday N. Ameen

Algorithm:

to determine the root of f(x) = 0, given values of x1 and x2 such that f(x1) and f(x2) are of opposite signs.

      

Repeat Set x3 = x2 – f(x2) [(x2 – x1)/(f(x2) – f(x1)] if f(x1) * f(x3) < 0, then Set x2 = x3 Else x1 = x3 End if Until abs(f(x3)) ≤ tolerance value

By: Ouday N. Ameen

Example:
 find

the positive root of the cubic equation; f(x) = x3 + x2 -3x – 3 = 0, starting with x1 = 1.0 and x2 = 2.0, and the tolerance equal to 0.001.

By: Ouday N. Ameen

Solution:
#Ino.
1 2 3 4 5

x1
1.0 1.57142 1.70540 1.72788 1.73140

x2
2.0 2.0 2.0 2.0 2.0

x3
1.571 1.70540 1.72788 1.73140 1.73194

F(x1)
-4.0 -1.36449 -0.24784 -0.03936 -0.0015

F(x2)
3.0 3.0 3.0 3.0 3.0

F(x3)
-1.36449 -0.24784 -0.03936 -0.0615 -0.0010

sign
+ + + + +

By: Ouday N. Ameen

Note that although the false position method aims to improve the convergence speed over the bisection method, it can not always achieve the goal, especially when the curve of f(x) on [x1, x2] is not well approximated by a strait line as depicted in figure below.

By: Ouday N. Ameen

f(x) = tan(π − x) − x = 0.
By: Ouday N. Ameen

The Secant Method:
This method is used to improve the method of linear interpolation. Instead of requiring that the function have opposite signs at the two values used for interpolation, we can choose the two values nearest the root and interpolate or extrapolate from these.

Usually the nearest values to the root will be the last two values calculated.
This makes the interval under consideration shorter and hence improves the assumption that the function can be represented by the line through the two points.

By: Ouday N. Ameen

By: Ouday N. Ameen

 

x3 = x2 – [f(x2) (x2 – x1) / (f(x2) – f(x1))] Algorithm: given f(x) = 0, choose x1 and x2 close enough to the root. Repeat Set x3 = x2 – [f(x2) (x2 – x1) / (f(x2) – f(x1))] if abs(f(x2)) < abs(f(x1)) then Set x1 = x2 End if Set x2 = x3 Until abs(f(x3)) ≤ tolerance value

      

By: Ouday N. Ameen

Example:
find

the positive root of 3 + x2 -3x – 3, let f(x) = x x1 = 1.0 and x2 = 2.0, tolerance = 0.001.

By: Ouday N. Ameen

Solution:
#Ino. 1 2 3 4 5 x1 1.0 2.0 1.57142 1.70540 1.73513 x2 2.0 1.57142 1.70540 1.73513 1.73199 x3 1.57142 1.70540 1.73513 1.73199 1.73205 f(x1) -4.0 3.0 -1.36449 -0.24784 -0.0292 f(x2) 3.0 -1.36449 -0.24784 -0.0292 -0.00057 f(x3) -1.36449 -0.24784 -0.0292 -0.00057

*The positive root is x3 = 1.73205 = √3.

By: Ouday N. Ameen

Thank you for your listening

Sign up to vote on this title
UsefulNot useful