ITERATION METHOD
* (SUCCESSIVE APPROXIMATION METHOD) *
PREPARED BY”ARVIND KUMAR “MCA 2ND SEM STUDENT (JIM, GZB)


SOME IMPORTANT TIPS FOR ITERATION METHOD
*
*
There are various iterative method for solving the system of equation:

Ø Bisection method
Ø Iteration method
Ø Regularfalsi method
Ø Newton raphson method
Ø Secant method
*
*
But we are more concern about the iteration method

*
*
This method of iteration is useful for finding the real root of an equation given in the form of infinite series

*
*
By successive approximation x0,x1,x2,----we converge the root of f(x)=0


There are following steps are involving to find successive approximation:-
*
*
We write the given equation f(x) =0 in this form x=Ф(x).

*
*
We choose the initial approximation (guess) such a way that │ Ф’(x) │<1.


Note =there are two methods for initial guess:-
1:-graphical method
2:-intermediate method
Graphical method:-
In this method we get the initial approximation of x with the help of
Intersection point of y = x and y = Ф(x).and we get initially x0=a, where, ’a’ is nearest point to the intersection point.


Intermediate method:-
We get two values of f(x) at x=a, & x=b, at which they are in opposite sign, then we take the initially x0=a.
Note:-
1) smaller the value of │Ф’(x) │ but positive then it is more rapidly convergence.
2) For rapidly convergence │Ф’(x) │=0.
3) For fixed point f(x) = x.

Examples:-
1) x ex=1.
2) 2x-lnx=7
3) x3+6x2+10x-20=0
4) Sin x=5x-2
5) x.tanh(x)=1.
Solutions:-

1) x ex =1

So f(x) = x ex-1
x=e-x
x

Ф(x), where Ф(x)

e-x
Ф’(x) = -e-x
Since │Ф’(x) │<1
It means roots are convergent.
Since f(0) and f(1) are in opposite sign.
So root of equation are lies in between them.
Now
We take initially x0=0.
so x1= Ф(x0)
x1 = e-0=>1
x2= Ф(x1)
x2 = e-1=>0.3678794
similarly
x3=0.6922006
. … …………..
………. ……..
………………..
x20=0.567477


2)2x-lnx=7

So f(x) = 2x-lnx-7
x= (7+lnx)/2
x

Ф(x), where Ф(x)

(7+lnx)/2
Ф’(x) = 1/2x( ln e)
Since │Ф’(x) │<1
It means roots are convergent.
Since f(3) and f(4) are in opposite sign
So root of equation are lies in between them.
Now
We take initially x0=3.4
So x1= Ф(x0)
x1=3.77815
similarly
x2= Ф(x1)
x2=3.78863
…………..
……………
x3=3.78924
x4=3.78927
hence root of the equation is
x=3.78927


3) x 3+6x 2+10x-20=0

f(x) =x3+6x2+10x-20
x=(20-x3-6x2)/10
x

Ф(x), where Ф(x)

(20-x3-6x2)/10
so Ф’(x) =(-3x2-12x)/10
Since f(1) and f(2) are in opposite sign
So root of equation are lies in between them
Since Ф’(x )<-1
so│Ф’(x) │>1
It means roots are not convergent

.
4)sinx=(5x-2)

f(x)=sinx-(5x-2)
this equation can be write in two form as
1st –
x=sin-1(5x-2)
2nd –
x=1/5(sinx+2)

Case 1st –
x=sin-1(5x-2)
x

Ф1(x), where Ф1(x)

sin-1(5x-2)
Ф’1(x) = 5/ (1-(5x-2)2)1/2
since Ф1’(x)>1
so│Ф’1(x) │>1
It means roots are not convergent.

Case 2nd –
x=1/5(sinx+2)
x

Ф2(x), where Ф2(x)

1/5(sinx+2)
Ф’2(x) =1/5(cosx)
Since │Ф’(x) │<1
It means roots are convergent.
Now
Since f(0) and f(1) are in opposite sign
So root of equation are lies in between them.
Now we take initially
x0=0.5
x1= Ф2(x0)
x1=0.4017
similarly
x2=0.4014
x3=0.4014
Hence root of equation is x=0.4014



5) x.tanh(x)=1

f(x)=x.tanh(x)-1

this equation can be write as
x=coth(x)
x

Ф(x), where Ф(x)

coth(x)
Ф’(x) = -4/sinh2x
Since │Ф’(x) │<1
It means roots are convergent.
Since f(1) and f(2) are in opposite sign.
So root of equation are lies in between them.
Now initially we take x0=1.
x1= Ф(x0)
x1=1.31303528549933
similarly

x2=1.15601401811395
x3=1.21990402611162
x4=1.19100666638769
x5=1.20352756742564
x6=1.19799585895445
x7=1.20041926080065
x8=1.19935362719156
x9=1.19982145104824
x10=1.19961592438525
x11=1.19970618895035
x12=1.19966654047733
x13=1.19968395490739
x14=1.19967630592522
x15=1.19967966556677

hence
The root is 1.1996786402



Q-for which value of k the equation x=x+k(x2-3) converges to x=31/2 ?.

Sol :- let x= x= Ф(x), where Ф(x) =x+k(x2-3)
Ф’(x) = (1+2kx)
Since given equation will be converges to x = (3)1/2 if
│Ф’(x) │<1
Means to say
-1<Ф’(x) <1
So
-1< (1+2kx) <1
The given equation will be rapidly convergence at x = 31/2
If f(31/2) =0
So
1+2kx=0
=>k= {-1/ (2*31/2}
Thus we can take the value of k=(-1/4) which is nearly equal to
k= {-1/ (2*31/2}




ALGORITHM
STEP 1ST:-read x0, e, n;
Where x0=initial guess
e=allowed error in root
n=total iteration to be allowed for convergence
STEP 2ND:- x1<-Ф(x0)
STEP 3RD:- for i=1 to n in steps of 1 do
STEP 4TH:-x0<-x1
STEP 5TH:-x1<-Ф(x0)
STEP 6TH:-if│(x1-x0)/x1│<=e then GOTO 9th step
End for.
STEP 7TH:-WRITE ‘does not converge to a root’
STEP 8TH:-STOP


NOTE:- step 4 to 6 is repeated until the procedure converges to a root or iteration reach n.
FLOW CHART

START START

Define f(x)

Get the value of x0 and max -error

Set n=0

Xn+1=f ( Xn )

n=n+1

Is
│Xn+1-X n│>max error

Print the root is Xn
STOP

Y
N




START START

Define f(x)

Get the value of x0 and max -error

Set n=0

Xn+1=f ( Xn )

n=n+1

Is
│Xn+1-X n│>max error

Print the root is Xn
STOP

Y
N



COMPUTER PROGRAME

For example:- xex=1

#include<stdio.h>
#include<conio.h>
#include<math.h>
float f(float x);
float g(float x);
float dg(float x);
void main()
{
int i,n;
float a, b,x0,x;
char ch;
clrscr();
do
{
printf("enter the interval\n");
scanf("%f%f",&a,&b);
printf("\nthe interval is =(%f,%f)",a,b);
if(f(a)*f(b)>0)
printf("\nthe inteval is out of range");
else
{
x0=a;
if(fabs(dg(x0))>1)
printf("\niteration can not be convergece");
else
{
printf("\nenter the no.of iteration");
scanf("%d",&n);
for(i=1;i<n;i++)
{
x=g(x0);
printf("\nthe root after the %d th iteration is=%f",i,x);
x0=x;
}
}
}
printf("\nif you want to continue then press y\n");
fflush(stdin);
scanf("%c",&ch);
}while(tolower(ch)=='y');
getch();
}

float f(float x)
{
float f;
f=x*exp(x)-1;
return(f);
}


float g(float x)
{
float g;
g=exp(-x);
return(g);
}


float dg(float x)
{
float dg;
dg=-exp(-x);
return(dg);
}


OUTPUT:-
enter the interval
0
1
the interval is =(0.000000,1.000000)
enter the no.of iteration 20
the root after the 1 th iteration is=1.000000
the root after the 2 th iteration is=0.367879
the root after the 3 th iteration is= 0.697879
…………………………………………………
…………………………………………………
…………………………………………………
the root after the 19 th iteration is= 0.567157
the root after the 20 th iteration is=0.567136
if you want to continue then press y
y
the interval is out of range
if you want to continue then press y
n