Regula Falsi method or the method of false position or false position method is a numerical method for solving an equation in one unknown. It is quite similar to the bisection method algorithm and is one of the oldest approaches. It was developed because the bisection method converges at a fairly slow speed. In simple terms, the method is the trial and error technique of using test (“false”) values for the variable and then adjusting the test value according to the outcome.
Formula of Regula Falsi Method
Regula Falsi Method Solved Example
C Program
//Regula Falsi Method
//This code is written by Souvik Ghosh
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
//define your function here
float f(float x){
return ((x*x*x)+3*x-5);
}
//main function
void main(){
float a,b,c,e;
int n=0;
//inputs
printf("Please enter the lower guess\n");
scanf("%f",&a);
printf("Please enter the upper guess\n");
scanf("%f",&b);
printf("Please enter the tolerable error\n");
scanf("%f",&e);
printf("\niteration\t\ta\t\tf(a)\t\tb\t\tf(b)\t\tc\t\tf(c)\n");
do{
//formula
c=a-(f(a)*(b-a))/(f(b)-f(a));
n++;
printf("\n%d\t\t%0.4f\t\t%0.4f\t\t%0.4f\t\t%0.4f\t\t%0.4f\t\t%0.4f\n",n,a,f(a),b,f(b),c,f(c));
if((f(a)*f(c))<0)
b=c;
else
a=c;
}while(fabs(f(c))>=e);//terminating condition
printf("The root is: %0.4f\n",c);
}