You are on page 1of 20

Centre for Computer Technology

ICT114 Mathematics for Computing


Week 8

Finding the Roots of f(x)

Objectives
Review

week 7 Convergence Criteria Errors in Computing Fixed Point Iteration Bisection Method Summary

March 20, 2012

Copyright Box Hill Institute

Gauss Jordan Method

For the above matrix, perform a series of row operations to obtain the matrix in the form The matrix B is the inverse of the matrix
Copyright Box Hill Institute

March 20, 2012

Gauss Elimination Method


A

x=b a11 a12 a13 x1 b1 a21 a22 a23 x2 a31 a32 a33 x3 = b2 b3

The solution of the above system of equations is x = A-1b


March 20, 2012

Copyright Box Hill Institute

Centre for Computer Technology

Finding the Roots of f(x)

Introduction
We will discuss methods to find the roots of a polynomial Fixed Point Iteration Bisection Method Newton's Method Secant Method

March 20, 2012

Copyright Box Hill Institute

Convergence Criteria
Convergence is a procedure to monitor progress toward the root and stop when current guess is close enough to the desired root. Convergence checking will avoid searching to unnecessary accuracy. whether two successive approximations to the root are close enough to be considered equal. f(x) is sufficiently close to zero at the current guess.
March 20, 2012

Copyright Box Hill Institute

Centre for Computer Technology

Fixed Point Iteration

Fixed Point Iteration


It involves evaluating a formula that takes a guess at a root as input and returns an updated guess at the root as output. The success of this method depends on the choice of the formula that is iterated

March 20, 2012

Copyright Box Hill Institute

Algorithm : Fixed Point Iteration


To solve f(x) = 0 rewrite as xnew = g(xold) initialize: x0 = . . . for k = 1, 2, . . . xk = g(xk-1) if converged, stop end
March 20, 2012

Copyright Box Hill Institute

Fixed Point Iteration

March 20, 2012

Copyright Box Hill Institute

March 20, 2012

Copyright Box Hill Institute

Centre for Computer Technology

Bisection Method

Bisection Method
Given an initial bracket for a root, the systematic halving of the of the bracket around the root is called the bisection method. Though it does it slowly, it always converges. note: when a root is suspected to lie in the range xleft x xright, the pair (xleft, xright ) is referred to as a bracket.
March 20, 2012

Copyright Box Hill Institute

Bisection Method

March 20, 2012

Copyright Box Hill Institute

Bisection Method

March 20, 2012

Copyright Box Hill Institute

Algorithm : Bisection Method


initialize: a = . . ., b = . . . for k = 1, 2, . . . xm = (a + b) / 2 if f(xm)<0 a = xm, b=b else a =a, b = xm end if converged, stop end
March 20, 2012

Copyright Box Hill Institute

March 20, 2012

Copyright Box Hill Institute

Summary
Fixed

Point Iteration - It involves evaluating a formula that takes a guess at a root as input and returns an updated guess at the root as output. The success of this method depends on the choice of the formula that is iterated Bisection Method - Given an initial bracket for a root, the systematic halving of the of the bracket around the root is called the bisection method. Though it does it slowly, it always converges.
March 20, 2012

Copyright Box Hill Institute

References

Gerald W. Recktenwald, Numerical Methods with MATLAB, Implementation and Application, Prentice Hall H L Verma and C W Gross : Introduction to Quantitative Methods,John Wiley JB Scarborough : Numerical Mathematical Analysis, Jon Hopkins Hall, New Jersey Finding the Roots of f(x) = 0, Gerald W. Recktenwald, Department of Mechanical Engineering, Portland State University
Copyright Box Hill Institute

March 20, 2012

You might also like