You are on page 1of 8

Roots of Algebraic and Transcendental Equations

The problem of determining the roots of an equation of the form F(x)


= 0 is a common problem that an engineer needs to solve. Figure 1 below
shows the plot of the F(x) = x3 – 14x2 + 59x – 70. The roots of this equation
occur where the function intersects the x-axis and are the values of x which
satisfy the equation F(x) = 0. How to determine the roots, numerically, for
algebraic equations like the equation shown below or transcendental
equations like F(x) = 2 cos(x) - ex = 0 will be discussed.

Y = x*x*x-14*x*x+59*x-70
10
Roots of F(x)
=0
5

-5

-10
0 2 4 x 6 8 10

FIGURE 1. Plot of F(x) = x3 – 14x2 + 59x – 70

The following numerical methods for solving roots of algebraic and


transcendental equations with one independent variable, x will be presented:

1. Incremental Search Method


2. Bisection Method
3. False Position Method
4. Secant Method
5. Newton Raphson Method
6. Newton’s Second Order Method
♦ Incremental Search Method – used to determine the interval containing
the root.

Procedure:
1. Start with an initial value xi and assume an increment ∆ x.

2. Compute the next value, xi+1 = xi + ∆ x

3. Check the sign of the product F(xi) F(xi+1)


(a) If the sign of the product is positive, then the root is not
between xi and xi+1
(b) If the sign of the product is negative, then the root is between xi
and xi+1
(c) If the product is zero, then the root is equal to xi+1

4. If the product is positive, replace xi by xi+1 and repeat steps 2 and 3


until you get a negative product.

Table1. Solving for the interval of the first positive root of


F(x) = x3 – 14x2 + 59x – 70 = 0 using Incremental Search

xi xi+1 F(xi) F(xi+1) Product


0 0.3 -70 -53.533 3747.31
0.3 0.6 -53.533 -39.424 2110.485
0.6 0.9 -39.424 -27.511 1084.594
0.9 1.2 -27.511 -17.632 485.074
1.2 1.5 -17.632 -9.625 169.708
1.5 1.8 -9.625 -3.328 32.032
1.8 2.1 -3.328 1.421 -4.72909

In the example shown in Table 1, the first positive root of the


equation F(x) = x3 – 14x2 + 59x – 70 lies between the values of xi = 1.8 and
xi+1 = 2.1.
♦ Bisection Method –used when the interval containing the root has been
determined using incremental search method.

Procedure:
1. Obtain the interval, xi and xi+1, containing the root.
2. Evaluate the midpoint of the interval : xi+1/2 = (xi + xi+1)/2
3. Evaluate the product: F(xi) F(xi+1/2)
(a) If the sign of the product is negative, the root lies in the
LEFT half interval
(b) If the sign of the product is positive, the root lies in the
RIGHT half of the interval
(c) If the product is zero, the root is xi+1/2
4. (a) If the sign of the product is negative, replace xi+1 by xi+1/2
with xi the same, then repeat steps 2 and 3.
(b) ) If the sign of the product is positve, replace xi by xi+1/2
with xi+1 the same, then repeat steps 2 and 3.
5. STOP when the absolute value of the product F(xi) F(xi+1/2)<
error or F(xi+1/2)< error, where error is a very small number
close to zero, e.g. error = 1 x 10-5. The value of xi+1/2 may be
considered as the root.

Table 2. Solving for the first positive root of F(x) = x3 -14x2 + 59x –70 = 0
using Bisection method and the results from Table 1
xi xi+1 xi+1/2 F(xi) F(xi+1/2) Product
1.8 2.1 1.95 -3.328 -0.77013 2.562976
1.95 2.1 2.025 -0.77013 0.370016 -0.28496
1.95 2.025 1.9875 -0.77013 -0.18875 0.145363
1.9875 2.025 2.00625 -0.18875 0.093438 -0.01764
1.9875 2.00625 1.996875 -0.18875 -0.04695 0.008862
1.996875 2.00625 2.001563 -0.04695 0.023418 -0.0011
1.996875 2.001563 1.999219 -0.04695 -0.01172 0.00055
1.999219 2.001563 2.000391 -0.01172 0.005864 -6.9E-05
1.999219 2.000391 1.999805 -0.01172 -0.00293 3.43E-05
1.999805 2.001563 2.000684 -0.00293 0.010256 -3E-05
1.999219 2.000684 1.999952 -0.01172 -0.00073 8.53E-06

From Table 2, the Bisection method was used using the results of
Table 1 with the interval 1.8 and 2.1 and stopping at the criterion F(xi)
F(xi+1/2)< 1 x 10-5. The first positive root is 1.999952 which when rounded
becomes 2.0 which is the exact root.
♦ False Position Method – used when the interval containing the root has
been determined using incremental search method.

Procedure:
1. Let the interval containing the root be x1 and x2.
2. Compute F(x1) and F(x2).
3. Compute
x F(x ) − x F (x )
x = 1 2 2 1
3 F (x ) − F (x )
2 1

4. Evaluate the product F(x1) F(x3)


(a) If the product is positive, the root is between x3 and x2.
(b) If the product is negative, the root is between x1 and x3.
(c) If the product is zero, then x3 is the root.

5. (a) If the product is positive, replace x1 by x3, with x2 the same. Then
repeat steps 2 and 3.
(b) If the product is negative, replace x2 by x3, with x1 the same. Then
repeat steps
2 and 3.

6. STOP when F(x3)< error (e.g. 1 x 10-5)

Table 3. Solving for the first positive root of


F(x) = x3 – 14x2 + 59x – 70 = 0
using False Position method and the results from Table 1

x1 x2 F(x1) F(x2) x3 F(x3) Product


1.8 2.1 -3.328 1.42100 2.01023 0.152669 -0.50808
0
1.8 2.010234 -3.328 0.15267 2.00101 0.015179 -0.05052
3
1.8 2.001012 -3.328 0.01517 2.00010 0.001497 -0.00498
2
1.8 2.0001 -3.328 0.00150 2.00001 0.000148 -0.00049
0
1.8 2.00001 -3.328 0.00015 2.00000 1.48E-05 -4.9E-05
0
1.8 2.000001 -3.328 0.00001 2.00000 1.48E-06 -4.9E-06
5
♦ Secant Method – almost the same as the False Position method.

Procedure:
1. Let the interval containing the root be x1 and x2.

2. Compute F(x1) and F(x2).

3. Compute
x F(x ) − x F (x )
x = 1 2 2 1
3 F (x ) − F (x )
2 1

4. Replace x1 by x2 and replace x2 by x3. Then repeat steps 2 and 3.

5. STOP when F(x3)< error (e.g. 1 x 10-5)

Table 4. Solving for the first positive root of


F(x) = x3 – 14x2 + 59x – 70 = 0
using Secant method and the results from Table 1

x1 x2 F(x1) F(x2) x3 F(x3) Product


1.8 2.1 -3.328 1.421000 2.01023 0.152669 -0.50808
2.1 2.01023 1.421 0.152669 1.99943 -0.00857 -0.01218
2.010234 1.99943 0.152669 -0.008574 2.00000 4.7E-05 7.17E-06
1.999429 2.00000 -0.00857 0.000047 2.00000 1.43E-08 -1.2E-10
♦ Newton Raphson Method – maybe used even if the interval is not
known. However, it can only be used if the first derivative F’(x) canbe
evaluated.

Procedure:
1. Start with an initial guess of the root, say x1.
2. Compute F(x1) and F’(x1).
3. Compute x2:

F(x )
x =x − 1
2 1 F '( x )
1
4. Check the absolute value of the difference between (x1 – x2) < error
(a) If the difference < error, then x2 is the root.
(b) If the difference not less than the error, then replace x1 by x2, and
repeat steps 2 and 3.

5. STOP when 4(a) is satisfied.

F(x1)

x2 x1

Root
Table 5A. Solving for the root of F(x) = x3 –14x2+ 59x– 70 = 0
using Newton Raphson method (initial guess = 0.0)

x1 F(x1) F'(x1) x2 Abs(x1-x2)


0.00000 -70.00000 59.0000 1.18644 1.18644068
1.18644 -18.03690 30.0026 1.78762 0.60117811
1.78762 -3.55614 18.5334 1.97950 0.19187741
1.97950 -0.31093 15.3293 1.99978 0.02028328
1.99978 -0.00331 15.0035 2.00000 0.0002205
2.00000 0.00000 15.0000 2.00000 2.5932E-08

Table 5B. Solving for the root of F(x) = x3 –14x2+ 59x– 70 = 0


using Newton Raphson method (initial guess = 4.0)

x1 F(x1) F'(x1) x2 Abs(x1-x2)


4.00000 6.00000 -5.0000 5.20000 1.2
5.20000 -1.15200 -5.4800 4.98978 0.21021898
4.98978 0.06142 -6.0201 4.99998 0.01020199
4.99998 0.00010 -6.0000 5.00000 1.6992E-05
5.00000 0.00000 -6.0000 5.00000 4.8137E-11

Table 5C. Solving for the root of F(x) = x3 –14x2+ 59x– 70 = 0


using Newton Raphson method (initial guess = 10.0)

x1 F(x1) F'(x1) x2 Abs(x1-x2)


10.00000 120.00000 79.0000 8.48101 1.51898734
8.48101 33.41237 37.3144 7.58558 0.89542888
7.58558 8.45700 19.2269 7.14573 0.43985243
7.14573 1.60907 12.1040 7.01279 0.13293772
7.01279 0.12908 10.1796 7.00011 0.01268066
7.00011 0.00113 10.0016 7.00000 0.00011295
7.00000 0.00000 10.0000 7.00000 8.9314E-09
♦ Newton’s Second-Order Method – This method has the advantage of
converging rapidly to a solution, and an extremely close approximation
of the value of the root maybe obtained with a minimum of calculations

Procedure:
1. Start with an initial guess of the root, say x1.
2. Compute F(x1), F’(x1) and F’’(x1).
3. Compute x2:

Fx ( )
1
x =x −
2 1 ( ) ( ) 
 F '' x F x
( )
F ' x −
1  2F ' x
1 1
( ) 
 1
4. Check the absolute value of the difference between (x1 – x2) < error
(a) If the difference < error, then x2 is the root.
(b) If the difference not less than the error, then replace x1 by x2, and
repeat steps 2 and 3.

5. STOP when 4(a) is satisfied.

You might also like