Upcoming SlideShare
×

# Bisection method

5,347 views

Published on

It is another method to determine root in a equation .

Published in: Health & Medicine, Technology
1 Comment
4 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• best site i have ever seen

Are you sure you want to  Yes  No
Views
Total views
5,347
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
310
1
Likes
4
Embeds 0
No embeds

No notes for slide

### Bisection method

1. 1. Prepared by Md. Mujahid Islam Md. Rafiqul Islam Khaza Fahmida Akter
2. 2. The bisection method in mathematics is a root finding method which repeatedly bisects an interval and then selects a subinterval in which a root must lie for further processing.
3. 3. It is a very simple and robust method, but it is also relatively slow. Because of this, it is often used to obtain a rough approximation to a solution which is then used as a starting point for more rapidly converging methods .The method is also called the binary search method or the dichotomy method.
4. 4. Step 1: Choose two approximations A and B (B>A) such that f(A)*f(B)<0 Step 2: Evaluate the midpoint C of [A,B] given by C=(A+B)/2
5. 5. • Step 3: If f(C)*f(B)<0 then rename B & C as A & B. If not rename of C as B . Then apply the formula of Step 2. • Step 4:Stop evolution when the different of two successive values of C obtained from Step 2 is numerically less than E, the prescribed accuracy .
6. 6. Given that, f (x) = x2 - 2. Our task is finding the root of this equation. Solution: Let us start with an interval of length one: a0 = 1 and b1 = 2. Note that f (a0) = f(1) = - 1 < 0, and f (b0) = f (2) = 2 > 0. Here are the first 20 applications of the bisection algorithm:
7. 7. #include<iostream> #include<cmath> using namespace std; #define ESP 0.0000001 #define f(x) x*x-2 int main(){ double x1,x2,x3,A,B,C; cin>>x1>>x2; int i=1; do{ x3=(x1+x2)/2; A=f(x1);B=f(x2);C=f(x3); if(A*C<0){x2=x3;} else if(C*B){x1=x3;}i++;}while(fabs(C)>ESP);cout<<x3;}
8. 8. • Here we define variable type & function type. • Input two values which are lowest & height value of the function .Then we pass it through function for manipulation . • Function return result until it’s condition fulfill. • Finally we get result .
9. 9. • Definition of Bisection method & Basic information of Bisection method . • Algorithm of Bisection method . • Calculate of root by using by section method with help of important example . • Representing in programming Language .