The Regula Falsi Method also known as False Position Method, The test value is modified in accordance with the result using a trial-and-error methodology that uses false values for the variable.
Let's consider the continous function \(f\) in closed interval \([a,b]\) is given with
and of different signs.
Steps to find the root:
- Find two points \(a\) and \(b\) such that \(f(a) \times f(b) < 0 \)
- Find midpoint of \(a\) and \(b\), say \(c\) \[c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}\]
- If \(f(c) \times f(a) < 0 \), there exist a root between \(c\) and \(a\). else if \(f(c) \times f(b) < 0 \) there exist a root between \(c\) and \(b\).
- Repeat above three steps until \(f(c)=0\)
Example: Consider a function \(f(x)=2 e^x sin(x)-3\)
Assume, \(a=-1.5, b=1\)
We have \(f(a)=-3.4451,f(b)=1.5747\)
\(1^{st}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{-1.5~f(1)-1~f(-1.5)}{f(1)-f(-1.5)}=0.2158\)
\(f(c)=-2.4687\)
Now, replace \(a=c\)
\(2^{nd}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{0.2158~f(1)-1~f(0.2158)}{f(1)-f(0.2158)}=0.6946\)
\(f(c)=-0.4361\)
Now, replace \(a=c\)
\(3^{rd}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{0.6946~f(1)-1~f(0.6946)}{f(1)-f(0.6946)}=0.7608\)
\(f(c)=-0.0489\)
Now, replace \(a=c\)
\(4^{th}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{0.7608~f(1)-1~f(0.7608)}{f(1)-f(0.7608)}=0.7680\)
\(f(c)=-0.0051\)
Now, replace \(a=c\)
\(5^{th}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{0.7680~f(1)-1~f(0.7680)}{f(1)-f(0.7680)}=0.7688\)
\(f(c)=-5.3776e-04\)
We can stop the iteration here as the \(f(c)\) is closed to zero, so the root of the equation is \(c=0.7688\).
Assume, \(a=-1.5, b=1\)
We have \(f(a)=-3.4451,f(b)=1.5747\)
\(1^{st}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{-1.5~f(1)-1~f(-1.5)}{f(1)-f(-1.5)}=0.2158\)
\(f(c)=-2.4687\)
Now, replace \(a=c\)
\(2^{nd}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{0.2158~f(1)-1~f(0.2158)}{f(1)-f(0.2158)}=0.6946\)
\(f(c)=-0.4361\)
Now, replace \(a=c\)
\(3^{rd}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{0.6946~f(1)-1~f(0.6946)}{f(1)-f(0.6946)}=0.7608\)
\(f(c)=-0.0489\)
Now, replace \(a=c\)
\(4^{th}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{0.7608~f(1)-1~f(0.7608)}{f(1)-f(0.7608)}=0.7680\)
\(f(c)=-0.0051\)
Now, replace \(a=c\)
\(5^{th}\) Iteration:
\(c=\frac{a~f(b)-b~f(a)}{f(b)-f(a)}=\frac{0.7680~f(1)-1~f(0.7680)}{f(1)-f(0.7680)}=0.7688\)
\(f(c)=-5.3776e-04\)
We can stop the iteration here as the \(f(c)\) is closed to zero, so the root of the equation is \(c=0.7688\).