ALGORITHM FOR REGULA FALSI
- Input the values of x0,x1,e,n.where e is the error allowed and n is the maximum number of iteration.
2. Find f(x0)*f(x1) and if [f(x0)*f(x1)]<0
{
3. for (i=1 to n)
}
4. calculate x2=[x0f(x1)-x1f(x0)]/f(x0)-f(x1)
5. if |f(x2)|<e and if [f(x0)*f(x2)<0]
x1=x2
6. else
x0=x2
7. print (“Root is x2”)
No comments:
Post a Comment