0% found this document useful (0 votes)
46 views

Unit-1:: The Definition of Roots of An Equation Can Be Given in Two Different Ways

This document discusses numerical methods for solving algebraic and transcendental equations. It begins by introducing the problem of finding roots of equations and defines algebraic and transcendental functions/equations. It then describes methods for locating roots graphically or via tabulation. The bulk of the document focuses on the bisection method for numerically approximating roots of equations by repeatedly bisecting intervals and narrowing in on the root.

Uploaded by

Rawal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Unit-1:: The Definition of Roots of An Equation Can Be Given in Two Different Ways

This document discusses numerical methods for solving algebraic and transcendental equations. It begins by introducing the problem of finding roots of equations and defines algebraic and transcendental functions/equations. It then describes methods for locating roots graphically or via tabulation. The bulk of the document focuses on the bisection method for numerically approximating roots of equations by repeatedly bisecting intervals and narrowing in on the root.

Uploaded by

Rawal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Numerical Analysis

Unit-1: Solutions of Algebraic and Transcendental Equations:


(1) Fixed point iteration method
(2) Bisection method
(3) Secant Method
(4) Newton Raphson’s method
(5) Generalized Newton’s method. Comparison and error estimation
Introduction:
In scientific and engineering fields the frequently occurring problem is to find out the root of eq.
f (x) =0 for both the algebraic and transcendental equations.
If f(x) is simple quadratic, cubic or bi-quadratic expression, the algebraic formulae are available
for expressing the roots in terms of coefficients. But when the f(x) is a polynomial of higher
degree or having transcendental functions, then there is no formulae available to express the
roots in terms of coefficients and we have to use approximation methods to find out the roots.
A function f(x) is called algebraic if, to get the values of the function starting from the given
value of x, we have to perform arithmetic operations between some real numbers and rational
power of x. On the other hand, transcendental functions include all non-algebraic functions, i.e.,
an exponential function ex, ax, a logarithmic function log x, trigonometric functions sin x, cos x,
tan x, cot x, etc., inverse trigonometric functions sin−1 x, cos−1 x, etc. and others.
An equation f(x) = 0 is called algebraic or transcendental according as f(x) is algebraic or
transcendental. The equations x3 + 7x + 3 = 0, x5 − 7x2 + 3 = 0 are algebraic equations where as
ex + sinx = 0, or 5logx + 3x − 2 = 0 are the transcendental equations.
The definition of roots of an equation can be given in two different ways:
(i)Algebraically, a number c is called a root of the equation f(x) = 0 iff f(c) = 0
(ii) Geometrically, the real roots of the equation f(x) = 0 are the values of x where the graph of y
= f(x) meets the x-axis.
Development of numerical methods to solve algebraic or transcendental equations is very much
essential because the analytic method fails to solve the polynomial equations of degree greater
than four.

1
Most of the numerical methods, used to solve an equation are based on iterative techniques.
Different numerical methods are available to solve the equation f(x) = 0. But, each method has
some advantages and disadvantages over another method.
Generally, the following aspects are considered to compare the methods:
(i) convergence or divergence,
(ii) rate of convergence,
(iii) applicability of the method,
(iv) Amount of pre-calculation needed before application of the method, etc.
The process of finding the approximate values of the roots of an equation can be divided into
two stages:
(i) location of the roots,
(ii) computation of the values of the roots with the specified degree of accuracy
If f(x) a polynomial of the form anxn+an-1xn-1+an-2xn-2+……..+a0, the following results from the
theory of equation would be useful in locating its roots.
1. Every polynomial equation of the nth degree has n and only n roots.
2. If n is odd, the polynomial equation has atleast one real root whose sign is opposite
to that of the last term.
e.g. x3+7x2+10x=0, x=0,-2,-5
3. If n is even and the constant term is negative, then the equation has atleast one positive
root and atleast one negative root.
e.g. x2+3x-10=0, x=-5, 2
4. If the polynomial equation has (a) real coefficient then imaginary roots occurin pairs and
(b) rational coefficient then irrational roots occur in pairs.
5. Descartes’ Rule of sign
a. A polynomial equation f(x) =0 cannot have more number of positive real roots than the
number of change of sign in the coefficient of f(x).
8x3 −20x2 −2x+5 = 0,
x -2 -1 0 1 2 3

Sign of f(x) - - + - - +
No. of change of sign=3 and no. of +ve roots=2.
b. In (a) above, f(x) =0 cannot have more number of negative roots than the number of

2
change of change of sign in the co-efficient of f(-x).
Location of Roots
An interval [a, b] is said to be the location of a real root c if f(c) = 0 for a < c < b. Mainly, two
methods are used to locate the real roots of an equation, one is graphical method and other is an
analytic method known as method of tabulation.
Graphical method
First method:
In this method, the graph of y = f(x) is drawn in a rectangular co-ordinates system. It is obvious
that the abscissas of the points where the graph intersects the x-axis are the roots of the equation
f(x) = 0. But, practically, it is most difficult to determine the exact value of x where the graph
intersects the x-axis. For example, if x = 1.27831 is a root of an equation f(x) = 0 then we cannot
determine 1.2783 (four digits after decimal point) from the graph. We can measure the value of x
up to one or two decimal places. But, the approximate value of the root can be determined using
this method.
Second method:
Sometimes, the approximate roots of f(x) = 0 can be determined by dividing all the terms of the
equation into groups, one of them is written on the left-hand side of the equation and the other on
the right hand side, i.e., the equation is represented as g(x) = h(x). Then the graph of two
functions y = g(x) and y = h(x), are drawn. The abscissas of the points of intersection of these
graphs are the roots of the equation. The graphical method to locate the roots is not very useful,
because, the drawing of the function y = f(x) is itself a complicated problem. But, it makes
possible to roughly determine the intervals to locate the roots. Then an analytic method is used to
locate the root.
Example 1: Use graphical method to locate the roots of the equation x3−4x−2 = 0.
Solution: First method:
The graph of the function y = x3 − 4x − 2 is drawn in Figure 1(a). The curve cuts the x-axis at
three points and, consequently, the equation has three real roots. From figure, it is observed that
the roots belong to the intervals [−2,−1], [−1, 0] and [2, 3].

3
Second method:
The given equation can be written as x3 = 4x+2. The graph of the functions y = x3 and y = 4x+2
are drawn (Figure 1(b)). The abscissas of the points of intersection of the graphs of these
functions are roots of the equations. The intervals of the roots are [−2,−1], [−1, 0] and [2, 3].

Method of tabulation
This method depends on the continuity of the function f(x). Before applying the tabulation
method, following result should be noted.
(i) If f(x) is continuous in the interval (a, b) and if f(a) and f(b) have the opposite signs,
then at least one real root of the equation f(x) = 0 lies within the interval (a, b).
(ii) If f(a) and f(b) have same signs then f(x) = 0 has no real roots or has an even number
of real roots.
(iii) If the curve y = f(x) touches the x-axis at some point, say, x = c then c is a root of f(x)
= 0 though f(a) and f(b), a < c < b may have same sign.
For example, f(x) = (x − 2)2 touches the x-axis at x = 2, also f(1.5) > 0 and f(2.5) > 0, but, x = 2
is the root of the equation f(x) = (x − 2)2 = 0.
A trial method for tabulation is as follows:
Form a table of signs of f(x) setting x = 0,±1,±2, . . .. If the function f(x) changes it signs for two
consecutive values of x then at least one root lies between these two values, i.e., if f(a) and f(b)
have opposite signs then a root lies between a and b.
Example 2: Find the location of roots of the equation 8x3 −20x2 −2x+5 = 0 by tabulation
method.
Solution: We form a table of sign of f(x), taken x = 0,−1, 1,−2, 2, . . . as follows:

4
x 0 -1 1 -2 2 3

Sign of f(x) + - - - - +
The equation has three real roots as its degree is 3. The locations of the roots of the given
equation are (−1, 0), (0, 1) and (2, 3).
A systematic process for tabulation: The following sequence of steps to be performed to locate
the roots of an equation f(x) = 0 by tabulation method:
1. Find the first derivative f’(x),
2. Prepare a table of signs of the function f(x) by setting x equal to
(a) the roots of f’(x) = 0 or the values close to them,
(b) The boundary values (preceding from the domain of permissible values of the variable),
3. Determine the intervals at the endpoints of which the function assumes values of opposite
signs. These intervals contain one and only one root each in its interior.
Bisection Method
Let ξ be a root of the equation f(x) = 0 lies in the interval [a, b], i.e., f(a).f (b) < 0, and (b−a) is
not sufficiently small. The interval [a, b] is divided into two equal intervals [a, c] and [c, b], each
b−a a+b
of length and c = (Figure 2). If f(c) = 0, then c is an exact root.
2 2

Now, if f(c) ≠ 0, then the root lies either in the interval [a, c] or in the interval [c, b].
 If f(a).f (c) < 0 then the interval [a, c] is taken as new interval, otherwise [c, b] is taken as
the next interval.
 Let the new interval be [a1, b1] and use the same process to select the next new interval.
 In the next step, let the new interval be [a2, b2].
 The process of bisection is continued until either the midpoint of the interval is a root, or
the length (bn − an) of the interval [an, bn] (at nth step) is sufficiently small.
 The number an and bn are the approximate roots of the equation f(x) = 0. Finally,
a n +b n
xn = is taken as the approximate value of the root ξ.
2

5
b−a
It may be noted that when the reduced interval be [a1, b1] then the length of the interval is ,
2
b−a
when the interval be [a2, b2] then the length is . At the nth step the length of the interval
22
b−a a n +b n
being . In the final step, when ξ = is chosen as a root then the length of the interval
2n 2
b−a b−a
being 2n +1 and hence the error does not exceed 2n +1 . Thus, if ε be the error at the nth step then the

lower bound of n is obtained from the following relation


|b − a|
≤ ε. (2)
2n

The lower bound of n is obtained by rewriting this in equation as


log b − a − log ε
n ≥ . (3)
log 2

Hence the minimum number of iterations required to achieve the accuracy ε is


|b −a |
Log e
ε
. (4)
log 2

For example, if the length of the interval is |b−a| = 1 and ε = 0.0001, then n is given
by n ≥ 14.
The minimum number of iterations required to achieved the accuracy ε for |b−a| = 1 are shown in
Table 1.
Theorem: Assume that f(x) is a continuous function on [a, b] and that there exists a number ξ ∈
[a, b] such that f(ξ) = 0. If f(a) and f(b) have opposite signs, and {xn} represents the sequence of
midpoints generated by the bisection method, then
b –a
|ξ − xn | ≤ for n = 0, 1, 2, . . (5)
2n +1

and therefore the sequence {xn} converges to the root ξ i.e., lim n→∞ xn = ξ.

6
Proof: The root ξ and the midpoint xn both lie in the interval [an, bn], the distance between xn and
ξ cannot be greater than half the width of the interval [an, bn]. Thus
|b n − a n |
|ξ − xn | ≤ for all n. (6)
2

From the bisection method, it is observed that the successive interval widths form the following
pattern.
|b 0 − a 0 |
|b1 − a1 | = , where b0 = b and a0 = a,
21
|b 1 − a 1 | |b 0 − a 0 |
b2 − a 2 = =
2 22
|b 2 − a 2 | |b 0 − a 0 |
b3 − a 3 = =
2 23
|b 0 − a 0 |
In this way, bn − an = 2n

Hence
|b 0 − a 0 |
|ξ − xn | ≤ [using (6)].
2n +1

Now, the limit gives |ξ − xn| → 0 as n→∞


i.e. lim n→∞ xn = ξ.
Note 1: If the function f(x) is continuous on [a, b] then the bisection method is applicable. This is
justified in Figure 3. For the function f(x) of the graph of Figure 3, f(a) · f(b) < 0, but the
equation f(x) = 0 has no root between a and b as the function is not continuous at x = c.

Note 2: This method is very slow, but it is very simple and will converge surely to the exact root.
So the method is applicable for any function only if the function is continuous within the interval
[a, b], where the root lies. In this method derivative of the function f(x) and pre-manipulation of
function are not required.

7
Note 3: This method is also called bracketing method since the method successively reduces the
two endpoints (brackets) of the interval containing the real root.
Example: Find a root of the equation x2 + x − 7 = 0 by bisection method, correct up to two
decimal places.
Solution. Let f(x) = x2 + x − 7.
f(2) = −1 < 0 and f(3) = 5 > 0. So, a root lies between 2 and 3.
n Left end point Right end point midpoint F(xn+1)

an bn xn+1
0 2 3 2.5 1.750
1 2 2.5 2.250 0.313
2 2 2.250 2.125 -0.359
3 2.125 2.250 2.188 -0.027
4 2.188 2.250 2.219 0.143
5 2.188 2.219 2.204 0.062
6 2.188 2.204 2.196 0.018
7 2.188 2.196 2.192 -0.003
8 2.192 2.196 2.194 0.008
9 2.192 2.194 2.193 0.002
10 2.192 2.193 2.193 0.002

Algorithm 1 (Bisection method): This algorithm finds a real root of the equation f(x) = 0 which
lies in [a, b] by bisection method.
Algorithm Bisection
Input function f(x);
// Assume that f(x) is continuous within [a, b] and a root lies on [a, b].//
Read ε; //tolerance for width of the interval//
Read a, b; //input of the interval//
Compute fa = f(a); fb = f(b); //compute the function values//
if sign(fa) = sign(fb) then
//sign(fa) gives the sign of the value of fa.//
Print ‘f(a) · f(b) > 0, so there is no guarantee for a root within [a, b]’;

8
Stop;
endif;
do
Compute c = (a + b)/2;
Compute fc = f(c);
if fc = 0 or |fc| < ε then
a = c and b = c;
else if sign(fb) = sign(fc) then
b = c; fb = fc;
else
a = c; fa = fc;
endif;
while (|b − a| > ε);
Print ‘the desired root is’ c;
end Bisection

You might also like