Sie sind auf Seite 1von 5

Closed Methods:

A closed method is one which starts with an interval, inside of which you know there must be a root. At each step, the method continues to produce intervals which must contain the root, and those intervals steadily (if slowly) shrink. These methods are guaranteed to find a root within the interval, as long as the function is wellbehaved.

The Bisection Method


Given some function f(x) which is real and continuous, and given some interval [x1, x2] inside of which you want to check for a root, do the following: 1. Calculate f(x1) 2. Calculate f(x2) 3. Check to see if they have the same sign. If so, there may be no root between them. Quit 4. If they have opposite signs, then a. Pick a point, x_new, halfway in between the two ends b. Look at the sign of f(x_new) I. If it's the same as f(x1), the root lies between x_new and x2; so set x1 = x_new II. If it's the same as f(x2), the root lies between x1 and x_new; so set x2 = x_new III. If f(x_new) = 0, then its done c. Go to step "a".

Advantages

Disadvantages
may converge more slowly than some other methods

The root MUST be inside the range. It always converges. Each iteration improves the estimate only requires evaluation of function, not derivative

Example: Find a root of the equation y = x^2 - 4 on interval [0, 5] Stop when relative fractional change is 1e-5.
First, we need to calculate the value of the function at the bottom of the interval (x1 = 0), and the top of the interval (x2 = 5). We also make our first guess: the midpoint of the interval, x_new = 2.5, and evaluate the function there, too. I no X1 F(X1) X2 F(X2) Xnew =X1+X2/2 F(Xnew) 0 0 -4 5 21 2.5 2.25 1 0 -4 2.25 1.06 1.125 -1.15 2 1.125 -2.7 2.25 2.25 1.68 -1.15 3 1.68 -1.17 2.25 2.25 1.96 -0.13 4 1.96 -0.15 2.25 1.06 2.1 0.41

Graphical Representation:

False Position Method:


The basic idea here is to use an estimate for the new value of the root which is better than the midpoint of the range. As before, it starts with a boundary for which the function is positive at one end and negative at the other. The method assumes that the function changes linearly from one end to the other, and calculates the value of x_new at which that linear approximation crosses zero.

An algorithm for this method looks almost identical to the one above for the Bisection method, but in Step 4a, instead of Well make a linear fit to the function between the two ends, and find the spot where that fit crosses zero: 4. If they have opposite signs, then a. Pick a point, x_new, at which a linear fit between f(x1) and f(x2) equals zero using formula

Xnew =x1- F(X2)(X2-X1) F(X2)-F(X1)

Advantages

Disadvantages

It ALWAYS converges. It usually converges more quickly than the Bisection method. Only requires evaluation of function, not derivative.

each iteration improves the estimate by an unknown amount. may converge very slowly for some functions.

Incremental Search method


1. Start with an initial range that contains the root, and subdivided it into several smaller sub-ranges. 2. Look inside each sub-range one by one for the root. When the sub-range containing the root is identified, choose either end of the range as the guess. 3. Evaluate the error in your guess. If error is too big, subdivide your new range into smaller sub-ranges. 4. Loop back to step 1) and continue the loop until the error in step 3) is small enough.

Graphical Representation:

Incremental Search Method:


The objective of this method is to find intervals in which there is at least one root function evaluated, it should be noted that the function is continuous in the given interval. This defines an initial value and a change of this value (delta) it is evaluated in the given function these values( X0, X0+delta, X+2delta, etc.) until found an X Which evaluated in the function, its result is zero or changes the sign, in these moments we can prove, there were found the root values, as it crosses the x- axis of the function. This procedure, more than a method, is used as a support for processes of other root finding methods.

The method consists in:


1. Picking a starting point x0 and a step size x. Use a positive x if you want to

search to the right (of the x axis), and a negative x if you want to search to the left (of the x axis). 2. Let x1 = x0 + x and calculate f (x0 ) and f (x1). 3. If the sign of f (x) changes between x0 and x1, it is assumed that a root of f (x) exists on the interval (x0 , x1). 4. If the sign of f (x) does not change between x0 and x1, let x2 = x1 + x,and repeat the process.

Limitations:

Only finds real-valued roots of f (x). It can not find complex roots of polynomials. Only finds roots where f (x) crosses the x axis. It can not find roots where f (x) is tangent to the x axis. May be fooled by singularities in f (x), such as in the tangent and cotangent functions. If the step size x is too large, you may miss closely-spaced roots by skipping over them.

Das könnte Ihnen auch gefallen