Top Banner
1 ROOTS OF EQUATIONS Author Lizeth Paola Barrero Riaño Industrial University of Santander 2010 A root or solution of equation f(x)=0 are the values of x for which the equation holds true. The numerical methods are used for finding roots of equations, some of them are: 1. GRAPHICAL METHOD It is a simple method to obtain an ap- proximation to the equation root f(x) =0. It consists of to plot the function and de- termine where it crosses the x-axis. At this point, which represents the x value where f(x) =0, offer an initial approxima- tion of the root. The graphical method is necessary to use any method to find roots, due to it allows us to have a value or a domain values in which the function will be evaluated, due to these will be next to the root. Like- wise, with this method we can indentify if the function has several roots. 2. CLOSED METHODS These are called closed methods because are necessary two initial values to the root, which should “enclose” or to be to the both root sides. The key feature of these methods is that we evaluate a do- main or range in which values are close to the function root; these methods are known as convergent. Within the closed methods are the following methods: 2.1 BISECTION (Also called Bol- zano method) The method feature lie in look for an in- terval where the function changes its sign when is analyzed. The location of the sign change gets more accurately by dividing the interval in a defined amount of sub- intervals. Each of this sub intervals are evaluated to find the sign change. The approximation to the root improves ac- cording to the sub-intervals are getting smaller. The following is the procedure: Step 1: Choose lower, x l, and upper, x u, values, which enclose the root, so that the function changes sign in the interval. This is verified by checking that: 0 l u f x f x
7

Chapter 3 roots of equations

May 06, 2015

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Chapter 3 roots of equations

1

ROOTS OF EQUATIONS

Author

Lizeth Paola Barrero Riaño

Industrial University of Santander

2010

A root or solution of equation f(x)=0 are

the values of x for which the equation

holds true. The numerical methods are

used for finding roots of equations, some

of them are:

1. GRAPHICAL METHOD

It is a simple method to obtain an ap-

proximation to the equation root f(x) =0.

It consists of to plot the function and de-

termine where it crosses the x-axis. At

this point, which represents the x value

where f(x) =0, offer an initial approxima-

tion of the root.

The graphical method is necessary to use

any method to find roots, due to it allows

us to have a value or a domain values in

which the function will be evaluated, due

to these will be next to the root. Like-

wise, with this method we can indentify if

the function has several roots.

2. CLOSED METHODS

These are called closed methods because

are necessary two initial values to the

root, which should “enclose” or to be to

the both root sides. The key feature of

these methods is that we evaluate a do-

main or range in which values are close to

the function root; these methods are

known as convergent. Within the closed

methods are the following methods:

2.1 BISECTION (Also called Bol-zano method)

The method feature lie in look for an in-

terval where the function changes its sign

when is analyzed. The location of the sign

change gets more accurately by dividing

the interval in a defined amount of sub-

intervals. Each of this sub intervals are

evaluated to find the sign change. The

approximation to the root improves ac-

cording to the sub-intervals are getting

smaller.

The following is the procedure:

Step 1: Choose lower, xl, and upper, xu,

values, which enclose the root, so that the

function changes sign in the interval. This

is verified by checking that:

0l uf x f x

Page 2: Chapter 3 roots of equations

2

Step 2: An approximation of the xr root,

is determined by:

Step 3: Realize the following evaluations

to determine in what subinterval the root

is:

If , then the root is

within the lower or left subinterval,

so, do xu=xr and return to step 2.

If , then the root is

within the top or right subinterval,

so, do xl=xr and return to step 2.

If , the root is equal

to xr; the calculations ends.

The maximum number of iterations to ob-

tain the root value is given by the follow-

ing equation:

TOL = Tolerance

2.2 METHOD OF FALSE POSITION

Although the bisection method is techni-cally valid to determine roots its focus is

relatively inefficient. Therefore this method is an improved alternative based on an idea for a more efficient approach to the root. This method raises draw a straight line joining the two interval points (x, y) and (x1, y1), the cut generated by the x-axis allows greater approximation to the root. Using similar triangles, the intersection can be calculated as follows:

The final equation for False position

method is:

The calcula-

tion of the root xr requires replacing one

of the other two values so that they al-

ways have opposite signs, what leads

these two points always enclose the root.

Sometimes, depending on the function,

this method works poorly, while the bi-

section method leads better approxima-

tions. section method leads better ap-

0l rf x f x

0l rf x f x

0l rf x f x

2

l ur

x xx

Page 3: Chapter 3 roots of equations

3

section method leads better approxima-

tions.

3. OPEN METHODS

These methods are based on formulas

that require a single initial value x, or a

couple of them but do not necessarily that

contain the root. Because of this feature,

sometimes these methods diverge or

move away from the root, according to

grows the number of iterations. It is im-

portant to know that when the open

methods converge, these are more effi-

cient than methods that use intervals.

Open methods are:

3.1 SIMPLE FIXED POINT ITE-

RATION

Open methods employ a formula that pre-

dicts the root, this formula can be devel-

oped for a single iteration of a fixed point (also called point iteration or successive

substitution) to change the equation f (x)

= 0 so that is:

x=g(x)

This formula is employ to predict a new x

value in function of the previous x valor,

through:

xi+1=g(xi)

Subsequently, these iterations are used to

calculate the approximate error so that

the least error indicates the root of the

function in matter.

For instance:

Use simple iteration of a fixed point to lo-

cate the root of f(x) = e-x – x

Solution: Like f(x)=0 ó e-x – x=0

Expressing of the form x=g(x) result us:

x= e-x

Beginning with an initial value of xo=0, we

can apply the iterative equation xi+1=g(xi)

and calculate:

Thus, each iteration bring near increas-

ingly to the estimated value with the true

value of the root, that is to say

0.56714329

3.2 NEWTON RAPHSON METHOD

The most widely used formula to find

roots, is the Newton Raphson, argues that

if it indicates the initial value of x1 as the

value of the root, then it is possible to ex-

tend a tangent line from the point (x1,f

(x1)). Where this straight line crosses the

x-axis will be the point of improve ap-

proach.

=

1

1

100i ia

i

x xx

x

i xi Ea(%) Et(%)

0 0 100.0

1 1.000000 100.0 76.3

2 0.367879 171.8 35.1

3 0.692201 46.9 22.1

4 0.500473 38.3 11.8

5 0.606244 17.4 6.89

6 0.545396 11.2 3.83

7 0.579612 5.90 2.20

8 0.560115 3.48 1.24

9 0.571143 1.93 0.705

10 0.564879 1.11 0.399

Page 4: Chapter 3 roots of equations

4

This method could derived in a graphically

or using Taylor’s series.

Newton Raphson formula

From its reorder is obtained the value of

the desired root.

Note: The Newton Raphson method has a

strong issue for its implementation, this is

due to the derivative, as in some functions

is extremely difficult to evaluate the de-

rivative.

3.3 Secant Method

The secant method allows an approxima-

tion of the derivative by means of a di-

vided difference; this method avoids fal-

ling into the Newton Raphson problem, as

it applies for all functions regardless of

whether they have difficulty in evaluating

its derivative.

The approximation of the derivative is ob-

tained as follows:

Substituting this equation in the Newton

Raphson formula we get:

The above equation is the secant formula.

4. MULTIPLES ROOTS

A multiple root corresponds to a point

where a function is tangential to the x axis

For instance, double root results of:

f(x)=(x – 3)(x – 1)(x – 1) ó f(x)=x3 – 5x2 – 7x - 3

Because a value of x makes two terms in

the previous equation are zero. Graphi-

cally this means that the curve tangen-

tially touches the x axis in the double root.

The function touches the axis but not

cross in the root.

A triple root corresponds to the case

where a value of x makes three terms in

an equation equal to zero, as:

Page 5: Chapter 3 roots of equations

5

an equation equal to zero, as:

f(x)=(x – 3)(x – 1)(x – 1)(x – 1)

ó f(x)=x4 – 6x3 + 12x2– 10x + 3

In this case the function is tangent to the

axis at the root and crosses the axis.

In general, odd multiplicity of roots

crosses the axis, while the pair multiplicity

does not cross.

The multiple roots offer some difficulties

to numerical methods:

1. The fact that the function does not

change sign on multiple pairs roots pre-

vents the use of reliable methods that

use intervals.

2. Not only f(x) but also f'(x) approach

to zero. These problems affect the New-

ton-Raphson and the secant methods,

which contain derivatives in the denomi-

nator of their respective formulas.

Some modifications have been proposed

to alleviate these problems, Ralston and

Rabinowitz (1978) proposed the following

formulas:

a) Root Multiplicity

Where m is the root multiplicity (ie, m=2

for a double root, m=3 for a triple root,

etc.). This formulation may be unsatisfac-

tory because it presumes the root multi-

plicity knowledge.

b) New function definition

The new function is

replaced in the Newton-Raphson’s method

equation, so you get an alternative:

c) Secant Method Modification

Substituting the new function (explained

previously) in the equation of the secant

method, we have

5. POLYNOMIALS ROOTS

Below are described the methods to find

polynomial equations roots of the general

form:

Where n is the polynomial order and the a

are constant coefficients. The roots of

such polynomials have the following rules:

a. For equation of order n, there are n

real or complex roots. It should be

noted that these roots are not necessar-

ily different.

b. If n is odd, there is at least one real

root.

Page 6: Chapter 3 roots of equations

6

c. If the roots are complex, there is a

conjugate pair (i.e., λ + µi y λ - µi) where

A predecessor of Muller method is the se-

cant method, which obtain root, estimating

a projection of a straight line on the x-axis

through two function values (Shape

1). Muller's method takes a similar view, but

projected a parabola through three points

(Shape 2).

The method consist in to obtain the coeffi-

cients of the three points, replace them in

the quadratic formula and get the point

where the parabola intersects the x-axis The

approach is easy to write, as appropriate

this would be:

Shape 1

Shape 2

Thus, this parable is used to intersect the three points [x0, f(x0)], [x1, f(x1)] and [x2, f(x2)]. The coefficients of the previous equa-tion are evaluated by substituting one of these three points to make:

The last equation generated that , in this way, we can have a system of two equations with two unknowns: Defining this way:

Substituting in the system: The coefficients are:

Finding the root, the conventional solution is implemented, but due to rounding error po-tential, we use an alternative formulation:

cxxbxxaxf )()()( 2

2

22

cxf )( 2

2

0 0 2 0 2( ) ( ) ( )f x a x x b x x c

2

1 1 2 1 2( ) ( ) ( )f x a x x b x x c

2

2 2 2 2 2( ) ( ) ( )f x a x x b x x c

2

0 2 0 2 0 2( ) ( ) ( ) ( )f x f x a x x b x x

)()()()( 21

2

2121 xxbxxaxfxf

010 xxh 1 2 1h x x

12

121

)()(

xx

xfxf

01

210

)()(

xx

xfxf

1100

2

1010 )()( hhahhbhh

11

2

11 hahbh

01

01

hha

11 ahb

)( 2xfc

acbb

cxx

4

2

223

Page 7: Chapter 3 roots of equations

7

Solving: The great advantage of this method is that we find real and imaginary roots. Finding the error this will be: To be an approximation method, this is per-formed sequentially and iteratively, where x1, x2, x3replace the points x0, x1, x2 carrying the error to a value close to zero. 5. 1 Bairstow’s Method Bairstow's method is an iterative process related approximately with Muller and New-ton-Raphson methods. The mathematical process depends of dividing the polynomial between a factor. Given a polynomial fn(x) find two factors, a quadratic polynomial f2(x) = x2 – rx – s y fn-2

(x). The general procedure for the Bairstow method is: 1. Given fn(x) y r0 y s0 2. Using Newton-Raphson method calcu-

late f2(x) = x2 – r0x – s0 y fn-2(x), such as, the residue of fn(x)/ f2(x) be equal to zero.

3. The roots f2(x) are determined, using the general formula.

4. Calculate fn-2(x)= fn(x)/ f2(x). 5. Do fn(x)= fn-2(x) 6. If the polynomial degree is greater

than three, back to step 2 7. If not, we finish

The main difference of this method in rela-tion to others, allows calculating all the poly-nomial roots (real and imaginaries). To calculate the polynomials division, we

use the synthetic division. So given fn(x) = anx

n + an-1xn-1 + … + a2x

2 + a1x + a0 By dividing between f2(x) = x2 – rx – s, we have as a result the following polynomial

fn-2(x) = bnx

n-2 + bn-1xn-3 + … + b3x + b2

with a residue R = b1(x-r) + b0, the residue will be zero only if b1 and b0 are. The terms b and c, are calculated using the following recurrence relation:

bn = an bn-1 = an-1 + rbn

bi = ai + rbi+1 + sbi+2

cn = bn cn-1 = bn-1 + rcn

ci = bi + rci+1 + sci+2

Finally, the approximate error in r and s can

be estimated as:

When both estimated errors failed, the roots

values can be determined as:

BIBLIOGRAPHY CHAPRA, Steven C. y CANALE, Raymond P.:

Métodos Numéricos para Ingenieros.

McGraw Hill 2007. 5th edition.

http://numerical-methods.com/roots.htm

acbb

cxx

4

2

223

%1003

23

x

xxEa