際際滷

際際滷Share a Scribd company logo
G H PATEL COLLEGE OF ENGINEERING AND
TECHNOLOGY
DEPARTMENT OF INFORMATION TECHNOLOGY
GUIDED BY:
Prof. Krupal Parikh
Preparad By:
Pruthvi Bhagat (150113116001)
Anu Bhatt (150113116002)
Meet Mehta (150113116004)
Hiral Patel (150113116005)
Janvi Patel (150113116006)
Semester: 4
Subject : Numerical and Statistical Methods for Computer Engineering
(2140706)
BISECTION METHOD or
BRACKETING METHOD
WHAT IS BISECTION METHOD?
Bisection method is one of the closed methods
(bracketing method) to determine the root of a nonlinear
equation f(x) = 0, with the following main principles:
 Using two initial values to confine one or more roots of
non-linear equations.
 Root value is estimated by the midpoint between two
existing initial values.
WHY BISECTION METHOD?
 Bisection or Binary Search Method is based on the
intermediate value theorem.
 It is a very simple and robust method to find the roots of
any given equation.
 The method is guaranteed to converge to a root
of f, if f is a continuous function on the interval [a, b]
and f(a) and f(b) have opposite signs. The absolute
error is halved at each step so the method converges
linearly.
THEOREM:
An equation f(x)=0, where f(x) is a real continuous function,
has at least one root between ヰ and  , if f(ヰ) f( )<0.
ALGORTIHM FOR BISECTION METHOD:
 Choose ヰ and   as two guesses for the root such that
f(ヰ) f( )<0 and it is demonstrated in the figure below:
x
f(x)
xu
x
Estimate the root,   of the equation f(x) =
0 as the mid point between as ヰ and   as:
  = ヰ +   /2
x
f(x)
xu
x
xm
Now check the following:
 If f(ヰ)f( )<0, then the root lies between ヰ and  ;
then ヰ = ヰ ;   = xm.
 If f(ヰ)f( )>0 , then the root lies between xm and  ;
then ヰ =  ;   =  .
 If f(ヰ)f( )=0 ; then the root is  . Stop the algorithm if
this is true.
GRAPHICAL REPRESENTATION
EXAMPLE:
 Consider the following equation:
 Consider an initial interval of ylower = -10 to yupper = 10
 Since the signs are opposite, we know that the method
will converge to a root of the equation.
CONTINUE..
 The value of the function at the midpoint of the interval
is:
 The method can be better understood by looking at a
graph of the function:
CONTINUE..
CONTINUE..
 Now we eliminate half of the interval, keeping the half
where the sign of f(midpoint) is opposite the sign of
f(endpoint).
 In this case, since f(ymid) = -6 and f(yupper) = 64, we keep
the upper half of the interval, since the function crosses
zero in this interval.
CONTINUE..
 The interval has now been bisected, or halved:
CONTINUE..
 New interval: ylower = 0, yupper = 10, ymid = 5
 Function values:
Since f(ylower) and f(ymid) have opposite signs, the lower half
of the interval is kept.
CONTINUE..
 At each step, the difference between the high and low
values of y is compared to 2*(allowable error).
 If the difference is greater, than the procedure continues.
 Suppose we set the allowable error at 0.0005. As long
as the width of the interval is greater than 0.001, we will
continue to halve the interval.
 When the width is less than 0.001, then the midpoint of
the range becomes our answer.
CONTINUE..
ITERATION:
Initial
Guesses
Is interval width narrow
enough to stop?
Evaluate function at
lower and mid values.
If signs are same (+ product),
eliminate lower half of interval.
CONTINUE..
NEXT ITERATION:
New Interval (if statements
based on product at the end
of previous row)
Is interval width narrow
enough to stop?
Evaluate function at
lower and mid values.
If signs are different (- product),
eliminate upper half of interval.
CONTINUE..
 Continue until interval width < 2*error (here are some of
the 16 iterations).
Answer:
y = 0.857
CONTINUE..
 Of course, we know that the exact answer is 6/7
(0.857143).
 If we want our answer accurate to 5 decimal places, we
could set the allowable error to 0.000005.
 This increases the number of iterations only from 16 to
22  the halving process quickly reduces the interval to
very small values.
 Even if the initial guesses are set to -10,000 and 10000,
only 32 iterations are required to get a solution accurate
to 5 decimal places.
CONSIDER A POLYNOMIAL EXAMPLE:
 Equation: f(x) = x2 - 2.
 Start with an interval of length one:
a0 = 1 and b1 = 2. Note that f (a0) = f(1) = - 1 < 0,
f(b0) = f (2) = 2 > 0. Here are the first 20 iterations of
the bisection method:
CONTINUE..
Real life Application
Example 1:
 You have a spherical storage tank containing oil. The
tank has a diameter of 6 ft. You are asked to calculate
the height to which a dipstick 8 ft long would be wet with
oil when immersed in the tank when it contains 4 of oil.
CONTINUE..
 The equation that gives the height, , of the liquid in the
spherical tank for the given volume and radius is given
by
 Use the bisection method of finding roots of equations to
find the height, to which the dipstick is wet with oil.
Conduct three iterations to estimate the root of the above
equation.
 Find the absolute relative approximate error at the end of
each iteration and the number of significant digits at least
correct at the end of each iteration.
  08197.39 23
緒 hhhf
CONTINUE..
 Solution:
 From the physics of the problem, the dipstick would be
wet between h=0 and h=2r , where r = radius of the
tank, i.e.;
60
)3(20
20
o
o
o
h
h
rh
CONTINUE..
 Let us assume,
 Check if the function changes sign between  and  .
 Hence ,
 So there is at least one root between  &   that is
between 0 and 6.
6,0 緒 uhh
      8197.38197.30900)(
23
緒緒 fhf 
18.1048197.3)6(9)6()6() 23
緒緒 ff(hu
           018.1048197.360 種緒 ffhfhf u
CONTINUE..
 Iteration 1:
 The estimate of the root is
=3
Hence the root is bracketed between and  , that is,
between 0 and 3. So, the lower and upper limits of the new
bracket are
2
u
m
hh
h

 
3
        180.501897.33933
23
緒緒 fhf m
           0180.501897.330 種緒 ffhfhf m
3,0 緒 uhh
CONTINUE..
 At this point, the absolute relative approximate error
cannot be calculated, as we do not have a previous
approximation.
 Root of f(x)=0 as a function of the number of iterations
for bisection method.
Iteration h uh mh %a  mhf
1
2
3
4
5
6
7
8
9
10
0.00
0.00
0.00
0.00
0.375
0.5625
0.65625
0.65625
0.65625
0.66797
6
3
1.5
0.75
0.75
0.75
0.75
0.70313
0.67969
0.67969
3
1.5
0.75
0.375
0.5625
0.65625
0.70313
0.67969
0.66797
0.67383
----------
100
100
100
33.333
14.286
6.6667
3.4483
1.7544
0.86957
50.180
13.055
0.82093
2.6068
1.1500
0.22635
0.28215
0.024077
0.10210
0.039249
CONTINUE..
 At the end of the 10th iteration,
 Hence the number of significant digits at least correct is
given by the largest value of m for which
%86957.0緒a
m
a

器o 2
105.0
m
 2
107391.1
  m 27391.1log
  759.17391.1log2 緒m
m
器 2
105.086957.0
CONTINUE..
 The number of significant digits at least correct in the
estimated root 0.67383 is 2.
ADVANTAGES OF BISECTION METHOD:
 The bisection method is always convergent. Since the
method brackets the root, the method is guaranteed to
converge.
 As iterations are conducted, the interval gets halved. So
one can guarantee the error in the solution of the
equation.
DISADVANTAGES OF BISECTION
METHOD:
 The convergence of the bisection method is slow as it is
simply based on halving the interval.
 If one of the initial guesses is closer to the root, it will
take larger number of iterations to reach the root.
 If f(x) is such that it just touches the x axis, it will be
unable to find the lower guess & upper guess.
CONCLUSION:
 Bisection method is the safest and it always converges.
The bisection method is the simplest of all other
methods and is guaranteed to converge for a
continuous function.
 It is always possible to find the number of steps
required for a given accuracy and the new methods can
also be developed from bisection method and bisection
method plays a very crucial role in computer science
research.
THANK YOU

More Related Content

What's hot (8)

13 agua subterranea13 agua subterranea
13 agua subterranea
Juan Soto
Curve fitting
Curve fittingCurve fitting
Curve fitting
aashikareliya
Types of graphs
Types of graphsTypes of graphs
Types of graphs
Ariel Piol
The kolmogorov smirnov test
The kolmogorov smirnov testThe kolmogorov smirnov test
The kolmogorov smirnov test
Subhradeep Mitra
Fluid Mechanics Chapter 4. Differential relations for a fluid flow
Fluid Mechanics Chapter 4. Differential relations for a fluid flowFluid Mechanics Chapter 4. Differential relations for a fluid flow
Fluid Mechanics Chapter 4. Differential relations for a fluid flow
Addisu Dagne Zegeye
Central tendency
Central tendencyCentral tendency
Central tendency
Anil Kr Jha
Chapter 3 Confidence Interval
Chapter 3 Confidence IntervalChapter 3 Confidence Interval
Chapter 3 Confidence Interval
ghalan
Flow meters
Flow metersFlow meters
Flow meters
Vaishali Sharma
13 agua subterranea13 agua subterranea
13 agua subterranea
Juan Soto
Types of graphs
Types of graphsTypes of graphs
Types of graphs
Ariel Piol
The kolmogorov smirnov test
The kolmogorov smirnov testThe kolmogorov smirnov test
The kolmogorov smirnov test
Subhradeep Mitra
Fluid Mechanics Chapter 4. Differential relations for a fluid flow
Fluid Mechanics Chapter 4. Differential relations for a fluid flowFluid Mechanics Chapter 4. Differential relations for a fluid flow
Fluid Mechanics Chapter 4. Differential relations for a fluid flow
Addisu Dagne Zegeye
Central tendency
Central tendencyCentral tendency
Central tendency
Anil Kr Jha
Chapter 3 Confidence Interval
Chapter 3 Confidence IntervalChapter 3 Confidence Interval
Chapter 3 Confidence Interval
ghalan

Viewers also liked (8)

Jacobi and gauss-seidel
Jacobi and gauss-seidelJacobi and gauss-seidel
Jacobi and gauss-seidel
arunsmm
Jacobi method
Jacobi methodJacobi method
Jacobi method
Grishma Maravia
Gauss sediel
Gauss sedielGauss sediel
Gauss sediel
jorgeduardooo
Es272 ch3a
Es272 ch3aEs272 ch3a
Es272 ch3a
Batuhan Y脹ld脹r脹m
Relaxation method
Relaxation methodRelaxation method
Relaxation method
Parinda Rajapaksha
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)
krishnapriya R
Newton Raphson method for load flow analysis
Newton Raphson method for load flow analysisNewton Raphson method for load flow analysis
Newton Raphson method for load flow analysis
divyanshuprakashrock
Regula falsi method
Regula falsi methodRegula falsi method
Regula falsi method
andrushow
Jacobi and gauss-seidel
Jacobi and gauss-seidelJacobi and gauss-seidel
Jacobi and gauss-seidel
arunsmm
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)
krishnapriya R
Newton Raphson method for load flow analysis
Newton Raphson method for load flow analysisNewton Raphson method for load flow analysis
Newton Raphson method for load flow analysis
divyanshuprakashrock
Regula falsi method
Regula falsi methodRegula falsi method
Regula falsi method
andrushow

Similar to NUMERICAL & STATISTICAL METHODS FOR COMPUTER ENGINEERING (20)

Bisection & Regual falsi methods
Bisection & Regual falsi methodsBisection & Regual falsi methods
Bisection & Regual falsi methods
Divya Bhatia
Presentation on Solution to non linear equations
Presentation on Solution to non linear equationsPresentation on Solution to non linear equations
Presentation on Solution to non linear equations
Rifat Rahamatullah
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
Maths Assignment Help
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
Maths Assignment Help
bisection method
bisection methodbisection method
bisection method
Muhammad Usama
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
Math Homework Solver
Presentation on application of numerical method in our life
Presentation on application of numerical method in our lifePresentation on application of numerical method in our life
Presentation on application of numerical method in our life
Manish Kumar Singh
L06
L06L06
L06
Saurav Rahman
TIU CET Review Math Session 6 - part 2 of 2
TIU CET Review Math Session 6 - part 2 of 2TIU CET Review Math Session 6 - part 2 of 2
TIU CET Review Math Session 6 - part 2 of 2
youngeinstein
Newton Raphson Method in numerical methods of advanced engineering mathematics
Newton Raphson Method in numerical methods of advanced engineering mathematicsNewton Raphson Method in numerical methods of advanced engineering mathematics
Newton Raphson Method in numerical methods of advanced engineering mathematics
aryyaka99
Opt Assgnment #-1 PPTX.pptx
Opt Assgnment #-1 PPTX.pptxOpt Assgnment #-1 PPTX.pptx
Opt Assgnment #-1 PPTX.pptx
AbdellaKarime
Aplicaciones de las derivadas
Aplicaciones de las  derivadasAplicaciones de las  derivadas
Aplicaciones de las derivadas
AyshaReyes1
Numerical Analysis and Computer Applications
Numerical Analysis and Computer ApplicationsNumerical Analysis and Computer Applications
Numerical Analysis and Computer Applications
Mujeeb UR Rahman
Week 2 Rational Function, Equation and Inequality -Autosaved-.pptx
Week 2 Rational Function, Equation and Inequality -Autosaved-.pptxWeek 2 Rational Function, Equation and Inequality -Autosaved-.pptx
Week 2 Rational Function, Equation and Inequality -Autosaved-.pptx
klynth23
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
Techglyphs
Numerical Analysis and Its application to Boundary Value Problems
Numerical Analysis and Its application to Boundary Value ProblemsNumerical Analysis and Its application to Boundary Value Problems
Numerical Analysis and Its application to Boundary Value Problems
Gobinda Debnath
Matlab lecture 7 regula falsi or false position method@taj
Matlab lecture 7  regula falsi or false position method@tajMatlab lecture 7  regula falsi or false position method@taj
Matlab lecture 7 regula falsi or false position method@taj
Tajim Md. Niamat Ullah Akhund
Roots of equations
Roots of equations Roots of equations
Roots of equations
shopnohinami
Intro. to computational Physics ch2.pdf
Intro. to computational Physics ch2.pdfIntro. to computational Physics ch2.pdf
Intro. to computational Physics ch2.pdf
JifarRaya
Fortran chapter 2.pdf
Fortran chapter 2.pdfFortran chapter 2.pdf
Fortran chapter 2.pdf
JifarRaya
Bisection & Regual falsi methods
Bisection & Regual falsi methodsBisection & Regual falsi methods
Bisection & Regual falsi methods
Divya Bhatia
Presentation on Solution to non linear equations
Presentation on Solution to non linear equationsPresentation on Solution to non linear equations
Presentation on Solution to non linear equations
Rifat Rahamatullah
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
Maths Assignment Help
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
Maths Assignment Help
Single Variable Calculus Assignment Help
Single Variable Calculus Assignment HelpSingle Variable Calculus Assignment Help
Single Variable Calculus Assignment Help
Math Homework Solver
Presentation on application of numerical method in our life
Presentation on application of numerical method in our lifePresentation on application of numerical method in our life
Presentation on application of numerical method in our life
Manish Kumar Singh
TIU CET Review Math Session 6 - part 2 of 2
TIU CET Review Math Session 6 - part 2 of 2TIU CET Review Math Session 6 - part 2 of 2
TIU CET Review Math Session 6 - part 2 of 2
youngeinstein
Newton Raphson Method in numerical methods of advanced engineering mathematics
Newton Raphson Method in numerical methods of advanced engineering mathematicsNewton Raphson Method in numerical methods of advanced engineering mathematics
Newton Raphson Method in numerical methods of advanced engineering mathematics
aryyaka99
Opt Assgnment #-1 PPTX.pptx
Opt Assgnment #-1 PPTX.pptxOpt Assgnment #-1 PPTX.pptx
Opt Assgnment #-1 PPTX.pptx
AbdellaKarime
Aplicaciones de las derivadas
Aplicaciones de las  derivadasAplicaciones de las  derivadas
Aplicaciones de las derivadas
AyshaReyes1
Numerical Analysis and Computer Applications
Numerical Analysis and Computer ApplicationsNumerical Analysis and Computer Applications
Numerical Analysis and Computer Applications
Mujeeb UR Rahman
Week 2 Rational Function, Equation and Inequality -Autosaved-.pptx
Week 2 Rational Function, Equation and Inequality -Autosaved-.pptxWeek 2 Rational Function, Equation and Inequality -Autosaved-.pptx
Week 2 Rational Function, Equation and Inequality -Autosaved-.pptx
klynth23
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
Techglyphs
Numerical Analysis and Its application to Boundary Value Problems
Numerical Analysis and Its application to Boundary Value ProblemsNumerical Analysis and Its application to Boundary Value Problems
Numerical Analysis and Its application to Boundary Value Problems
Gobinda Debnath
Matlab lecture 7 regula falsi or false position method@taj
Matlab lecture 7  regula falsi or false position method@tajMatlab lecture 7  regula falsi or false position method@taj
Matlab lecture 7 regula falsi or false position method@taj
Tajim Md. Niamat Ullah Akhund
Roots of equations
Roots of equations Roots of equations
Roots of equations
shopnohinami
Intro. to computational Physics ch2.pdf
Intro. to computational Physics ch2.pdfIntro. to computational Physics ch2.pdf
Intro. to computational Physics ch2.pdf
JifarRaya
Fortran chapter 2.pdf
Fortran chapter 2.pdfFortran chapter 2.pdf
Fortran chapter 2.pdf
JifarRaya

Recently uploaded (20)

04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
sreenath seenu
Syntax Directed Definitions Synthesized Attributes and Inherited Attributes
Syntax Directed Definitions  Synthesized Attributes  and  Inherited AttributesSyntax Directed Definitions  Synthesized Attributes  and  Inherited Attributes
Syntax Directed Definitions Synthesized Attributes and Inherited Attributes
GunjalSanjay
Mathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptxMathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptx
ppkmurthy2006
Integration of Additive Manufacturing (AM) with IoT : A Smart Manufacturing A...
Integration of Additive Manufacturing (AM) with IoT : A Smart Manufacturing A...Integration of Additive Manufacturing (AM) with IoT : A Smart Manufacturing A...
Integration of Additive Manufacturing (AM) with IoT : A Smart Manufacturing A...
ASHISHDESAI85
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
BS_EN_ISO_19650_Detailed_Presentation.pptx
BS_EN_ISO_19650_Detailed_Presentation.pptxBS_EN_ISO_19650_Detailed_Presentation.pptx
BS_EN_ISO_19650_Detailed_Presentation.pptx
VinkuMeena
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
How Engineering Model Making Brings Designs to Life.pdf
How Engineering Model Making Brings Designs to Life.pdfHow Engineering Model Making Brings Designs to Life.pdf
How Engineering Model Making Brings Designs to Life.pdf
Maadhu Creatives-Model Making Company
Water Industry Process Automation & Control Monthly - March 2025.pdf
Water Industry Process Automation & Control Monthly - March 2025.pdfWater Industry Process Automation & Control Monthly - March 2025.pdf
Water Industry Process Automation & Control Monthly - March 2025.pdf
Water Industry Process Automation & Control
Industrial Construction shed PEB MFG.pdf
Industrial Construction shed PEB MFG.pdfIndustrial Construction shed PEB MFG.pdf
Industrial Construction shed PEB MFG.pdf
PLINTH & ROOFS
Cyber Security_ Protecting the Digital World.pptx
Cyber Security_ Protecting the Digital World.pptxCyber Security_ Protecting the Digital World.pptx
Cyber Security_ Protecting the Digital World.pptx
Harshith A S
GM Meeting 070225 TO 130225 for 2024.pptx
GM Meeting 070225 TO 130225 for 2024.pptxGM Meeting 070225 TO 130225 for 2024.pptx
GM Meeting 070225 TO 130225 for 2024.pptx
crdslalcomumbai
Lectureof nano 1588236675-biosensors (1).ppt
Lectureof nano 1588236675-biosensors (1).pptLectureof nano 1588236675-biosensors (1).ppt
Lectureof nano 1588236675-biosensors (1).ppt
SherifElGohary7
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
NgocThang9
TM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdfTM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdf
ChungLe60
Piping-and-pipeline-calculations-manual.pdf
Piping-and-pipeline-calculations-manual.pdfPiping-and-pipeline-calculations-manual.pdf
Piping-and-pipeline-calculations-manual.pdf
OMI0721
Frankfurt University of Applied Science urkunde
Frankfurt University of Applied Science urkundeFrankfurt University of Applied Science urkunde
Frankfurt University of Applied Science urkunde
Lisa Emerson
Env and Water Supply Engg._Dr. Hasan.pdf
Env and Water Supply Engg._Dr. Hasan.pdfEnv and Water Supply Engg._Dr. Hasan.pdf
Env and Water Supply Engg._Dr. Hasan.pdf
MahmudHasan747870
Taykon-Kalite belgeleri
Taykon-Kalite belgeleriTaykon-Kalite belgeleri
Taykon-Kalite belgeleri
TAYKON
Sachpazis: Foundation Analysis and Design: Single Piles
Sachpazis: Foundation Analysis and Design: Single PilesSachpazis: Foundation Analysis and Design: Single Piles
Sachpazis: Foundation Analysis and Design: Single Piles
Dr.Costas Sachpazis
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
sreenath seenu
Syntax Directed Definitions Synthesized Attributes and Inherited Attributes
Syntax Directed Definitions  Synthesized Attributes  and  Inherited AttributesSyntax Directed Definitions  Synthesized Attributes  and  Inherited Attributes
Syntax Directed Definitions Synthesized Attributes and Inherited Attributes
GunjalSanjay
Mathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptxMathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptx
ppkmurthy2006
Integration of Additive Manufacturing (AM) with IoT : A Smart Manufacturing A...
Integration of Additive Manufacturing (AM) with IoT : A Smart Manufacturing A...Integration of Additive Manufacturing (AM) with IoT : A Smart Manufacturing A...
Integration of Additive Manufacturing (AM) with IoT : A Smart Manufacturing A...
ASHISHDESAI85
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
BS_EN_ISO_19650_Detailed_Presentation.pptx
BS_EN_ISO_19650_Detailed_Presentation.pptxBS_EN_ISO_19650_Detailed_Presentation.pptx
BS_EN_ISO_19650_Detailed_Presentation.pptx
VinkuMeena
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
Industrial Construction shed PEB MFG.pdf
Industrial Construction shed PEB MFG.pdfIndustrial Construction shed PEB MFG.pdf
Industrial Construction shed PEB MFG.pdf
PLINTH & ROOFS
Cyber Security_ Protecting the Digital World.pptx
Cyber Security_ Protecting the Digital World.pptxCyber Security_ Protecting the Digital World.pptx
Cyber Security_ Protecting the Digital World.pptx
Harshith A S
GM Meeting 070225 TO 130225 for 2024.pptx
GM Meeting 070225 TO 130225 for 2024.pptxGM Meeting 070225 TO 130225 for 2024.pptx
GM Meeting 070225 TO 130225 for 2024.pptx
crdslalcomumbai
Lectureof nano 1588236675-biosensors (1).ppt
Lectureof nano 1588236675-biosensors (1).pptLectureof nano 1588236675-biosensors (1).ppt
Lectureof nano 1588236675-biosensors (1).ppt
SherifElGohary7
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
15. Smart Cities Big Data, Civic Hackers, and the Quest for a New Utopia.pdf
NgocThang9
TM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdfTM-ASP-101-RF_Air Press manual crimping machine.pdf
TM-ASP-101-RF_Air Press manual crimping machine.pdf
ChungLe60
Piping-and-pipeline-calculations-manual.pdf
Piping-and-pipeline-calculations-manual.pdfPiping-and-pipeline-calculations-manual.pdf
Piping-and-pipeline-calculations-manual.pdf
OMI0721
Frankfurt University of Applied Science urkunde
Frankfurt University of Applied Science urkundeFrankfurt University of Applied Science urkunde
Frankfurt University of Applied Science urkunde
Lisa Emerson
Env and Water Supply Engg._Dr. Hasan.pdf
Env and Water Supply Engg._Dr. Hasan.pdfEnv and Water Supply Engg._Dr. Hasan.pdf
Env and Water Supply Engg._Dr. Hasan.pdf
MahmudHasan747870
Taykon-Kalite belgeleri
Taykon-Kalite belgeleriTaykon-Kalite belgeleri
Taykon-Kalite belgeleri
TAYKON
Sachpazis: Foundation Analysis and Design: Single Piles
Sachpazis: Foundation Analysis and Design: Single PilesSachpazis: Foundation Analysis and Design: Single Piles
Sachpazis: Foundation Analysis and Design: Single Piles
Dr.Costas Sachpazis

NUMERICAL & STATISTICAL METHODS FOR COMPUTER ENGINEERING

  • 1. G H PATEL COLLEGE OF ENGINEERING AND TECHNOLOGY DEPARTMENT OF INFORMATION TECHNOLOGY GUIDED BY: Prof. Krupal Parikh Preparad By: Pruthvi Bhagat (150113116001) Anu Bhatt (150113116002) Meet Mehta (150113116004) Hiral Patel (150113116005) Janvi Patel (150113116006) Semester: 4 Subject : Numerical and Statistical Methods for Computer Engineering (2140706)
  • 3. WHAT IS BISECTION METHOD? Bisection method is one of the closed methods (bracketing method) to determine the root of a nonlinear equation f(x) = 0, with the following main principles: Using two initial values to confine one or more roots of non-linear equations. Root value is estimated by the midpoint between two existing initial values.
  • 4. WHY BISECTION METHOD? Bisection or Binary Search Method is based on the intermediate value theorem. It is a very simple and robust method to find the roots of any given equation. The method is guaranteed to converge to a root of f, if f is a continuous function on the interval [a, b] and f(a) and f(b) have opposite signs. The absolute error is halved at each step so the method converges linearly.
  • 5. THEOREM: An equation f(x)=0, where f(x) is a real continuous function, has at least one root between ヰ and , if f(ヰ) f( )<0.
  • 6. ALGORTIHM FOR BISECTION METHOD: Choose ヰ and as two guesses for the root such that f(ヰ) f( )<0 and it is demonstrated in the figure below: x f(x) xu x
  • 7. Estimate the root, of the equation f(x) = 0 as the mid point between as ヰ and as: = ヰ + /2 x f(x) xu x xm
  • 8. Now check the following: If f(ヰ)f( )<0, then the root lies between ヰ and ; then ヰ = ヰ ; = xm. If f(ヰ)f( )>0 , then the root lies between xm and ; then ヰ = ; = . If f(ヰ)f( )=0 ; then the root is . Stop the algorithm if this is true.
  • 10. EXAMPLE: Consider the following equation: Consider an initial interval of ylower = -10 to yupper = 10 Since the signs are opposite, we know that the method will converge to a root of the equation.
  • 11. CONTINUE.. The value of the function at the midpoint of the interval is: The method can be better understood by looking at a graph of the function:
  • 13. CONTINUE.. Now we eliminate half of the interval, keeping the half where the sign of f(midpoint) is opposite the sign of f(endpoint). In this case, since f(ymid) = -6 and f(yupper) = 64, we keep the upper half of the interval, since the function crosses zero in this interval.
  • 14. CONTINUE.. The interval has now been bisected, or halved:
  • 15. CONTINUE.. New interval: ylower = 0, yupper = 10, ymid = 5 Function values: Since f(ylower) and f(ymid) have opposite signs, the lower half of the interval is kept.
  • 16. CONTINUE.. At each step, the difference between the high and low values of y is compared to 2*(allowable error). If the difference is greater, than the procedure continues. Suppose we set the allowable error at 0.0005. As long as the width of the interval is greater than 0.001, we will continue to halve the interval. When the width is less than 0.001, then the midpoint of the range becomes our answer.
  • 17. CONTINUE.. ITERATION: Initial Guesses Is interval width narrow enough to stop? Evaluate function at lower and mid values. If signs are same (+ product), eliminate lower half of interval.
  • 18. CONTINUE.. NEXT ITERATION: New Interval (if statements based on product at the end of previous row) Is interval width narrow enough to stop? Evaluate function at lower and mid values. If signs are different (- product), eliminate upper half of interval.
  • 19. CONTINUE.. Continue until interval width < 2*error (here are some of the 16 iterations). Answer: y = 0.857
  • 20. CONTINUE.. Of course, we know that the exact answer is 6/7 (0.857143). If we want our answer accurate to 5 decimal places, we could set the allowable error to 0.000005. This increases the number of iterations only from 16 to 22 the halving process quickly reduces the interval to very small values. Even if the initial guesses are set to -10,000 and 10000, only 32 iterations are required to get a solution accurate to 5 decimal places.
  • 21. CONSIDER A POLYNOMIAL EXAMPLE: Equation: f(x) = x2 - 2. Start with an interval of length one: a0 = 1 and b1 = 2. Note that f (a0) = f(1) = - 1 < 0, f(b0) = f (2) = 2 > 0. Here are the first 20 iterations of the bisection method:
  • 24. Example 1: You have a spherical storage tank containing oil. The tank has a diameter of 6 ft. You are asked to calculate the height to which a dipstick 8 ft long would be wet with oil when immersed in the tank when it contains 4 of oil.
  • 25. CONTINUE.. The equation that gives the height, , of the liquid in the spherical tank for the given volume and radius is given by Use the bisection method of finding roots of equations to find the height, to which the dipstick is wet with oil. Conduct three iterations to estimate the root of the above equation. Find the absolute relative approximate error at the end of each iteration and the number of significant digits at least correct at the end of each iteration. 08197.39 23 緒 hhhf
  • 26. CONTINUE.. Solution: From the physics of the problem, the dipstick would be wet between h=0 and h=2r , where r = radius of the tank, i.e.; 60 )3(20 20 o o o h h rh
  • 27. CONTINUE.. Let us assume, Check if the function changes sign between and . Hence , So there is at least one root between & that is between 0 and 6. 6,0 緒 uhh 8197.38197.30900)( 23 緒緒 fhf 18.1048197.3)6(9)6()6() 23 緒緒 ff(hu 018.1048197.360 種緒 ffhfhf u
  • 28. CONTINUE.. Iteration 1: The estimate of the root is =3 Hence the root is bracketed between and , that is, between 0 and 3. So, the lower and upper limits of the new bracket are 2 u m hh h 3 180.501897.33933 23 緒緒 fhf m 0180.501897.330 種緒 ffhfhf m 3,0 緒 uhh
  • 29. CONTINUE.. At this point, the absolute relative approximate error cannot be calculated, as we do not have a previous approximation. Root of f(x)=0 as a function of the number of iterations for bisection method. Iteration h uh mh %a mhf 1 2 3 4 5 6 7 8 9 10 0.00 0.00 0.00 0.00 0.375 0.5625 0.65625 0.65625 0.65625 0.66797 6 3 1.5 0.75 0.75 0.75 0.75 0.70313 0.67969 0.67969 3 1.5 0.75 0.375 0.5625 0.65625 0.70313 0.67969 0.66797 0.67383 ---------- 100 100 100 33.333 14.286 6.6667 3.4483 1.7544 0.86957 50.180 13.055 0.82093 2.6068 1.1500 0.22635 0.28215 0.024077 0.10210 0.039249
  • 30. CONTINUE.. At the end of the 10th iteration, Hence the number of significant digits at least correct is given by the largest value of m for which %86957.0緒a m a 器o 2 105.0 m 2 107391.1 m 27391.1log 759.17391.1log2 緒m m 器 2 105.086957.0
  • 31. CONTINUE.. The number of significant digits at least correct in the estimated root 0.67383 is 2.
  • 32. ADVANTAGES OF BISECTION METHOD: The bisection method is always convergent. Since the method brackets the root, the method is guaranteed to converge. As iterations are conducted, the interval gets halved. So one can guarantee the error in the solution of the equation.
  • 33. DISADVANTAGES OF BISECTION METHOD: The convergence of the bisection method is slow as it is simply based on halving the interval. If one of the initial guesses is closer to the root, it will take larger number of iterations to reach the root. If f(x) is such that it just touches the x axis, it will be unable to find the lower guess & upper guess.
  • 34. CONCLUSION: Bisection method is the safest and it always converges. The bisection method is the simplest of all other methods and is guaranteed to converge for a continuous function. It is always possible to find the number of steps required for a given accuracy and the new methods can also be developed from bisection method and bisection method plays a very crucial role in computer science research.