# Regula Falsi (False Position) Method Algorithm (Step Wise)

## False Position Introduction

Regula Falsi (also known as False Position Method) is one of bracketing and convergence guarenteed method for finding real root of non-linear equations.

False Position Method is bracketing method which means it starts with two initial guesses say x0 and x1 such that x0 and x1 brackets the root i.e. f(x0)f(x1)< 0

Regula Falsi is based on the fact that if f(x) is real and continuous function, and for two initial guesses x0 and x1 brackets the root such that: f(x0)f(x1) < 0 then there exists atleast one root between x0 and x1.

If x0 and x1 are two guesses then we compute new approximated root as:

`x2 = x0 - ((x0-x1) * f(x0))/(f(x0) - f(x1))`

Now we have following three different cases:

1. If f(x2)=0 then the root is x2.
2. If f(x0)f(x2)< 0 then root lies between x0 and x2.
3. If f(x0)f(x2)> 0 then root lies between x1 and x2.

And then process is repeated until we find the root within desired accuracy.

## Algorithm for False Position Method

```1. start

2. Define function f(x)

3. Choose initial guesses x0 and x1 such that f(x0)f(x1) < 0

4. Choose pre-specified tolerable error e.

5. Calculate new approximated root as:

x2 = x0 - ((x0-x1) * f(x0))/(f(x0) - f(x1))

6. Calculate f(x0)f(x2)
a. if f(x0)f(x2) < 0 then x0 = x0 and x1 = x2
b. if f(x0)f(x2) > 0 then x0 = x2 and x1 = x1
c. if f(x0)f(x2) = 0 then goto (8)

7. if |f(x2)|>e then goto (5) otherwise goto (8)

8. Display x2 as root.

9. Stop
```