Page 1
Numerical Methods
We encounter problems in Engineering mathematics for
which analytical methods are not available to fi nd solutions.
Further, it may be suffi cient in engineering applications to
fi nd approximate solutions. The numerical methods off er us
approximate solutions.
1. Methods for fi nding roots of algebraic or transdental
equations
2. Solutions to system of linear equation
3. Numerical Integration
4. Numerical solutions of ordinary diff erential equation.
Accuracy and Precision
Solutions of problems computed by numerical methods are
approximate. Errors associated with calculations can be
characterized with reference to accuracy and precision.
Accuracy: Accuracy refers to how closely a computed
value agrees with the true value.
Precision: Precision refers to how closely computed values
agree with each other after repeated iterations. The follow-
ing fi gures illustrate the diff erence between accuracy and
precision where the horizontal line denote the true value
(or) actual value of the solution where as the dots denote the
values computed by a numerical method.
Time
value
True
value
Time
value
True
value
Accurate but not precise Precise but not accurate
Numerical Methods
Chapter 06.indd 119 5/31/2017 10:59:22 AM
Page 2
Numerical Methods
We encounter problems in Engineering mathematics for
which analytical methods are not available to fi nd solutions.
Further, it may be suffi cient in engineering applications to
fi nd approximate solutions. The numerical methods off er us
approximate solutions.
1. Methods for fi nding roots of algebraic or transdental
equations
2. Solutions to system of linear equation
3. Numerical Integration
4. Numerical solutions of ordinary diff erential equation.
Accuracy and Precision
Solutions of problems computed by numerical methods are
approximate. Errors associated with calculations can be
characterized with reference to accuracy and precision.
Accuracy: Accuracy refers to how closely a computed
value agrees with the true value.
Precision: Precision refers to how closely computed values
agree with each other after repeated iterations. The follow-
ing fi gures illustrate the diff erence between accuracy and
precision where the horizontal line denote the true value
(or) actual value of the solution where as the dots denote the
values computed by a numerical method.
Time
value
True
value
Time
value
True
value
Accurate but not precise Precise but not accurate
Numerical Methods
Chapter 06.indd 119 5/31/2017 10:59:22 AM
Time
value
True value
Neither accurate nor precise
Errors in the solutions obtained by numerical methods:
As the numerical methods give approximate solutions, these
solutions contain errors.
Let x denote the actual value (or) true value and let x denote
an approximate value of the solution obtained by a numeri-
cal method.
Error = ? = x - x
Absolute error =? =- || || xx
Relative error
=? =
?
=
-
r
x
xx
x
||
|| ||
Percentage error =? =? ×=
-
×
pr
xx
x
100 100
||
.
Types of Errors
Inherent Error
The error which is already present in the statement of the
problem before its solution, is called the inherent error.
This type of errors arise due to any one or more of the
following reasons.
• Wrong formulation of the problem
• Unsuitable solution procedure
• Invalid assumptions in the formulation
• Inaccurate data
Round off Error
Real numbers such as
5
6
2 ,, , p · etc., contain an infinite num-
ber of digits when expressed in decimal form. In general, in
scientific and engineering computations, a real number x is
represented as x = ± 0. d
1
d
2
d
3
… d
n
… × 10
k
, known as float-
ing point form of x.
(where d
1
, d
2
, … d
n
… are all digits from 0 to 9 and k is a
non zero integer). Each digit d
1
, d
2
… other than the leading
zeros (the zeros that occur before the first non-zero digit) is
called a significant digit. As its not possible to retain infinite
number of digits in a number, we round off the number to,
say n significant digits.
To round off a number to n significant digits, proceed as
follows:
Possibility Procedure to Follow
The (n + 1)th digit is less than 5
(OR)
The (n + 1)th digit is equal to 5 and
the nth digit is even
Discard all the digits to the
right of nth digit and leave
the nth digit as it is
The (n + 1)th digit is greater than 5
(OR)
The (n + 1)th digit is equal to 5 and
the nth digit is odd.
Discard all the digits to
the right of nth digit and
increase the nth digit by 1.
For example,
Consider the number 25.31465.
When written in floating point form
25.31465 = 0.2531465 × 10
2
˜ 0.253146 × 10
2
(Rounded off to six significant digits)
˜ 0.25315 × 10
2
(Rounded off to five significant digits)
˜ 0.2532 × 10
2
(Rounded off to four significant digits)
˜ 0.253 × 10
2
(Rounded off to three significant digits)
Definition The difference between the true value and its
rounded off value is called the rounded off error.
• If x is the true value and x* is its rounded off value such
that |x - x*| = 0.5 × 10
-m
(OR) |x - x*| = 5 × 10
-(m+1)
then
x* is said to denote x correct to m significant digits.
Truncation Error The error in a method, which occurred
because some series (finite or infinite) is truncated to a fewer
(and finite) number of terms is called the truncation error.
For instance,
Let fx fx xx fx
xx
fx () () () ()
()
!
() =+ - ' +
-
'' ++
00 0
0
2
0
2
()
()
()()
()
()
()
xx
m
fm x
xx
m
fx
mm
m
-
-
-+
-
+8
-
0
1
0
0
0
1
1
(1)
denote the Taylor’ s series expansion of f(x) about x = x
0
.
If we retain the first m terms, we get
f(x) ˜
fx xx fx
xx
fx () () ()
()
!
()
00 0
0
2
0
2
+- ' +
-
'' ++
()
()!
()
()
xx
m
fx
m
m
-
-
-
- 0
1
1
0
1
(2)
where the series of infinite terms
()
!
xx
m
m
-
0
fx
xx
m
fx
m
m
m () ()
()
()
()!
()
0
0
1
1
0
1
+
-
+
+8
-
+
(3)
is neglected.
The first term in this neglected part of the series is called
the principal part of the truncation error or simply the trun-
cation error.
\ T r uncation er ror ==
-
<< TE
xx
m
fx x
m
m
()
!
();
() 0
0
??
As x is an unknown function of x, we have
||
!
max[|( )| ] TE
m
xx M
m
m
=-
1
0
where M
m
= [a, b] max|f
(m)
(x)|
Chapter 06.indd 120 5/31/2017 10:59:24 AM
Page 3
Numerical Methods
We encounter problems in Engineering mathematics for
which analytical methods are not available to fi nd solutions.
Further, it may be suffi cient in engineering applications to
fi nd approximate solutions. The numerical methods off er us
approximate solutions.
1. Methods for fi nding roots of algebraic or transdental
equations
2. Solutions to system of linear equation
3. Numerical Integration
4. Numerical solutions of ordinary diff erential equation.
Accuracy and Precision
Solutions of problems computed by numerical methods are
approximate. Errors associated with calculations can be
characterized with reference to accuracy and precision.
Accuracy: Accuracy refers to how closely a computed
value agrees with the true value.
Precision: Precision refers to how closely computed values
agree with each other after repeated iterations. The follow-
ing fi gures illustrate the diff erence between accuracy and
precision where the horizontal line denote the true value
(or) actual value of the solution where as the dots denote the
values computed by a numerical method.
Time
value
True
value
Time
value
True
value
Accurate but not precise Precise but not accurate
Numerical Methods
Chapter 06.indd 119 5/31/2017 10:59:22 AM
Time
value
True value
Neither accurate nor precise
Errors in the solutions obtained by numerical methods:
As the numerical methods give approximate solutions, these
solutions contain errors.
Let x denote the actual value (or) true value and let x denote
an approximate value of the solution obtained by a numeri-
cal method.
Error = ? = x - x
Absolute error =? =- || || xx
Relative error
=? =
?
=
-
r
x
xx
x
||
|| ||
Percentage error =? =? ×=
-
×
pr
xx
x
100 100
||
.
Types of Errors
Inherent Error
The error which is already present in the statement of the
problem before its solution, is called the inherent error.
This type of errors arise due to any one or more of the
following reasons.
• Wrong formulation of the problem
• Unsuitable solution procedure
• Invalid assumptions in the formulation
• Inaccurate data
Round off Error
Real numbers such as
5
6
2 ,, , p · etc., contain an infinite num-
ber of digits when expressed in decimal form. In general, in
scientific and engineering computations, a real number x is
represented as x = ± 0. d
1
d
2
d
3
… d
n
… × 10
k
, known as float-
ing point form of x.
(where d
1
, d
2
, … d
n
… are all digits from 0 to 9 and k is a
non zero integer). Each digit d
1
, d
2
… other than the leading
zeros (the zeros that occur before the first non-zero digit) is
called a significant digit. As its not possible to retain infinite
number of digits in a number, we round off the number to,
say n significant digits.
To round off a number to n significant digits, proceed as
follows:
Possibility Procedure to Follow
The (n + 1)th digit is less than 5
(OR)
The (n + 1)th digit is equal to 5 and
the nth digit is even
Discard all the digits to the
right of nth digit and leave
the nth digit as it is
The (n + 1)th digit is greater than 5
(OR)
The (n + 1)th digit is equal to 5 and
the nth digit is odd.
Discard all the digits to
the right of nth digit and
increase the nth digit by 1.
For example,
Consider the number 25.31465.
When written in floating point form
25.31465 = 0.2531465 × 10
2
˜ 0.253146 × 10
2
(Rounded off to six significant digits)
˜ 0.25315 × 10
2
(Rounded off to five significant digits)
˜ 0.2532 × 10
2
(Rounded off to four significant digits)
˜ 0.253 × 10
2
(Rounded off to three significant digits)
Definition The difference between the true value and its
rounded off value is called the rounded off error.
• If x is the true value and x* is its rounded off value such
that |x - x*| = 0.5 × 10
-m
(OR) |x - x*| = 5 × 10
-(m+1)
then
x* is said to denote x correct to m significant digits.
Truncation Error The error in a method, which occurred
because some series (finite or infinite) is truncated to a fewer
(and finite) number of terms is called the truncation error.
For instance,
Let fx fx xx fx
xx
fx () () () ()
()
!
() =+ - ' +
-
'' ++
00 0
0
2
0
2
()
()
()()
()
()
()
xx
m
fm x
xx
m
fx
mm
m
-
-
-+
-
+8
-
0
1
0
0
0
1
1
(1)
denote the Taylor’ s series expansion of f(x) about x = x
0
.
If we retain the first m terms, we get
f(x) ˜
fx xx fx
xx
fx () () ()
()
!
()
00 0
0
2
0
2
+- ' +
-
'' ++
()
()!
()
()
xx
m
fx
m
m
-
-
-
- 0
1
1
0
1
(2)
where the series of infinite terms
()
!
xx
m
m
-
0
fx
xx
m
fx
m
m
m () ()
()
()
()!
()
0
0
1
1
0
1
+
-
+
+8
-
+
(3)
is neglected.
The first term in this neglected part of the series is called
the principal part of the truncation error or simply the trun-
cation error.
\ T r uncation er ror ==
-
<< TE
xx
m
fx x
m
m
()
!
();
() 0
0
??
As x is an unknown function of x, we have
||
!
max[|( )| ] TE
m
xx M
m
m
=-
1
0
where M
m
= [a, b] max|f
(m)
(x)|
Chapter 06.indd 120 5/31/2017 10:59:24 AM
SOLVED EXAMPLES
Example 1
If the number
p
4
0 785398163 = . is approximated by
11
14
,
then
(i) Find the number of digits upto which, this approxima-
tion is accurate.
(ii) Find the absolute and the percentage errors.
Solution
Given
p
4
0 785398163 = .
Let x ==
p
4
0 785398163 . (Exact value) and x =
11
14
= 0.785714285 Approximate value of
p
4
?
?
?
?
?
?
(i) || xx -= -
p
4
11
14
= | 0.785398163 - 0.785714285 |
= 3.16122 × 10
-4
= 5 × 10
-4
\ The approximation
11
14
to
p
4
· is accurate upto three
significant digits
(ii) Absolute error =- || xx
=- =×
-
11
14 4
3 16122 10
4
p
.
Percentage error =
-
×=
||
.%.
xx
x
100 004
Example 2
Using the T aylor’ s series expansion about x = 0, find a second
degree polynomial approximation to fx x () . =+ 13 Also
find the maximum error for this approximation when
x ? [0, 1].
Solution
We know that the Taylor’s series expansion of f(x) about x
= 0 is
fx fxf
x
f
x
f
() () ()
!
()
!
()
=+ ' + ''
+ ''' ++ 8
00
2
0
3
0
2
3
(1)
\ Considering the terms upto second degree, we have
fx fx f
x
f () () ()
!
() ˜+ ' + '' 00
2
0
2
(2)
Here fx xf () () =+ ?= 13 01
' =
+
? ' = fx
x
f () ()
3
21 3
0
3
2
'' =
-
-
? '' =
-
fx
x
f ()
()
()
9
41 3
0
9
4
3
2
and ''' =×
+
fx
x
()
()
27
8
1
13
5
2
\ Substituting these in (2), we get
fx x
x
()
!
=+ ˜+ ×- 13 1
3
2
9
42
2
=+ ×- 1
3
2
9
8
2
x
Truncation error = '''
x
f
3
3
0
!
()
=
==
?
?
?
?
?
?
1
3 01
3
!
Max x
x
Max
01
52
27
81 3 == +
?
?
?
?
?
?
x x ()
/
=
?
?
?
?
?
?
1
3
1
27
8 !
()
= 0.5625.
Methods for Finding the Real Roots
(Zeros) of f (x) = 0
The equation of the form f (x) = 0 is called an Algebraic
or Transcendental according as f (x) is purely a polynomial
in x or contains some other functions such as exponential,
logarithmic and trigonometric functions etc.
Examples:
1. x
9
+ 8x
5
- 4x
3
- 11x + 3 = 0 ? Algebraic equation
2. 10x
4
- log(x
2
- 3) + e
-x
sin x + tan
2
x = 0 ? Transcen-
dental equation
In this chapter, we obtain the solution of an equation f (x)
= 0, i.e., we mean to find the zeros of f (x).
We shall now discuss few methods to find the real roots
of both algebraic (with numerical coefficients) and tran-
scendental equations.
W e first find an approximate value of the root of the given
equation and then successively improve it to some desired
degree of accuracy.
We start with an initial approximate value, say x
0
, and
then find the better approximations successively x
1
, x
2
, x
3
…,
x
n
by repeating the same method.
If the successive approximations at each step of a method
approach the root more and more closely, we say that the
method converges.
Chapter 06.indd 121 5/31/2017 10:59:26 AM
Page 4
Numerical Methods
We encounter problems in Engineering mathematics for
which analytical methods are not available to fi nd solutions.
Further, it may be suffi cient in engineering applications to
fi nd approximate solutions. The numerical methods off er us
approximate solutions.
1. Methods for fi nding roots of algebraic or transdental
equations
2. Solutions to system of linear equation
3. Numerical Integration
4. Numerical solutions of ordinary diff erential equation.
Accuracy and Precision
Solutions of problems computed by numerical methods are
approximate. Errors associated with calculations can be
characterized with reference to accuracy and precision.
Accuracy: Accuracy refers to how closely a computed
value agrees with the true value.
Precision: Precision refers to how closely computed values
agree with each other after repeated iterations. The follow-
ing fi gures illustrate the diff erence between accuracy and
precision where the horizontal line denote the true value
(or) actual value of the solution where as the dots denote the
values computed by a numerical method.
Time
value
True
value
Time
value
True
value
Accurate but not precise Precise but not accurate
Numerical Methods
Chapter 06.indd 119 5/31/2017 10:59:22 AM
Time
value
True value
Neither accurate nor precise
Errors in the solutions obtained by numerical methods:
As the numerical methods give approximate solutions, these
solutions contain errors.
Let x denote the actual value (or) true value and let x denote
an approximate value of the solution obtained by a numeri-
cal method.
Error = ? = x - x
Absolute error =? =- || || xx
Relative error
=? =
?
=
-
r
x
xx
x
||
|| ||
Percentage error =? =? ×=
-
×
pr
xx
x
100 100
||
.
Types of Errors
Inherent Error
The error which is already present in the statement of the
problem before its solution, is called the inherent error.
This type of errors arise due to any one or more of the
following reasons.
• Wrong formulation of the problem
• Unsuitable solution procedure
• Invalid assumptions in the formulation
• Inaccurate data
Round off Error
Real numbers such as
5
6
2 ,, , p · etc., contain an infinite num-
ber of digits when expressed in decimal form. In general, in
scientific and engineering computations, a real number x is
represented as x = ± 0. d
1
d
2
d
3
… d
n
… × 10
k
, known as float-
ing point form of x.
(where d
1
, d
2
, … d
n
… are all digits from 0 to 9 and k is a
non zero integer). Each digit d
1
, d
2
… other than the leading
zeros (the zeros that occur before the first non-zero digit) is
called a significant digit. As its not possible to retain infinite
number of digits in a number, we round off the number to,
say n significant digits.
To round off a number to n significant digits, proceed as
follows:
Possibility Procedure to Follow
The (n + 1)th digit is less than 5
(OR)
The (n + 1)th digit is equal to 5 and
the nth digit is even
Discard all the digits to the
right of nth digit and leave
the nth digit as it is
The (n + 1)th digit is greater than 5
(OR)
The (n + 1)th digit is equal to 5 and
the nth digit is odd.
Discard all the digits to
the right of nth digit and
increase the nth digit by 1.
For example,
Consider the number 25.31465.
When written in floating point form
25.31465 = 0.2531465 × 10
2
˜ 0.253146 × 10
2
(Rounded off to six significant digits)
˜ 0.25315 × 10
2
(Rounded off to five significant digits)
˜ 0.2532 × 10
2
(Rounded off to four significant digits)
˜ 0.253 × 10
2
(Rounded off to three significant digits)
Definition The difference between the true value and its
rounded off value is called the rounded off error.
• If x is the true value and x* is its rounded off value such
that |x - x*| = 0.5 × 10
-m
(OR) |x - x*| = 5 × 10
-(m+1)
then
x* is said to denote x correct to m significant digits.
Truncation Error The error in a method, which occurred
because some series (finite or infinite) is truncated to a fewer
(and finite) number of terms is called the truncation error.
For instance,
Let fx fx xx fx
xx
fx () () () ()
()
!
() =+ - ' +
-
'' ++
00 0
0
2
0
2
()
()
()()
()
()
()
xx
m
fm x
xx
m
fx
mm
m
-
-
-+
-
+8
-
0
1
0
0
0
1
1
(1)
denote the Taylor’ s series expansion of f(x) about x = x
0
.
If we retain the first m terms, we get
f(x) ˜
fx xx fx
xx
fx () () ()
()
!
()
00 0
0
2
0
2
+- ' +
-
'' ++
()
()!
()
()
xx
m
fx
m
m
-
-
-
- 0
1
1
0
1
(2)
where the series of infinite terms
()
!
xx
m
m
-
0
fx
xx
m
fx
m
m
m () ()
()
()
()!
()
0
0
1
1
0
1
+
-
+
+8
-
+
(3)
is neglected.
The first term in this neglected part of the series is called
the principal part of the truncation error or simply the trun-
cation error.
\ T r uncation er ror ==
-
<< TE
xx
m
fx x
m
m
()
!
();
() 0
0
??
As x is an unknown function of x, we have
||
!
max[|( )| ] TE
m
xx M
m
m
=-
1
0
where M
m
= [a, b] max|f
(m)
(x)|
Chapter 06.indd 120 5/31/2017 10:59:24 AM
SOLVED EXAMPLES
Example 1
If the number
p
4
0 785398163 = . is approximated by
11
14
,
then
(i) Find the number of digits upto which, this approxima-
tion is accurate.
(ii) Find the absolute and the percentage errors.
Solution
Given
p
4
0 785398163 = .
Let x ==
p
4
0 785398163 . (Exact value) and x =
11
14
= 0.785714285 Approximate value of
p
4
?
?
?
?
?
?
(i) || xx -= -
p
4
11
14
= | 0.785398163 - 0.785714285 |
= 3.16122 × 10
-4
= 5 × 10
-4
\ The approximation
11
14
to
p
4
· is accurate upto three
significant digits
(ii) Absolute error =- || xx
=- =×
-
11
14 4
3 16122 10
4
p
.
Percentage error =
-
×=
||
.%.
xx
x
100 004
Example 2
Using the T aylor’ s series expansion about x = 0, find a second
degree polynomial approximation to fx x () . =+ 13 Also
find the maximum error for this approximation when
x ? [0, 1].
Solution
We know that the Taylor’s series expansion of f(x) about x
= 0 is
fx fxf
x
f
x
f
() () ()
!
()
!
()
=+ ' + ''
+ ''' ++ 8
00
2
0
3
0
2
3
(1)
\ Considering the terms upto second degree, we have
fx fx f
x
f () () ()
!
() ˜+ ' + '' 00
2
0
2
(2)
Here fx xf () () =+ ?= 13 01
' =
+
? ' = fx
x
f () ()
3
21 3
0
3
2
'' =
-
-
? '' =
-
fx
x
f ()
()
()
9
41 3
0
9
4
3
2
and ''' =×
+
fx
x
()
()
27
8
1
13
5
2
\ Substituting these in (2), we get
fx x
x
()
!
=+ ˜+ ×- 13 1
3
2
9
42
2
=+ ×- 1
3
2
9
8
2
x
Truncation error = '''
x
f
3
3
0
!
()
=
==
?
?
?
?
?
?
1
3 01
3
!
Max x
x
Max
01
52
27
81 3 == +
?
?
?
?
?
?
x x ()
/
=
?
?
?
?
?
?
1
3
1
27
8 !
()
= 0.5625.
Methods for Finding the Real Roots
(Zeros) of f (x) = 0
The equation of the form f (x) = 0 is called an Algebraic
or Transcendental according as f (x) is purely a polynomial
in x or contains some other functions such as exponential,
logarithmic and trigonometric functions etc.
Examples:
1. x
9
+ 8x
5
- 4x
3
- 11x + 3 = 0 ? Algebraic equation
2. 10x
4
- log(x
2
- 3) + e
-x
sin x + tan
2
x = 0 ? Transcen-
dental equation
In this chapter, we obtain the solution of an equation f (x)
= 0, i.e., we mean to find the zeros of f (x).
We shall now discuss few methods to find the real roots
of both algebraic (with numerical coefficients) and tran-
scendental equations.
W e first find an approximate value of the root of the given
equation and then successively improve it to some desired
degree of accuracy.
We start with an initial approximate value, say x
0
, and
then find the better approximations successively x
1
, x
2
, x
3
…,
x
n
by repeating the same method.
If the successive approximations at each step of a method
approach the root more and more closely, we say that the
method converges.
Chapter 06.indd 121 5/31/2017 10:59:26 AM
The Intermediate Value Theorem
If a function f (x) is continuous between a and b and f (a) and
f (b) are of opposite signs, then there exists at least one root
say a between a and b of the equation
f (x) = 0, i.e., f (a ) = 0
Root ‘a ’ of f (x) = 0, will be unique in (a, b) if f ' (x) has the
same sign in (a, b) (i.e., f '(x) > 0 or f '(x) < 0 in a < x < b)
NOTE
Relations between Roots and Coefficients
An nth order equation has n roots. Corresponding to every
root, there is a factor. If a is a root of f (x) = 0, then x - a is
a factor of f (x). Sometimes (x – a )
2
may also be a factor. In
such a case, a is said to be a double root. Similarly equa-
tions can have triple roots, quadruple roots and roots of
multiplicity m. If m is the greatest value of k, for which
(x – a )
k
is a factor of f (a), then a is said to be a root of
multiplicity m. If all the roots are counted by taking their
multiplicity into account, the number of roots is equal to n,
the degree of the equation.
If a 1
, a 2
,…, a n
(not necessarily distinct) are the roots of
f (x) = 0, then
f (x) = a
n
(x – a 1
) (x – a 2
) … (x – a n
)
= a
n
[x
n
– S
1
x
n–1
+ S
2
x
n–2
+
…
+ (–1)
n
S
n
]
Where
S
1
= The sum of the roots
S
2
= The sum of the products of the roots taken 2 at a time
S
3
= The sum of the product of the roots taken 3 at a time
and so on.
S
n
= The ‘sum’ of the product of the roots taken n (or all)
at a time. Thus, S
n
is a single term.
S
n
= a 1
a 2
… a n
Let us write down the polynomial f (x) in two forms:
The standard form
f (x) = a
n
x
n
+ a
n–1
x
n–1
+ a
n–2
x
n–2
+
…
+a
1
x + a
0
In terms of the roots of the corresponding equation.
f (x) = a
n
[x
n
– S
1
x
n–1
+ S
2
x
n–2
+
…
+ (–1)
x–1
S
n–1
x + (–1)
nS n
]
These polynomials are identically equal, i.e., equal for
all values of x. Therefore the corresponding coefficients are
equal. The sum of the roots S
a
a
n
n
1
1
=-
–
.
The sum of the products of the roots, taken two at a time,
S
a
a
n
n
2
2
=
–
.
The sum of the products of the roots, taken three at a
time, S
a
a
n
n
3
3
=-
-
and so on.
The ‘sum’ of the ‘products’ of the roots taken m(m = n)
at a time S
a
a
mm
m nm
n
== -
-
Saa aa
12 3
1 … () .
\ aa a a = = …
0
12 3
(–1)
n
nn
n
a
S
a
For example, consider the polynomial equation
(x – 1)(x – 2)(x – 3) = x
3
– 6x
2
+ 11x – 6 = 0
(We can see immediately that the roots are 1, 2, 3)
The sum of roots =+ +=-
-
()
()
12 3
6
1
The sum of the products of the roots, taken two at a time
() () () S
2
12 13 23 11
11
1
=+ += =
We can drop the word ‘sum’ and ‘products’ for the last
relation, because there is only one term (only one product).
The product == =-
-
12 36
6
1
()()
()
.
Roots of Equations and Descartes’ Rule
If the coefficients are all real and the complex number z
1
, is
a root of f (x) = 0, then the conjugate of z
1
, viz, z
1
is also a
root of f (x) = 0. Thus, for equations with real, coefficients,
complex roots occur in pairs.
A consequence of this is that any equation of an odd
degree must have at least one real root.
The number of roots is related to very simple properties
of the equation as illustrated below.
Let a 1
be a positive root, i.e., x – a 1
, is a factor.
Let a 2
be another positive root, i.e., x
2
– (a 1
+ a 2
)x + a 1
a 2
is a factor.
Let a 3
be another positive root i.e., x
3
– (a 1
+ a 2
+ a 3
)x
2
+ (a 1
a 2
+ a 2
a 3
+ a 3
a 1
)x – a 1
a 2
a 3
is a factor.
We note that every positive root introduces a sign change
in the polynomial. For 1 root, there is 1 sign change (the
coefficient of x is positive and – a 1
is negative)
The second root results in a second sign change [x
2
– (a 1
+ a 2
)x + a 1
a 2
has 2 sign changes] and so on.
But every sign change need not correspond to a real posi-
tive root. (For example, x
2
- 2x + 4 has two sign changes but
the corresponding equation x
2
– 2x + 4 = 0 has no real roots.
The number of positive roots is at the most equal to the
number of sign changes. It could also be less than that by 2,
4…, i.e., if there are k sign changes in f (x), the number of
positive roots could be k, k – 2, k – 4, …
This is called Descartes’ Rule of Signs. This rule can be
extended to negative roots as follows. The number of nega-
tive roots of f (x) = 0 is equal to the number of positive roots
of g(x) = f (–x) = 0
For example, consider f (x) = x
5
– 3x
3
+ 6x
2
– 28x
+ 24. There are 4 sign changes in f (x)
\ The number of positive roots could be 4, 2 or 0.
Consider g(x) = f (–x)(–x)
5
– 3(–x)
3
+ 6(–x)
2
– 28(–x) + 24
= –x
5
+ 3x
3
+ 6x
2
+ 28x + 24
There is only one sign change in f (–x).
\ The number of negative roots of f (x) = 0 is 1. (It can’t
be –1, –3, …).
Chapter 06.indd 122 5/31/2017 10:59:28 AM
Page 5
Numerical Methods
We encounter problems in Engineering mathematics for
which analytical methods are not available to fi nd solutions.
Further, it may be suffi cient in engineering applications to
fi nd approximate solutions. The numerical methods off er us
approximate solutions.
1. Methods for fi nding roots of algebraic or transdental
equations
2. Solutions to system of linear equation
3. Numerical Integration
4. Numerical solutions of ordinary diff erential equation.
Accuracy and Precision
Solutions of problems computed by numerical methods are
approximate. Errors associated with calculations can be
characterized with reference to accuracy and precision.
Accuracy: Accuracy refers to how closely a computed
value agrees with the true value.
Precision: Precision refers to how closely computed values
agree with each other after repeated iterations. The follow-
ing fi gures illustrate the diff erence between accuracy and
precision where the horizontal line denote the true value
(or) actual value of the solution where as the dots denote the
values computed by a numerical method.
Time
value
True
value
Time
value
True
value
Accurate but not precise Precise but not accurate
Numerical Methods
Chapter 06.indd 119 5/31/2017 10:59:22 AM
Time
value
True value
Neither accurate nor precise
Errors in the solutions obtained by numerical methods:
As the numerical methods give approximate solutions, these
solutions contain errors.
Let x denote the actual value (or) true value and let x denote
an approximate value of the solution obtained by a numeri-
cal method.
Error = ? = x - x
Absolute error =? =- || || xx
Relative error
=? =
?
=
-
r
x
xx
x
||
|| ||
Percentage error =? =? ×=
-
×
pr
xx
x
100 100
||
.
Types of Errors
Inherent Error
The error which is already present in the statement of the
problem before its solution, is called the inherent error.
This type of errors arise due to any one or more of the
following reasons.
• Wrong formulation of the problem
• Unsuitable solution procedure
• Invalid assumptions in the formulation
• Inaccurate data
Round off Error
Real numbers such as
5
6
2 ,, , p · etc., contain an infinite num-
ber of digits when expressed in decimal form. In general, in
scientific and engineering computations, a real number x is
represented as x = ± 0. d
1
d
2
d
3
… d
n
… × 10
k
, known as float-
ing point form of x.
(where d
1
, d
2
, … d
n
… are all digits from 0 to 9 and k is a
non zero integer). Each digit d
1
, d
2
… other than the leading
zeros (the zeros that occur before the first non-zero digit) is
called a significant digit. As its not possible to retain infinite
number of digits in a number, we round off the number to,
say n significant digits.
To round off a number to n significant digits, proceed as
follows:
Possibility Procedure to Follow
The (n + 1)th digit is less than 5
(OR)
The (n + 1)th digit is equal to 5 and
the nth digit is even
Discard all the digits to the
right of nth digit and leave
the nth digit as it is
The (n + 1)th digit is greater than 5
(OR)
The (n + 1)th digit is equal to 5 and
the nth digit is odd.
Discard all the digits to
the right of nth digit and
increase the nth digit by 1.
For example,
Consider the number 25.31465.
When written in floating point form
25.31465 = 0.2531465 × 10
2
˜ 0.253146 × 10
2
(Rounded off to six significant digits)
˜ 0.25315 × 10
2
(Rounded off to five significant digits)
˜ 0.2532 × 10
2
(Rounded off to four significant digits)
˜ 0.253 × 10
2
(Rounded off to three significant digits)
Definition The difference between the true value and its
rounded off value is called the rounded off error.
• If x is the true value and x* is its rounded off value such
that |x - x*| = 0.5 × 10
-m
(OR) |x - x*| = 5 × 10
-(m+1)
then
x* is said to denote x correct to m significant digits.
Truncation Error The error in a method, which occurred
because some series (finite or infinite) is truncated to a fewer
(and finite) number of terms is called the truncation error.
For instance,
Let fx fx xx fx
xx
fx () () () ()
()
!
() =+ - ' +
-
'' ++
00 0
0
2
0
2
()
()
()()
()
()
()
xx
m
fm x
xx
m
fx
mm
m
-
-
-+
-
+8
-
0
1
0
0
0
1
1
(1)
denote the Taylor’ s series expansion of f(x) about x = x
0
.
If we retain the first m terms, we get
f(x) ˜
fx xx fx
xx
fx () () ()
()
!
()
00 0
0
2
0
2
+- ' +
-
'' ++
()
()!
()
()
xx
m
fx
m
m
-
-
-
- 0
1
1
0
1
(2)
where the series of infinite terms
()
!
xx
m
m
-
0
fx
xx
m
fx
m
m
m () ()
()
()
()!
()
0
0
1
1
0
1
+
-
+
+8
-
+
(3)
is neglected.
The first term in this neglected part of the series is called
the principal part of the truncation error or simply the trun-
cation error.
\ T r uncation er ror ==
-
<< TE
xx
m
fx x
m
m
()
!
();
() 0
0
??
As x is an unknown function of x, we have
||
!
max[|( )| ] TE
m
xx M
m
m
=-
1
0
where M
m
= [a, b] max|f
(m)
(x)|
Chapter 06.indd 120 5/31/2017 10:59:24 AM
SOLVED EXAMPLES
Example 1
If the number
p
4
0 785398163 = . is approximated by
11
14
,
then
(i) Find the number of digits upto which, this approxima-
tion is accurate.
(ii) Find the absolute and the percentage errors.
Solution
Given
p
4
0 785398163 = .
Let x ==
p
4
0 785398163 . (Exact value) and x =
11
14
= 0.785714285 Approximate value of
p
4
?
?
?
?
?
?
(i) || xx -= -
p
4
11
14
= | 0.785398163 - 0.785714285 |
= 3.16122 × 10
-4
= 5 × 10
-4
\ The approximation
11
14
to
p
4
· is accurate upto three
significant digits
(ii) Absolute error =- || xx
=- =×
-
11
14 4
3 16122 10
4
p
.
Percentage error =
-
×=
||
.%.
xx
x
100 004
Example 2
Using the T aylor’ s series expansion about x = 0, find a second
degree polynomial approximation to fx x () . =+ 13 Also
find the maximum error for this approximation when
x ? [0, 1].
Solution
We know that the Taylor’s series expansion of f(x) about x
= 0 is
fx fxf
x
f
x
f
() () ()
!
()
!
()
=+ ' + ''
+ ''' ++ 8
00
2
0
3
0
2
3
(1)
\ Considering the terms upto second degree, we have
fx fx f
x
f () () ()
!
() ˜+ ' + '' 00
2
0
2
(2)
Here fx xf () () =+ ?= 13 01
' =
+
? ' = fx
x
f () ()
3
21 3
0
3
2
'' =
-
-
? '' =
-
fx
x
f ()
()
()
9
41 3
0
9
4
3
2
and ''' =×
+
fx
x
()
()
27
8
1
13
5
2
\ Substituting these in (2), we get
fx x
x
()
!
=+ ˜+ ×- 13 1
3
2
9
42
2
=+ ×- 1
3
2
9
8
2
x
Truncation error = '''
x
f
3
3
0
!
()
=
==
?
?
?
?
?
?
1
3 01
3
!
Max x
x
Max
01
52
27
81 3 == +
?
?
?
?
?
?
x x ()
/
=
?
?
?
?
?
?
1
3
1
27
8 !
()
= 0.5625.
Methods for Finding the Real Roots
(Zeros) of f (x) = 0
The equation of the form f (x) = 0 is called an Algebraic
or Transcendental according as f (x) is purely a polynomial
in x or contains some other functions such as exponential,
logarithmic and trigonometric functions etc.
Examples:
1. x
9
+ 8x
5
- 4x
3
- 11x + 3 = 0 ? Algebraic equation
2. 10x
4
- log(x
2
- 3) + e
-x
sin x + tan
2
x = 0 ? Transcen-
dental equation
In this chapter, we obtain the solution of an equation f (x)
= 0, i.e., we mean to find the zeros of f (x).
We shall now discuss few methods to find the real roots
of both algebraic (with numerical coefficients) and tran-
scendental equations.
W e first find an approximate value of the root of the given
equation and then successively improve it to some desired
degree of accuracy.
We start with an initial approximate value, say x
0
, and
then find the better approximations successively x
1
, x
2
, x
3
…,
x
n
by repeating the same method.
If the successive approximations at each step of a method
approach the root more and more closely, we say that the
method converges.
Chapter 06.indd 121 5/31/2017 10:59:26 AM
The Intermediate Value Theorem
If a function f (x) is continuous between a and b and f (a) and
f (b) are of opposite signs, then there exists at least one root
say a between a and b of the equation
f (x) = 0, i.e., f (a ) = 0
Root ‘a ’ of f (x) = 0, will be unique in (a, b) if f ' (x) has the
same sign in (a, b) (i.e., f '(x) > 0 or f '(x) < 0 in a < x < b)
NOTE
Relations between Roots and Coefficients
An nth order equation has n roots. Corresponding to every
root, there is a factor. If a is a root of f (x) = 0, then x - a is
a factor of f (x). Sometimes (x – a )
2
may also be a factor. In
such a case, a is said to be a double root. Similarly equa-
tions can have triple roots, quadruple roots and roots of
multiplicity m. If m is the greatest value of k, for which
(x – a )
k
is a factor of f (a), then a is said to be a root of
multiplicity m. If all the roots are counted by taking their
multiplicity into account, the number of roots is equal to n,
the degree of the equation.
If a 1
, a 2
,…, a n
(not necessarily distinct) are the roots of
f (x) = 0, then
f (x) = a
n
(x – a 1
) (x – a 2
) … (x – a n
)
= a
n
[x
n
– S
1
x
n–1
+ S
2
x
n–2
+
…
+ (–1)
n
S
n
]
Where
S
1
= The sum of the roots
S
2
= The sum of the products of the roots taken 2 at a time
S
3
= The sum of the product of the roots taken 3 at a time
and so on.
S
n
= The ‘sum’ of the product of the roots taken n (or all)
at a time. Thus, S
n
is a single term.
S
n
= a 1
a 2
… a n
Let us write down the polynomial f (x) in two forms:
The standard form
f (x) = a
n
x
n
+ a
n–1
x
n–1
+ a
n–2
x
n–2
+
…
+a
1
x + a
0
In terms of the roots of the corresponding equation.
f (x) = a
n
[x
n
– S
1
x
n–1
+ S
2
x
n–2
+
…
+ (–1)
x–1
S
n–1
x + (–1)
nS n
]
These polynomials are identically equal, i.e., equal for
all values of x. Therefore the corresponding coefficients are
equal. The sum of the roots S
a
a
n
n
1
1
=-
–
.
The sum of the products of the roots, taken two at a time,
S
a
a
n
n
2
2
=
–
.
The sum of the products of the roots, taken three at a
time, S
a
a
n
n
3
3
=-
-
and so on.
The ‘sum’ of the ‘products’ of the roots taken m(m = n)
at a time S
a
a
mm
m nm
n
== -
-
Saa aa
12 3
1 … () .
\ aa a a = = …
0
12 3
(–1)
n
nn
n
a
S
a
For example, consider the polynomial equation
(x – 1)(x – 2)(x – 3) = x
3
– 6x
2
+ 11x – 6 = 0
(We can see immediately that the roots are 1, 2, 3)
The sum of roots =+ +=-
-
()
()
12 3
6
1
The sum of the products of the roots, taken two at a time
() () () S
2
12 13 23 11
11
1
=+ += =
We can drop the word ‘sum’ and ‘products’ for the last
relation, because there is only one term (only one product).
The product == =-
-
12 36
6
1
()()
()
.
Roots of Equations and Descartes’ Rule
If the coefficients are all real and the complex number z
1
, is
a root of f (x) = 0, then the conjugate of z
1
, viz, z
1
is also a
root of f (x) = 0. Thus, for equations with real, coefficients,
complex roots occur in pairs.
A consequence of this is that any equation of an odd
degree must have at least one real root.
The number of roots is related to very simple properties
of the equation as illustrated below.
Let a 1
be a positive root, i.e., x – a 1
, is a factor.
Let a 2
be another positive root, i.e., x
2
– (a 1
+ a 2
)x + a 1
a 2
is a factor.
Let a 3
be another positive root i.e., x
3
– (a 1
+ a 2
+ a 3
)x
2
+ (a 1
a 2
+ a 2
a 3
+ a 3
a 1
)x – a 1
a 2
a 3
is a factor.
We note that every positive root introduces a sign change
in the polynomial. For 1 root, there is 1 sign change (the
coefficient of x is positive and – a 1
is negative)
The second root results in a second sign change [x
2
– (a 1
+ a 2
)x + a 1
a 2
has 2 sign changes] and so on.
But every sign change need not correspond to a real posi-
tive root. (For example, x
2
- 2x + 4 has two sign changes but
the corresponding equation x
2
– 2x + 4 = 0 has no real roots.
The number of positive roots is at the most equal to the
number of sign changes. It could also be less than that by 2,
4…, i.e., if there are k sign changes in f (x), the number of
positive roots could be k, k – 2, k – 4, …
This is called Descartes’ Rule of Signs. This rule can be
extended to negative roots as follows. The number of nega-
tive roots of f (x) = 0 is equal to the number of positive roots
of g(x) = f (–x) = 0
For example, consider f (x) = x
5
– 3x
3
+ 6x
2
– 28x
+ 24. There are 4 sign changes in f (x)
\ The number of positive roots could be 4, 2 or 0.
Consider g(x) = f (–x)(–x)
5
– 3(–x)
3
+ 6(–x)
2
– 28(–x) + 24
= –x
5
+ 3x
3
+ 6x
2
+ 28x + 24
There is only one sign change in f (–x).
\ The number of negative roots of f (x) = 0 is 1. (It can’t
be –1, –3, …).
Chapter 06.indd 122 5/31/2017 10:59:28 AM
The following table shows the various possibilities for
the roots.
Negative Positive Complex
1 4 0
1 2 2
1 0 4
We have considered one specific equation and this
specific equation has 5 specific roots. We can use more
advanced techniques to find the actual roots. But even with-
out that, using only Descartes rule, we expect exactly one of
the 3 situations shown in the table above.
Example 3
Find the nature of roots of the equation, f (x) = x
3
+ x - 2 = 0.
Solution
There is only 1 change of sign in f (x).
We know that when f (x) has r changes of sign then f (x) has
r, r – 2, r – 4, … positive roots.
\ f (x) = 0 has one positive root.
Now f (-x) = -x
3
- x - 2 = 0. q = 0
Since there is no change of sign in f (-x), f (x) has no nega-
tive roots. The number of complex roots is even.
\ The equation has one positive root, and two complex roots.
Hence f (x) = 0 has 1 real root and two complex roots.
Example 4
How many non real-roots does the equation x
4
– 2x
2
+ 3x – 2
= 0 have?
Solution
Let f (x) = x
4
– 2x
2
+ 3x – 2
f (x) = 0 has 3 sign changes
\ f (x) has 3 or 1 positive roots.
f (–x) = x
4
– 2x
2
– 3x – 2
\ f (–x) has one sign change
\ f (x) has exactly one negative root.
As the sum of the co-efficient of f (x) is zero,
x = 1 is a root of f (x) = 0
\ f (x) = (x – 1)(x
3
+ x
2
– x + 2) = (x – 1) f
1
(x). By trial, f
1
(–2) = 0
\ f
1
(x) = (x + 2)(x
2
– x + 1)
We can see that x
2
– x + 1 = 0 has two non-real roots.
\ f (x) has one positive, one negative and two non-real roots.
Example 3
If p – q, p, p + q are the roots of the equation x
3
– 18x
2
+ 99x
– 162 = 0, then find the values of p and q.
Solution
Given p – q, p, p + q are the roots of the equation.
\ The sum of the roots is (p – q) + p + (p + q) = 18
? 3p = 18 ? p = 6
and the product of the roots is (p – q) p(p + q) = 162
pq q
22 2
162
6
27 36 27 –– == ?=
? q = ±3 \ p = 6 and q = ±3.
Bisection Method (Bolzano Method)
or (Halving Method)
Consider the equation f (x) = 0 (1)
If f (x) is continuous between a and b and f (a) f (b) > 0,
then there exists one root between a and b. Let f (a) be nega-
tive and f (b) be positive. The bisection method isolates the
root in [a, b] by halving process, approximately dividing the
given interval [a, b] into two, four, eight, etc. equal parts.
Thus, the first approximation to the root is given by:
x
ab
0
2
=
+
a b
a + b
2
If f (x
0
) = 0, then x
0
is a root, otherwise the root lies either
between a and x
0
or x
0
and b depending on whether f (x
0
) is
positive or negative. We again bisect the interval and repeat
the process until the root is obtained to desired accuracy.
Example 4
Find a real root of the equation f (x) = x
3
- 2x
2
+ 3x - 1 on the
interval (0, 1) using bisection method with four iterations.
Solution
We have f (0) = -1 < 0 and
f (1) = 1 - 2 + 3 - 1 = 1 > 0
\ A root lies between 0 and 1
\ The first approximation to the root is
01
2
05
+
= .. Now
f (0.5) = (0.5)
3
- 2(0.5)
2
+ 3(0.5) - 1 = 0.125 > 0 and f (0) < 0
\ The root lies between 0 and 0.5. The second
approximation to the root is
00 5
2
025
+
=
.
..
Now f (0.25) = (0.25)
3
- 2(0.25)
2
+ 3(0.25) - 1
= -0.359 < 0 and f (0.5) > 0
\ The root lies between 0.25 and 0.5.
\ The third approximation to the root is
0250 5
2
075
2
.. . +
=
= 0.375.
Chapter 06.indd 123 5/31/2017 10:59:29 AM
Read More