Beruflich Dokumente
Kultur Dokumente
Sea y f ( x ) . The values of x that make y = 0 are called roots of the equation. The
fundamental theorem of algebra states that every polynomial of degree n has n roots.
In the case of real estate, it must correspond to x values that make the feature cut the
x-axis:
y
f(x)=cos(x)
x
x1 x2 x3 x4
f1 ( x) x 3 3x 2 x 3
( x 3)( x 1)( x 1) 0
x1 3, x2 1, x3 1
-50
f1(x)
-100
-150
-200
-5 -4 -3 -2 -1 0 1 2 3 4 5
f 2 ( x) x 3 6 x 2 12 x 8 0
( x 2)3
-50
x1 2, x2 2, x3 2 -100
f2(x)
-150
-200
-250
-300
-350
-5 -4 -3 -2 -1 0 1 2 3 4 5
3. A simple real root and one real root with multiplicity two:
Raíz sencilla, raíz doble
100
f 3 ( x ) x 3 12 x 16
( x 4)( x 2) 2
x1 4, x2 2, x3 2 50
f3(x)
-50
-5 -4 -3 -2 -1 0 1 2 3 4 5
f 4 ( x) x 3 2 x 2 3 x 10
( x 2)( x (2 i ))( x (2 i )) 50
x1 2, x2 2 i, x3 2 i
0
f4(x)
-50
-100
-150
-5 -4 -3 -2 -1 0 1 2 3 4 5
For their study, the functions can be classified into algebraic and transcendental.
Algebraic functions
Let g = f (x) the function expressed
f n y n f n 1 y n 1 f1 y f 0 0
Where f i is a polynomial of order i in x. Polynomials are a simple case of algebraic
functions that are usually represented as
f n ( x) a0 a1 x a2 x 2 an x n
Where n is the order of the polynomial.
Example.
f 6 (x) = 5 x 2-x 3 + 7 x 6
Transcendental functions
Are those that are not algebraic. They include the trigonometric, exponential,
logarithmic, among others.
Example.
f ( x) ln x 2 1
f ( x ) e 0.2 sen(3 x 5)
The methods described in this unit require that the function is differentiable in the
range where they apply. If the methods used in non-differentiable or discontinuous
functions at some points, to reach the result will depend, at random, that during the
implementation of the method do not touch those points.
On the other hand, the roots of the equations can be real or complex. The standard
numerical methods for finding roots can be classified into two categories:
Example. Determine the positive real root of the following function considering a
tolerance of 0.001 using the bisection method.
f ( x) x3 x 1
Solution.
In the graph of the function can be seen that the positive real root of the function is in
the interval [1,2]:
x3-x-1
40
30
20
10
-10
-20
-30
-40
0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2
x
20
15
y
10
x1 x2
0 [ ]
20
15
y
10
x1 xm x2
0 [ | ]
x2 x1
0.5
Like f ( xm ) 0 , Ie has not been found and also the root 2 is greater
than the desired tolerance, we proceed to calculate the product f ( x1 ) f ( xm ) :
f ( x1 ) f ( xm ) 0.875
20
15
y
10
x1 x2
0 [ ]
As shown, the interval in which the root is reduced. As the method applies interval is
reduced until it is so small that is very close to the actual value of the root.
Below is a table summarizing the results of the method. We see that in the tenth
x2 x1
iteration 2 <T, so we can conclude that an approximation to the root is
1.32519532 with an error margin of 0.1%.
x2 x1
i x1 x2 xm f ( xm ) f ( x1 ) f ( xm ) 2
1 1 2 1.5 0875 -0875 0.5
2 1 1.5 1.25 -0.296875 0.296875 0.25
3 1.25 1.5 1375 0.22460938 -0.06668091 0125
While convergence of the method is assured as in the range must be the root, it is
usually very slow and it takes a large number of iterations to find a good
approximation to the root.
g (a ) g ( xn 1 )
a xn a xn1
a xn 1 ... (2.4)
On the Mean Value Theorem, we know that
g (a ) g ( xn 1 )
g ( ) ; xn 1 a
a xn 1
So we replace (2.4)
a xn g ( ) a xn 1 ; xn 1 a
Y
a xn
g ( ) ; xn 1 a
a xn 1
In absolute terms:
a xn
g ( ) ; xn 1 a
a xn 1
If g ( ) 1 , Then a xn a xn1 and obviously the absolute value of the
difference between the root and the last approximation xn is less than the difference
between the root and the penultimate approximation.
Then, if the n-th iteration converges:
a xn
g ( ) 1; xn1 a
a xn 1
g ( ) 1; xn 1 a
In contrast, the method is divergent if
a xn a xn 1
That is, if
g ( ) 1; xn 1 a
3. Calculate xn g ( xn 1 ) .
4. Compare xn 1 xn with xn xn 1 :
6. Let T the desired tolerance (the margin of error). If xn xn 1 <T was found
closer to the root with a margin of error of less than T (end method).
Otherwise, go to step 3 by n = n +1.
Solution. We
f ( x) e x x
Then
g ( x) f ( x) x
e x
g(x)=exp(x), g(x)=x
1
g(x)=exp(-x)
0.9
g(x)=x
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
The graph of the equation shows that the value of the root is close to 0.6, so we
choose the initial approximation x0 0.4
Estimate g ( x0 )
g ( x0 ) e 0.4 0.67
g(x)=exp(x), g(x)=x
1
g(x)=exp(-x)
0.9
g(x)=x
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
1
g(x)=exp(-x)
0.9
g(x)=x
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
Like x1 x0 0 , Ie has not been found and also the root x1 x0 is greater
than the desired tolerance, we make a new iteration.
The following table summarizes the results by applying the method. By comparing
differences x2 x1 and x1 x0 shows that x2 x1 x1 x0 Therefore
concluded that the method converges. The method is stopped at iteration 11 because
x11 x10 T , So it can be concluded that 0.56748681 is an approximation to the
value of the root with a margin of error of 0.1%.
n xn g ( xn ) xn xn 1
0 0.4 0.67032005 -
y=f(x)
f(xn)
a xn+1 xn
We know that
tan( ) f ( xn )
And that by definition
f ( xn )
tan( )
xn xn 1
Namely
f ( xn )
f ( xn )
xn xn 1
And then
f ( xn )
xn 1 xn ; n 0,1, 2,
f ( xn )
To determine where this method converges, we will use the same approach as in the
fixed point:
f ( x)
h( x ) x
f ( x)
1. Vicious circle. When using xn is obtained by the tangent value xn1 that by
replacing the recursive formula returns the same value xn .
2. Indeterminacy. When we evaluate the formula at a point where the
function has a maximum or minimum.
1. Calculate f ( x) .
4. Compare xn 1 xn with xn xn 1 :
Example. Get a positive root of the equation using the Newton-Raphson method and
considering a tolerance of 0.001.
2cos ( x) e x 0
Solution. We must
f ( x) 2 sen( x) e x
So our recursive formula is given by
2cos( xn ) e xn
xn 1 xn ; n 0,1, 2,
2 sen( xn ) e xn
2 cos(x)-exp(x)
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
x
The chart can be seen that the value of the root is in the interval [0.2, 0.8] and we
choose 0.2, which represents no objection, since at that point there is not a maximum
or a minimum of the function.
It should be noted that the calculations of the trigonometric functions are given in
radians.
2cos(x)-exp(x)
f(x)
x
x0=0.2 x1=0.66
Like x1 x0 0 , Ie has not been found and also the root x1 x0 is greater
than the desired tolerance, we make a new iteration.
In the next chart you will find the results of each iteration. By comparing differences
x2 x1 and x1 x0 shows that x2 x1 x1 x0 Therefore concluded that the
method converges. The method found an approximation to the value of the root in
just four iterations 0.53978516, with a margin of error of 0.1%.
n xn f ( x) f ( x ) xn 1 xn 1 xn
0 0.2 0.7387304 -1.61874142 0.65636097 -
1 0.65636097 -0.34332806 -3.14824033 0.54730701 0.45636097
2 0.54730701 -0.02073363 -2.76937066 0.53982025 0.10905395
3 0.53982025 -9.6261E-05 -2.74366205 0.53978516 0.00748677
4 0.53978516 -2.1119E-09 -2.74354166 0.53978516 3.5085E-05
Lin Method
This method is not in itself the roots of the polynomial, but an expression which can
be derived roots. The advantage of this method is that it can be obtained through all
the roots of the polynomial, whether real or complex.
Lin's method is to factor an equation of degree n in a quadratic polynomial by a
polynomial of degree n-2, so that the roots are obtained by pairs of quadratic factor,
and the procedure is repeated as necessary.
Sea P( x) 0 an algebraic equation of the form
P( x) a0 x n a1 x n 1 a2 x n 2 an 1 x an ... (2.5)
For x px q
2
is a factor of the polynomial P (x) is necessary bn 1 and bn are
equal to zero
0 an 1 pbn 2 qbn 3
0 an qbn 2 ... (2.8)
Solving for p and q (2.8)
an 1 qbn 3
p
bn 2
a
q n
bn 2 ... (2.9)
If you know the values of p and q we can calculate the coefficients
bi ; i 0,1, 2, , n 2 reduced polynomial.
From initial values for p and q and through an iterative process these values are
determined with the precision required. To this end, we define the increments p
and q :
p p * p; q q * q ... (2.10)
Where p * and q * are the new approaches p and q, respectively, and are given by
(2.9)
an 1 qbn3
p*
bn 2
a
q* n
bn 2 ... (2.11)
Substituting (2.11) in (2.10)
an 1 qbn 3
p p
bn 2
a
q n q
bn 2
So
an 1 pbn 2 qbn 3 bn 1
p
bn 2 bn 2
a qbn 2 b
q n n
bn 2 bn 2
Namely
bn 1
p* p
bn 2
b
q* q n
bn 2
The method converges when bn 1 , bn , p and q tend to zero, and for any of them
can fix the error tolerance.
Note that if bn 2 0 is not possible to apply the method.
The algorithm of the method consists of the following steps:
1. Make p = q = 0.
2. Calculate the polynomial coefficients reduced
bk ak pbk 1 qbk 2 ; k 0,1, 2, , n 2; b1 b2 0
And waste
bn1 an 1 pbn 2 qbn 3
bn an qbn 2
Example. Get an approximation to the roots of the next polynomial using the method
of Lin considering a tolerance of 0.01 in the values of p and q and rounding to three
significant figures:
x 4 x3 6 x 2 3 x 4 0
Solution. We must
a0 1, a1 1, a2 6, a3 3, a4 4; n 4
Let p = q = 0 baseline.
The reduced polynomial coefficients are given by
b0 a0 1
b1 a1 pb0 (1) (0)(1) 1
b2 a2 pb1 qb0 (6) (0)(1) (0)(1) 6
waste, by
b3 a3 pb2 qb1 (3) (0)(6) (0)(1) 3
b4 a4 qb2 (4) (0)(6) 4
Like bn 2 b2 0 , The method can be applied and new approaches are
b3
p* p 0.5
b2
b
q* q 4 0.667
b2
We then p * p = 0.5 and q * q = 0667 and it is necessary that these values are
lower than 0.01, so it is necessary to make a new iteration.
The results of each iteration are summarized in the following table:
i b0 b1 b2 b3 b4 p* q* p* p q * q
Bairstow Method
This method relies on dividing by a factor quadratic polynomial. Let P (x) = 0, the
general polynomial of degree n of the form
P( x ) a0 x n a1 x n 1 a2 x n 2 an 1 x an
We know that to get the quadratic factor
x 2 px q
we have
P( x) ( x 2 px q)(b0 x n 2 b1 x n 3 b2 x n 4 bn 3 x bn 2 ) bn 1 x bn
bn b
p n q bn
p q
In this way, one can calculate the values of p and q to solve the system of linear
equations and, consequently, get the value of new approaches p* p p and
q* q q .
bn b
p n q bn
p q
Example. Get an approximation to the roots of the next polynomial using Bairstow's
method considering a tolerance of 0.01 in the values of p and q and rounding to three
significant figures:
x 4 x3 6 x 2 3 x 4 0
Solution. We must
a0 1, a1 1, a2 6, a3 3, a4 4; n 4
Let p = q = 0 baseline.
The reduced polynomial coefficients are given by
b0 a0 1
b1 a1 pb0 (1) (0)(1) 1
b2 a2 pb1 qb0 (6) (0)(1) (0)(1) 6
waste, by
b3 a3 pb2 qb1 (3) (0)(6) (0)(1) 3
b4 a4 qb2 (4) (0)(6) 4
and the partial derivatives by
b3 b3
b2 6.00; b1 1.00
p q
b4 b4
0.00; b2 6.00
p q
Solving the system
6.00p 1.00q 3.00
0.00p 6.00q 4.00
i b0 b1 b2 b3 b4 p* q* p* p q * q
Bibliography
Terrence J. Akai, numerical methods applied to engineering. Mexico, Limusa
Wiley, 2004.
Richard L. Burden & J. Douglas Faires, Numerical Analysis. 2nd. Ed., Mexico,
Grupo Editorial Iberoamérica, 1993.
Steven C. Chapra & Raymond P. Canale, Numerical methods for engineers. 4th.
ed., Mexico, McGraw-Hill, 2003.
R. Iriarte & V. Balderrama, numerical methods. Mexico, UNAM Faculty of
Engineering., Trillas, 1990.