Fixed Point Iteration Method using C

Spread the love

Fixed Point Iteration Method

Fixed Point Iteration Method  | This method is also known as a direct substitution method or method of iteration or method of fixed iteration.
It is applicable if the equation f(x) = 0 can be expressed as x=g(x).
If x0 id the initial approximation to the root, then the next approximation to the root is given by,
x1=g(x0)
and the next iteration will be
x2= g(x1)

In general,
xn+1=g(xn)

This method converges if |g(x0)|<1 p=””></1>

Fixed Point Iteration Method
Also read:

#include
#include
#include

float g(float x){
return (sqrt(2*x+8));
}
void main(){
int i,n;
float x0,x1;
clrscr();
printf(“Enter the no of interation:”);
scanf(“%d”,&n);
printf(“Enter the initial value:”);
scanf(“%f”,&x0);
for (i=0;ix1=g(x0);
x0=x1;
}
printf(“the reqd. root is:%f”,x1);
getch();
}

False position method


Spread the love

Santosh Adhikari

Hello, it's me Santosh Adhikari, from Kathmandu, Nepal. I'm a student of Science and Technology. I love new challenges and want to explore more on Software Quality Assurance. I want to be a professional SQA. I'm also interested in Blogging, SEO activities.
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments