You are on page 1of 19

ERRORS IN NUMERICAL

METHODS
Stream – CSE
NAME – Soham Chakraborty Subject – Numerical Methods
University Roll No.- 11000120032 Subject Code – OEC-IT601A
OVERVIEW
• INTRODUCTION TO ERROR
• TYPES OF ERRORS
• TRUNCATION ERROR
• ROUND-OFF ERROR
• INHERENT ERRORS
• ACCURACY AND PRECISION
• ABSOLUTE ERRORS
• RELATIVE ERRORS
• PERCENTAGE ERRORS
ERROR
• Errors in numerical methods refer to the differences between the true
solution of a mathematical problem and the solution obtained through
numerical approximation.
• When using numerical methods or algorithms and computing with finite
precision, errors of approximation or rounding and truncation are
introduced.
• It is important to have a notion of their nature and their order. A newly
developed method is worthless without an error analysis.
• Neither does it make sense to use methods which introduce errors with
magnitudes larger than the effects to be measured or simulated. On the
other hand, using a method with very high accuracy might be
computationally too expensive to justify the gain in accuracy.
TYPES OF ERRORS

• THERE ARE MANY TYPES OF ERRORS IN NUMERICAL METHODS:


• INHERENT ERRORS
• TRUNCATION ERRORS
• ROUND-OFF ERRORS.
INHERENT ERRORS
• WHEN PERFORMING COMPUTATIONS WITH ALGEBRAIC OPERATIONS AMONG
APPROXIMATE NUMBERS, WE NATURALLY CARRY TO SOME EXTENT THE
ERRORS OF THE ORIGINAL DATA INTO FINAL RESULT. SUCH ERRORS ARE
CALLED INHERENT ERROR/ERROR OF THE OPERATION.

• FOR EXAMPLE, LET X=0.3333 AND Y=3.1416 BE TWO APPROXIMATE NUMBERS


FOR THE EXACT NUMBER 1/3 AND Π . OBVIOUSLY, IF WE PERFORM AN
ALGEBRAIC OPERATION BETWEEN THESE TWO APPROXIMATE NUMBERS, THE
ERROR WILL INTRODUCE IN THE FINAL RESULT ACCORDINGLY.
TRUNCATION ERRORS:
• THESE ERRORS OCCUR WHEN A NUMERICAL METHOD APPROXIMATES A DERIVATIVE OR
AN INTEGRAL.

• FOR EXAMPLE, IN FINITE DIFFERENCE METHODS, TRUNCATION ERRORS OCCUR WHEN A


DERIVATIVE IS APPROXIMATED USING A FINITE DIFFERENCE FORMULA.

• IN NUMERICAL INTEGRATION, TRUNCATION ERRORS OCCUR WHEN THE AREA UNDER A


CURVE IS APPROXIMATED USING A FINITE NUMBER OF RECTANGLES OR TRAPEZOIDS.
Graphical representation of a
Taylor Series approximation
ROUND-OFF ERRORS:
• ROUND-OFF ERRORS ARE CAUSED BY THE LIMITED PRECISION OF COMPUTER ARITHMETIC. MOST
COMPUTERS USE FLOATING-POINT ARITHMETIC, WHICH CAN ONLY REPRESENT REAL NUMBERS
WITH FINITE PRECISION.

• AS A RESULT, SMALL ERRORS CAN ACCUMULATE DURING THE COMPUTATION, LEADING TO A


SIGNIFICANT ERROR IN THE FINAL SOLUTION. ROUND-OFF ERRORS CAN BE REDUCED BY USING HIGH
PRECISION ARITHMETIC, SUCH AS DOUBLE PRECISION OR QUADRUPLE PRECISION, BUT THIS CAN
SLOW DOWN THE COMPUTATION.
THE TRADE-OFF IN ERROR

• The total error of an approximation is the summation of roundoff error and truncation error. As seen from the previous sections,
truncation error decreases as step size decreases. However, when step size decreases, this usually results in the necessity for more
precise computations which consequently results in an increase in roundoff error. Therefore, the errors are in direct conflict with
one another: as we decrease one, the other increases.
• However, the optimal step size to minimize error can be determined. Using an iterative method of trying different step sizes and
recording the error between the approximation and the true value, the following graph shown in next slide will result. The
minimum of the curve corresponds to the minimum error achievable and corresponds to the optimal step size. Any error to the
right of this point (larger step sizes) is primarily due to truncation error and the increase in error to the left of this point
corresponds to where roundoff error begins to dominate. While this graph is specific to a certain function and type of
approximation, the general rule and shape will still hold for other cases.
• Therefore, Error Analysis is required on the basis of Accuracy and Precision
Accuracy and Precision

 Measurements and calculations can be


characterized with regard to their accuracy
and precision.
 Accuracy refers to how closely a value
agrees with the true value.
 Precision refers to how closely values
agree with each other.
 The term error represents the imprecision
and inaccuracy of a numerical
computation.

You might also like