Vous êtes sur la page 1sur 10

Hafiz Asad Zahid

DE-35 MECH-B

NUMERICAL
METHODS
ASSIGNMENT-1

BISECTION METHOD
EXPLANATION:
The bisection method is based on the following result from calculus:
The Intermediate Value Theorem:
Assume f : IR IR is a continuous function and there are two real numbers a
and b such that f (a)f (b) < 0. Then f (x) has at least one zero between a and
b.
In other words, if a continuous function has different signs at two points, it
has to go through zero somewhere in between!
The bisection method consists of finding two such numbers a and b, then
halving the interval [a,b] and keeping the half on which f (x) changes sign
and repeating the procedure until this interval shrinks to give the required
accuracy for the root.

Bisection Algorithm:
Step 1: Find two numbers a and b at which f has different signs.
Step 2: Define c = a+ 2b.
Step 3: If b c then accept c as the root and stop.
Step 4: If f (a)f (c) 0 then set c as the new b. Otherwise, set c as the
new a. Return to step 1.

ADVANTAGES:
Always convergent
The root bracket gets halved with each iteration - guaranteed.

We know that the bisection method for root finding is slow (linear convergence), but
has the advantage of always working for a continuous function, if we start with a
interval which brackets the root. However, the arithmetic is very simple, no
derivatives are required, and only one new function evaluation is needed each
iteration.

DRAWBACKS:
Slow convergence
If one of the initial guesses is close to the root, the convergence is slower
If a function f(x) is such that it just touches the x-axis it will be unable to find
the lower and upper guesses.
Function changes sign but root does not exist
The bisection method cannot detect multiple roots

FIXED POINT ITERATION METHOD


DEFINITION: Consider a real function f (x). A number a is called a fixed
point of the function if it satisfies
f (a) = a.
Suppose we are trying to solve the equation f (x) = 0. We can rearrange this
equation as g(x) = x so now we are looking for a fixed point for the function
g.
We start with an initial guess x0 and compute a sequence of successive
approximations using the formula
If the sequence xn converges, then it will converge to the fixed point of g(x)
so we have found the root of f (x) = 0.

Convergence condition for the fixed point iteration


scheme
Consider the equation f (x) = 0, which has the root and can be written as
the fixed point problem g(x) = x. If the following conditions hold
1 g(x) and g (x) are continuous functions;
2 |g ()| < 1
then the fixed point iteration scheme based on the function g will converge
to . Alternatively, if |g ()| > 1 then the iteration will not converge to .
(Note that when |g ()| = 1 no conclusion can be reached.)

ADVANTAGES:
Very easy to program.

DISADVANTAGES:
-Diverges if the absolute value of the derivative of g(x) with respect to x is
greater than 1 for all x in the interval containing the root.
-If the equation has more than 1 root, and f(x) is continuous then this method
may miss one or more roots
-There can be hit or miss when trying to rearrange to make x the subject as
not all rearrangements will work
- Needs decent algebra to rearrange in the form x = .

NEWTON RAPHSON METHOD


Assume we need to find a root of the equation f (x) = 0. Consider the graph
of the function f (x) and an initial estimate of the root, x0. To improve this
estimate, take the tangent to the graph of f (x) through the point (x0,f (x0)
and let x1 be the point where this line crosses the horizontal axis.

where f (x0) is the derivative of f at x0. Then take x1 as the next


approximation and continue the procedure. The general iteration will be
given by

Error analysis
Let be the root of f (x) = 0 we are trying to approximate. Then, Taylors
formula gives

where cn is an unknown point between and xn. This eventually leads to

which means that the error in xn+1 is proportional to the square of the error
in xn. Hence, if the initial estimate was good enough, the error is expected to
decrease very fast and the algorithm converges to the root.
To give an actual error estimation, write Taylors formula again

where cn is an unknown point between and xn, so

which is usually quite accurate.

ADVANTAGES AND DISADVANTAGES OF NEWTONS METHOD:


The error decreases rapidly with each iteration
Newtons method is very fast. (Compare with bisection method!)
3Unfortunately, for bad choices of x0 (the initial guess) the method can fail
to converge!
Therefore the choice of x0 is VERY IMPORTANT!
4Each iteration of Newtons method requires two function evaluations, while
the bisection method requires only one.
1

More calculations involved in each iteration and require large computation


time per iteration and large computer memory
Difficult solution technique (programming is difficult)

METHOD OF FALSE POSITION

The regula falsi method can be considered similar to the secant method and
the bisection method. There are two variations of this technique:

Single False Position


Double False Position

We, in this course, will be using the double false position variant. This type
requires the two input values to get a single output. It also uses a formula
similar to that used in the Newtons Method, however, like in the secant
method, we make use of the definition of derivative to estimate the value,
instead of differentiating the given function. However, to use the definition,
we require two values of input and their corresponding function outputs.
It works on a technique similar to the bisection method, i.e. it works by
reducing the size of the bracketing interval after each iteration. This helps to
pinpoint the root of the given function.
Comparing with the other methods, regula falsi is similar to some of the
methods available for numerical analysis.

Regula Falsi, like bisection, always converges, usually considerably


faster than bisection, but sometimes very much more slowly than
bisection.
Like bisection method, regula falsi also always converges.
Another similarity to the bisection method is that they both rely heavily
on the presence of a bracketing interval without which both these
methods cannot be used.
Can be used as an alternative to the secant method when the
derivative at an input is equal to zero, and Newtons Method cannot be
used.
The following illustration shows that although the regula falsi and the
secant method are different in the way they operate (p4 is different in
both the cases).

SECANT METHOD
Assume we need to find a root of the equation f (x) = 0, called . Consider
the graph of the function f (x) and two initial estimates of the root, x0 and
x1. The two points (x0,f (x0)) and (x1,f (x1)) on the graph of f (x) determine a
straight line, called a secant line which can be viewed as
an approximation to the graph. The point x2 where this secant line crosses
the x axis is then an approximation for the root . This is the same idea as in
Newtons method, where the tangent line has been approximated by a
secant line.

ADVANTAGES AND DISADVANTAGES:


The error decreases slowly at first but then rapidly after a few iterations.
The secant method is slower than Newtons method but faster than the
bisection method.
Each iteration of Newtons method requires two function evaluations, while
the secant method requires only one
The secant method does not require differentiation.
1

COMPARISON BETWEEN NEWTON


RAPHSON AND SECANT METHOD:
Both these methods have a very distinct advantage over the other
methods, that being; these are non-bracketing methods. What this means is
that it is not necessary for these methods to select a point such that it lies in
an interval that contains the root or zero. We can simply
start with a random point and arrive at the solution very easily.
Secant method in a manner is derived from the newton Raphson method.
This is done by replacing the derivative in newton Raphson method with a
finite difference form.
These methods converge to the solution really fast as compared to the
other methods like bisection or regula falsi methods.
Both these methods especially the newton Raphsons method is very easy
to program.
The main difference between these methods is that the newton raphsons
method uses a derivative whereas the secant method uses the difference
form of a derivative.
The other difference between these two is that the Raphson method only
requires a starting guess for x and the subsequent values of x eventually
converge to the true solution. On the other hand in secant method not only
an initial guess for x is required but also a value for h is
required that is to be used throughout the computation. h is the difference;
h=xn-xn-1.

COMPARISON OF BISECTION METHOD


AND FIXED POINT ITERATION METHOD;
Both these methods are similar in that they require a large number of
iterations as compared to other advanced methods such as the newton

Raphson method etc.


Another point of similarity is that both these methods require an initial
guess, which in many cases is taken as the midpoint of a suitable interval
[a,b] with the interval characteristic that f(a).f(b)<0.
Another similarity of the two methods is that both never give the true
solution, they only provide the approximate solution to the problem f(x)=0.
Both these methods require the function f(x) to be continuous on the
interval [a,b] considered.
The major difference between these two methods is in the algorithms of
these two. The bisection method starts out with selecting an interval [a,b] ,
finding its midpoint x and then evaluating the function at this f(x) and on the
basis of the signs of f(x), f(a) and f(b) deciding whether to form the new
interval as [a,x] or [x,b] and so on until the final answer has been obtained.
On the other hand the fixed point method is based on finding an iteration
function (a suitable one) and then by repeatedly evaluating the value of x
(the root of f(x) which is also the fixed point of the iteration function g(x))
from this iteration function up till a certain desired accuracy.

REFERENCES:
http://nm.mathforcollege.com/#sthash.1WQF9xcF.dpbs
http://web.mit.edu/10.001/Web/Course_Notes/NLAE/node5.html
https://answers.yahoo.com/question/index?
qid=20130228221303AALj5Tx
https://en.wikipedia.org/wiki/Bisection_method

Vous aimerez peut-être aussi