Chapter:
1.
TITLE:
TO FIND THE ROOTS OF NON-LINEAR EQUATION USING BISECTION METHOD
OBJECTIVES:
To be able to follow the algorithm of Bisection method of solving non linear equation.
To use the Bisection method to solve examples of finding roots of a non linear equation.
To build some programming concepts by solving practical problems.
TOOLS REQUIRED:
Computer workstation
Program software (as necessary)
THEORY:
The bisection method in mathematics, also known as binary chopping or half interval method, is a root finding method that repeatedly bisects an interval and then select an subinterval in which a root must lie for further processing and relies on the fact that if f (x) is real and continuous in the interval a f (a)*f (b)<0 then there is at least one real riot in the interval between a and b. Its strategy is to begin with two values of x say a and b that bisects the root of f (x)=0. This method treats the interval distance between the initial values as line segments and then successively divides the interval in half and replace the one end point with the midpoint so that the root is again bracketed. Start Define function f (x) and stopping criteria E. Decide initial values of x as a and b. Compute f (a) and f (b). If f (a)*f (b)>0 then a and b does not converge and root does not lies between a and b. Go to step 10. Otherwise continue. If `f (x_1)<0` then set `a=x_1` and `b=x_2` otherwise set `a=x_2` and `b=x_1` Calculate `c=(a+b)/2` and f (c). if `f(c)> 0` set `b=c` else set `a=c`. Repeat step 8 until the absolute value of `abs ((b-a)/a) Stop. Thus the roots of the given non linear equation was found out using Bisection method. ALGORITHM:
C-PROGRAM:
//Bisection Method
#include
{
x1 = x2;
f1 = f2;
}
else
{
x0 = x2;
f0 = f2;
}
step = step + 1;
}while(fabs(f2)>e);
printf("\nRoot is: %f", x2);
getch();
}CONCLUSION:
Guest