1

Errors in Numerical Computations

1.0 INTRODUCTION

In practice, the applications of Mathematics ultimately results in numerical form. These results may be from the evolution of formulae, solutions of equations or inferences drawn from tabulated data.

Numerical analysis may be described as that branch of Mathematics which provides with convenient methods for obtaining numerical solutions to such problems.

Suppose for a certain experiment the heights of a set of university students are measured. The numbers representing the heights are only approximations, true to two or three decimal places. In general the data represent approximations. Sometimes, the process used to deal with the data is approximate. So, the error in a computed result may be due to errors in the data or errors in the methods or both.

Numerical analysis deals with methods of which errors in computation is reduced to a minimum. With the advent of computers the demand for numerical methods increased rapidly in the applications to engineering and scientific fields. Today numerical methods have become an indispensable tool.

1.1 ACCURACY OF NUMBERS

The numbers Eqn1 and Eqn2 e etc written in this form are exact numbers. If Eqn3 is written as 1.732, then it is an approximate number. We can also write Eqn3 as 1.73205, which is a better approximation. However, we cannot write the exact value of Eqn3 by finite number of digits, because Eqn3 has infinite number of decimals. Thus we deal with two types of numbers exact and approximate.

1.1.1 Significant Figures

The digits used to express a number meaningfully are called significant figures or significant digits. For instance the digits Eqn7 are all significant digits in any number. But 0 may or may not be a significant figure. If 0 is used to fix the decimal point or to fill places of unknown or discarded digits, then 0 is not a significant figure.

In the number of 0.000567, the significant figures are 5, 6, 7. The zeros are not significant, because they are used to fix the decimal point. But in the number 4.5037 all the five digits are significant. Here 0 is also a significant digit.

In 0.5000, only 5 is the significant figure.

The numbers 0.0028, 0.000035 contain only two significant figures 2, 8, and 3, 5 respectively.

1.1.2 Rounding Off of Numbers

We know Eqn8 is a never ending decimal. To use such a number in a practical computation we must cut down to a usable form such as 1.7 or 1.73 or 1.732 etc. This process of cutting off the extra digits is called rounding off of numbers.

Usually rounding off a number is done according to the following rules.

“To round off a number to n significant figures, discard all the digits to the right of the nth digit, and if the (n + 1)th digit is

  1. (i) less than 5, then leave the nth digit unaltered
  2. (ii) greater than 5, then increase the nth digit by 1
  3. (iii) equal to 5, then the nth digit is unaltered if it is even and increase the nth digit by 1 if it is odd”

A number rounded off according to this rule is said to be correct to n significant places.

For example, the following numbers are rounded off to five significant figures.

23.876345 becomes 23.876

0.876345 becomes 0.87634

4.782250 becomes 4.7822

1.823156 becomes 1.8232

76.69954 becomes 76.700

1.1.3 A Safe Rule

In numerical analysis, often, we have to perform a sequence of arithmetical operations on numbers. During the computation retain one more figure (or decimal place) than that given in the data and round off after the last operation has been performed. When this practice is followed, no attention is paid to rounding off rule.

1.2 ERRORS AND THEIR ANALYSIS

In numerical computations we always look for the accuracy of the result obtained.

The size of the error in the computed value is usually expressed in two ways:

  1. absolute error and (2) relative error

Eqn9

Eqn10

Eqn11 and it is denoted by Er.

Eqn12

Sometimes, we express as percentages which will enable us for comparison.

Eqn13 and it is denoted by Ep.

Eqn14

Note:

  1. Absolute error is in terms of the unit used, where as relative error and percentage error are pure numbers independent of the unit of measurement.
  2. It is obvious that the absolute error is related to the number of decimal places, whereas relative error is related to the number of significant figures.
  3. If a number is correct to n decimal places, then absolute error is Eqn18

    If a number is correct to n significant figures, then the relative error is Eqn15

    In other words, a number Eqn16 is an approximation to x to n significant figures if Eqn17

1.2.1 Classification of Errors

In numerical analysis errors are classified into two major categories.

  1. (i) Inherent error
  2. Truncation error

Inherent error: It is the error that is present in the statement of the problem before its analysis and solution. The inherent errors arise due to the simplication assumptions that are used in the mathematical formulation of the problem or due to the errors in measurements of the parameters of the problem.

Truncation error: It is due to those errors caused by the method. For example:

If Eqn19 is approximated by the cubic Eqn20 and computed then the error in the result is due to truncating the series.

The remainder Eqn21 after the fourth term in the Maclaurin’s series of Eqn22 is the truncation error.

We shall state some theorems without proof.

Theorem 1.1

If a number is correct to n significant figures and if a1 is the first significant figure, then the relative error is less than Eqn24 i.e. Eqn25

Theorem 1.2

If x is a number having n decimal digits and if Eqn26 is got by truncating to k digits, then the absolute error is Eqn27

Absolute error due to rounding off to k digits Eqn28

Theorem 1.3

If the relative error of any number is Eqn29 then the number is correct to n significant figures.

WORKED EXAMPLES

Example 1

If the number 23.876 is correct to 5 significant figures, then find the relative error.

Solution

Given the number is 23.876.

∴ the first significant figure is 2 and the number of significant digits is 5, n = 5, a1 = 2

∴ the relative error Eqn30

Example 2

Consider the number 52.43, which is correct to four significant figures. Find Ea and Er. Also find the percentage error.

Solution

Given the number is 52.43. The first significant number is 5 and the number of significant figures is 4

Eqn31

∴ by theorem 1 the relative error Eqn32

Eqn33

Eqn34

The nth place is Eqn35

∴ the absolute error Eqn36 = 0.005

Percentage error Eqn37 = 0.0002 × 100 = 0.02

Example 3

Find the absolute error and relative error in takinπ Eqn38

Solution

Given Eqn39

Eqn40

Eqn41

Eqn42

Eqn43

Example 4

Round off the numbers 784652 and 78.4625 to four significant digits and compute Ea, Er, Ep.

Solution

  1. (i) Given x = 784652

    Rounding off to 4 significant figures, we get x1 = 784600

    Eqn44

  2. (ii) Given x = 78.4625

    Rounding off to 4 significant figures, we get x1 = 78.4600

    Eqn46

Example 5

A person measured a length as 3450 cm, where as its actual length is 3445 cm and another length as 145 cm where as its actual length is 140 cm Compare their absolute and relative errors.

Solution

  1. (i) Given x = 3445, x1 = 3450

    Eqn48

  2. (ii) Given x = 140, x1 = 145

    Eqn49

Though the absolute errors are same for both measurements, their relative errors differ more than 24 times.

1.3 A GENERAL FORMULA FOR ERROR

Let Eqn50 be a function of several variables Eqn51 and be differentiable. Let Δx1, Δx2,…,Δxn be the errors in the variables so that the error in y is Δy.

We have to find the error relation.

We know that the total differential

Eqn53

∴ the error relation is Eqn54

The relative error of y is Eqn55

∴ The maximum value of Eqn56Eqn57

Note: Suppose Eqn58 then Eqn59

The differential relation is

Eqn60

∴ the error relation is

Eqn61

The relative error in y is

Eqn62

Eqn63

Maximum relative error is Eqn64

WORKED EXAMPLES

Example 6

Let Eqn65 Find the maximum error and relative error in y if x1 = x2 = x3 = 1 and Eqn66

Solution

Given Eqn68

Eqn69

∴ the error relation is Eqn70

∴ the maximum error relation Δy is Eqn71

But Eqn72

Eqn73

At the point Eqn74

Eqn75

and given that Eqn76

When Eqn77

∴ maximum error is Eqn78

= 0.06 + 0.3 + 0.12 = 0.21

Maximum relative error Eqn79Eqn80

The general error formula can be used to find error in fundamental operations of arithmetic.

Eqn84

Example 7

Find the sum of the numbers 681.32, 521.7, 94.853, 5.9271, 0.0034, each being correct to its last digit. Also find the absolute error.

Solution

Here 52.7 has one decimal place

The absolute error = Eqn85

This number is the one with greatest absolute

So, we round off all the numbers to two decimals.

∴ the round off numbers are 681.32, 94.85, 5.93, 0.00

So, their sum S = 681.32 + 521.7 + 94.85 + 5.93 + 0.00 = 1303.8

Ea = sum of absolute errors in each number

Eqn87

Rounding off error is 0.01.

∴ total error in S is 0.07 + 0.01 = 0.08

S = 1303.8 ± 0.08

Example 8

Evaluate the number Eqn89 correct to 4 significant digits and find its absolute and relative error.

Solution

Evaluate the numbers Eqn90 to 4 significant digits using calculator Eqn91, Eqn92 Eqn93

Eqn94

We know that the absolute error in a number correct to 3 decimal places is Eqn95

∴ the absolute error in the sum of the 3 numbers is

Eqn96

This shows that the sum Eqn97 is correct to 3 significant figures only,

Eqn98

Then Eqn99

1.4 ERROR IN SERIES APPROXIMATION

Power series expansion of a function is a very useful technique in theory and applications. The general method for expanding functions into power series is by means of Taylor’s formula.

  1. (i) Taylor’s formula for Eqn103 about Eqn104 under valid conditions is

    Eqn105a

  2. (ii) If Eqn106 then the expansion about the origin is

    Eqn107

This is called Maclaurin’s formula.

The remainder after n terms is denoted by Rn and Eqn108

If Eqn109 as Eqn110 then the series converges.

If we approximate Eqn111 by the first n terms, then the maximum error committed in the truncation is Rn.

Conversely, if the accuracy required is given in advance, the we can find the number of terms n to be taken.

1.4.1 Error in Some Important Series

  1. Logarithmic series

    Eqn112

    where Eqn113 or Eqn114 then the error committed in truncating is less than the first term neglected

    Eqn115

  2. Binomial series

    Eqn116

    where Eqn117

    If Eqn118 then Eqn119

    If Eqn120 then Eqn121

  3. The exponential series

    Eqn122

    Error Rn is maximum when Eqn123

    If Eqn124 maximum. relative Eqn125

WORKED EXAMPLES

Example 9

Compute Eqn126 truncating after the third term. Find the error.

Solution

Eqn127

where Eqn128

Put Eqn129

Eqn130

Eqn131

and

Eqn132

which is correct to 7 decimal places, because in Eqn133 the first significant value is 4 occurring in the 8th place.

Note: Using calculator Eqn134

Example 10

Find the number of terms n to be taken in the expansion of Eqn135 correct to 7 significant figures, when x = 1.

Solution

The Maclaurin’s series for

Eqn136

Maximum relative Eqn137

Maximum relative error, when Eqn138 is Eqn139

For 7 significant figure accuracy, we must have, by theorem 2

Eqn140

Eqn141

This means we have to take 11 terms of the series for 7 significant figure accuracy.

Exercises 1.1

  1. Round of the following numbers correctly to four significant figure. 23.7642, 53266, 0.070037, 0.0052725.
  2. Find the sum of the number which are correct to the number of significant figure given 142.6, 26.23, 0.23425, 220.44, 3.42.

Answers 1.1

  1. (1) 23.76, 53270 = 5327 × 10, 0.07004, 0.005272
  2. 392.92
Short Answer Questions
  1. The value of π is 3.1416 correct to four decimal places, find the error.
  2. Round off the numbers 34789 and 3.7256 to three significant figures.
  3. Find the relative error if the number 852.43 is correct to five significant figure.
  4. If the number 0.0700 is correct to 3 significant figures, find the relative error.
  5. Find the absolute error if the number 0.0033543 is truncated to three ­decimal places.
  6. If the number 25.34217 is rounded off to four significant figures then find EaEr.
  7. Find the absolute error in Eqn22_1 correct to 4 significant digits.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.158.36