Anda di halaman 1dari 31

CHAPTER 3: Roots of Equations

By Erika Villarreal
Here comes your footer
Page 2
Roots of Equations

The determination of the roots of an equation is one of the oldest problems in
mathematics and there have been many efforts in this regard. Its importance is
that if we can determine the roots of an equation we can also determine the
maximum and minimum values of matrices, solving systems of linear
differential equations.

Here comes your footer
Page 3
CLOSED METHODS
Closed domain methods are methods that start with two values of x between which is
the root of the equation, x = , the interval is reduced consistently keeping the root
within the interval. The two methods that fall into this category are:

1. Graphical method
2. Bisection method (assuming the range in two)
3. Method of false position

These methods will be developed in the following sections. Closed methods are
robust in the sense that ensure that a solution will be obtained because the root is?
Trapped? on a closed interval. The counterpart of them is they have a slow
convergence.
Here comes your footer
Page 4
CLOSED METHODS
Graphic methods consist of plotting the
function f (x) and observe where the
function crosses the x-axis

Example 1:
Find the following:
1. Graphical Methods
( ) ( ) 0 40 1
38 . 667
146843 . 0
= =
x
e
x
x f
-15
-10
-5
0
5
10
15
20
25
30
35
40
0 5 10 15 20 25
x f(x)
4 34.11488938
8 17.65345264
12 6.066949963
16 -2.268754208
20 -8.400624408
Here comes your footer
Page 5
CLOSED METHODS
Example 2:
Find the following:
1. Graphical Methods
f(x) = sen 10x + cos 3x
-2.50
-2.00
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
2.00
2.50
0.00 1.00 2.00 3.00 4.00 5.00 6.00
x f(x)
0.00 1.00
0.25 1.33
0.50 -0.89
0.75 0.31
1.00 -1.53
1.25 -0.89
1.50 0.44
1.75 -0.46
2.00 1.87
2.25 0.41
2.50 0.21
2.75 0.31
3.00 -1.90
3.25 -0.06
3.50 -0.90
3.75 0.05
4.00 1.59
4.25 -0.01
4.50 1.45
4.75 -0.48
5.00 -1.02
Here comes your footer
Page 6
CLOSED METHODS

It's about finding the zeros of

f (x) = 0

Where f is a continuous function on [a, b]
with f (a) f (b) with different signs

According to the mean value theorem,
there is p e [a, b] such that f (p) = 0.
The method involves dividing the interval
in half and trace half containing p.
The process is repeated to achieve the
desired accuracy.
2. Bisection method
Here comes your footer
Page 7
CLOSED METHODS
2. Bisection method

Half of the interval containing p
First iteration of the algorithm
Here comes your footer
Page 8
CLOSED METHODS
2. Bisection method

Half of the interval containing p
First iteration of the algorithm
Here comes your footer
Page 9
CLOSED METHODS
2. Bisection method
Accession: ends a, b, number of iterations or, tolerance tol
Bisection algorithm
1. p=a; i=1; eps=1;
2. mientras f(p)=0 y i> ni
eps>tol
2.1. pa = p;
2.2. p = (a+b)/2
2.3. si f(p)*f(a)>0 entonces
a=p;
2.4. sino
2.5. si f(p)*f(b)>0 entonces
b=p;
2.6. i = i + 1; eps = |p-
pa|/p;
Here comes your footer
Page 10
CLOSED METHODS
2. Bisection method
double biseccion(double a, double b, double error, int ni){
double p,pa,eps;
int i;
p = a;
i = 1;
eps = 1;
while(f(p) != 0 && i<ni && eps > error){
pa = p;
p = (a+b)/2;
if(f(p)*f(a)>0)
a = p;
else
if(f(p)*f(b)>0)
b = p;
i++;
eps = fabs(p-pa)/p;
}
return p;
}
Here comes your footer
Page 11
Methods closed
2. Bisection method
Here comes your footer
Page 12
CLOSED METHODS


2. Error in the bisection method

For the bisection method is known that the root is within the range, the result must
be within Dx / 2, where Dx = xb - xa.
The solution in this case is equal to the midpoint of the interval
xr = (xb + xa) / 2
Should be expressed by

xr = (xb + xa) / 2 Dx / 2


Approximate Error





replacing
Here comes your footer
Page 13
CLOSED METHODS

This method considers that the range
limit is closer to the root.

From Figure





clearing
3. Method of false position
Here comes your footer
Page 14
CLOSED METHODS
Example 1:

Find the following:
3. Method of false position

( ) ( ) 0 40 1
38 . 667
146843 . 0
= =
x
e
x
x f
xl xu xr f(xl) f(xu) f(xr)
12.0000000 16.0000000 14.9113077 6.0669500 -2.2687542 -0.2542775
12.0000000 14.9113077 14.7941976 6.0669500 -0.2542775 -0.0272572
12.0000000 14.7941976 14.7817001 6.0669500 -0.0272572 -0.0029076
12.0000000 14.7817001 14.7803676 6.0669500 -0.0029076 -0.0003100
12.0000000 14.7803676 14.7802255 6.0669500 -0.0003100 -0.0000330
Here comes your footer
Page 15
CLOSED METHODS
False position in C
Here comes your footer
Page 16
OPEN METHODS
Open domain methods are not restricted to an interval root. Consequently,
these methods are not as robust as methods dimensional and can
diverge. However, these methods use information coming from the nonlinear
function to refine the estimated result.

Thus, these methods are more efficient than dimensional methods. The most
representative methods are:

1. Fixed-point iterative method.
2. Newton-Raphson Method
3. Secant method
4. Muller Method
Here comes your footer
Page 17
OPEN METHODS
A fixed point of a function g (x) is a
number p such that g (p) = p.
Given a problem f (x) = 0, we can
define a function g (x) with a fixed
point p in different ways.For example g
(x) = x - f (x).

Theorem

If g e C [a, b] and g (x) e C [a, b] for all x e
C [a, b], then g has a fixed point in [a, b].
If in addition g '(x) exists in (a, b) and a
positive constant k <1 exists
| G '(x) | <= k,
For all x e(a, b)

Then the fixed point in [a, b] is unique
1. Fixed-Point Iteration
Here comes your footer
Page 18
OPEN METHODS




1. Graph of fixed-point algorithm
Here comes your footer
Page 19
OPEN METHODS




Consider the function: x3 + 4x2 -10 = 0 has a root in [1, 2]

You can unwind in:

a. x = g
1
(x) = x x
3
4x
2
+10
b. x = g
2
(x) = (10 x
3
)

c. x = g
3
(x) = (10/(4 + x))


d. x = g
4
(x) = x (x
3
+ 4x
2
10)/(3x
2
+ 8x)

Here comes your footer
Page 20
OPEN METHODS




1. Fixed point iterations
Here comes your footer
Page 21
OPEN METHODS




1. Functions plotted in Mathlab
Here comes your footer
Page 22
OPEN METHODS




1. Cases of non-convergence
Here comes your footer
Page 23
OPEN METHODS

2. Newton Method
The equation of the tangent line is
y f(x
n
) = f (x
n
)(x x
n
)
When y = 0, x = x
n+1
and
0 f(x
n
) = f (x
n
)(x
n+1
x
n
)

.

x x
f x
f x
n n
n
n
+
=
1
( )
' ( )
Here comes your footer
Page 24
OPEN METHODS

2. Newton Method
Example
f(x) = x cos(x) f(x) = 1 + sen(x)

.

p
n+1
= p
n
(p
n
cos(p
n
))/(1 + sen(p
n
))
Taking p
0
= 0, finding
p
n
f(p
n
) f(p
n
) p
n+1

0 -1 1 1
1 0.459698 1.8414 0.7503639
0.7503639 0.0189 1.6819 0.7391128
0.7391128 0.00005 1.6736 0.7390851
0.7390851 3E-10 1.6736 0.7390851
Here comes your footer
Page 25
OPEN METHODS

3. Alternative method to evaluate the derivative
(secant method)
.

The secant method starts at two points (no one like Newton's method) and estimates
the tangent by an approach according to the expression:
The expression of the secant method gives us the next iteration point:









Here comes your footer
Page 26
OPEN METHODS

3. Alternative method to evaluate the derivative
(secant method)
.

:








In the next iteration, we use the points x1 and x2para estimate a new point closer to the root of
Eq. The figure represents geometric method.

Here comes your footer
Page 27
OPEN METHODS

Multiple roots


In the event that a polynomial has multiple roots, the function will
have zero slope when crossing the x-axis

Such cases can not be detected in the bisection method if the
multiplicity is even.

In Newton's method the derivative is zero at the root.
Usually the function value tends to zero faster than the derivative and
can be used Newton's method
.

:







Here comes your footer
Page 28
OPEN METHODS

1. Muller Method

.

This method used to find roots of equations with multiple roots, and is to obtain the coefficients of the parabola
passing through three selected points. These coefficients are substituted in the quadratic formula to get the
value where the parabola intersects the X axis, the estimated result. The approach can be facilitated if we write
the equation of the parabola in a convenient way.

One of the biggest advantages of this method is that by working with the quadratic formula is therefore possible
to locate real estate, and complex roots.

Formula

The three initial values are denoted as needed xk, xk-1 xk-2. The parabola passes through the
points (xk, f (xk)) (xk-1, f (xk-1)) and (xk-2, f (xk-2)), if written in the form Newton, then:


where f [xk, xk-1] f [xk, xk-1, xk-2] denote subtraction divided. This can be written as:

where

The next iteration is given by the root that gives the equation y = 0
Here comes your footer
Page 29
OPEN METHODS

2. Lin-Bairstow

.

The Lin-Bairstow method finds all the roots (real and complex) of a polinomioP
(x). Given initial values of r and s, made a synthetic divide P (x) by (x2 - rx - s). Use
Newton's method to find r and s values that make the waste is zero, ie, find the roots
of the system of equations.
bn(r, s) = 0, (55)
bn1(r, s) = 0. (56)

Using the recursive rule
r r+r (57)
s s+s
Where


Once you find a quadratic factor of P (x) is solved with the formula


and work continues to take Q (x) as the new polynomial P (x).

Here comes your footer
Page 30
The best thing about the future is that it
comes only one day at a time.
Abraham Lincoln (1809-1865)
Here comes your footer
Page 31
Software and Tools for Microsoft PowerPoint.
The website with innovative solutions.
Save time and money by automating your presentations.
www.presentationpoint.com
http://www.uv.es/diaz/mn/node17.html

http://www.slideshare.net/nestorbalcazar/mto
dos-numricos-03

MTODOS NUMRICOS
Maestra en Ingeniera de Petrleos
Escuela de Ingeniera de Petrleos
David Fuentes Daz
Escuela de Ingeniera de Mecnica

. Mtodos Numricos (SC854)
Solucin de ecuaciones no lineales
M. Valenzuela 20072008
(5 de mayo de 2008)


BIBLIOGRAPY