You are on page 1of 16

Course: Numerical Analysis and Computer

Application
Subject Teacher: Sher Khan Awan
Lecturer (BPS-18)

Department of Basic Science and Related


Studies,
Mehran University of Engineering and
Technology, Jamshoro.
Numerical Analysis and Computer
Application
Application of Contents
Numerical Analysis & Computer Application
Chemical Engineering is the branch of engineering that is concerned
with solving problems in industrial and Chemical side. This text is an
introduction to Numerical Methods for chemical engineers. Numerical
methods are mathematical techniques for performing accurate, efficient
and stable computation, by computer, to solve mathematical models of
chemical systems. Numerical methods are the tools engineers use to
realize computer implementation of analytic models of system behavior.
INTRODUCTION
• The projectile theory is a subject of interest to mathematicians,
engineers and scientists. The height H(x) reached by a projectile at
distance x from the point of projection is given by:

• where is the initial velocity, is angle of projection and is


acceleration due to gravity. See the figure for projectile motion.
Now when with
the height H when x = 500 m is determined
by (1) is H (500) = 376 m. It has remained an important
assignment of scientists and engineers to see how small

• changes in the parameters and affect the value of height


• H. This phenomenon is frequently called sensitivity and perturbation
analysis. For example, if is decreased by 2% in its value then = 98 m/s
and H (500) = 356 m which shows that H is decreased by about 5.32%.
The process of obtaining a solution is to reduce the original problem to a
repetition of the same step or series of steps so that the computations become
automatic. Such a process is called a numerical method and the derivation and
analysis of such methods lie within the discipline of numerical analysis. Thus the
subject of numerical analysis is concerned with the derivation, analysis and
implementation of methods for obtaining reliable numerical answer to complex
mathematical problems.
numerical methods provide estimates that are very close to the exact,
analytical solutions; obviously, an error is introduced into the computation. It is
important to understand that an error here does not mean a human error, such as
blunder or mistake or oversight but rather a discrepancy between the exact and
approximate (computed) values.such errors are likely to arise in all methods.
What is an Error?

All measurements, however carefully and scientifically perform are subject


to errors. Errors analysis is the study and evaluation of these errors; its Min
functions are to estimate the errors and suggest ways to eliminate or
minimize them.
An error in a numerical computation is the difference between the true
or actual value of a quantity and its computed or approximate value. If x
represents the computed value of a quantity, and the true value is x*, then
the difference, is called the error of approximation.
The uncertainty in measurement is called Error
Sources of Errors

A numerical method for solving a given problem will, in general,


involve an error of several types. Although different sources initiate the
error, they all cause the same effect; that is, diversion from the exact
answer. Some errors are small and may be neglected, while others may
be distressing or upsetting if overlooked. In all cases, error analysis
must accompany the computational scheme, whenever possible.

The main sources of error


• Gross Errors
• Rounding Errors
• Truncation Errors
Gross Errors
• Although gross errors are not directly concerned with most of
numerical methods, they can have great impact on the success of
modeling efforts. These errors are either caused by human mistakes or
by the computing. A few examples of these errors are as follows:
• a. Misreading or misquoting the figures, particularly in the
interchanges of adjacent digits.
• b. Use of inaccurate mathematical formula (algorithm) to solve a
particular problem.
• c. Use of inaccurate data.
Rounding Errors
When a numerical method is actually run on a digital computer, it forms a kind of
error called Round-off Error

Round-off to
Number
Three digits Four digits Five digits

3.142857143 3.14 3.143 3.1429

00.563241 00.563 00.5632 00.56324

89.5355 89.5 89.53 89.536

00.12556 00.126 00.1256 00.12556

00.887878 00.888 00.8879 00.88788


Truncation Errors

• An error arising by replacing one series by another with fewer terms is called
truncation error. Defined as the error created by approximating a mathematical
procedure

2 3
x x
For example e x = 1 + x + + + ...
2! 3!
If we take 4 terms of the series, then we have
x x 2 x3
e = 1+ x + + + R4
2! 3!
where R4 is remainder after 4 terms of above series. In analyzing errors arising from truncation
of series, several types of series expansion can be considered, for example;
Types of Error

Absolute Error:
If exact value or actual value and approximate value of a number , define as
A.E =|-|

Relative Error:
The relative error defined as , R.E= ,
Percentage Error:
Relative error expressed in percentage is called percentage error and defined
by P.E = R.E
Accuracy and Precision
Accuracy of a measurement how close it is to the true value.
How consistent a series of value are with each other known as Precision.

Ex: the volume liquid is 20 ml, Student measure the volume of liquid
using a cup and obtains following results.
 19.3, 18.8, 20, and 18.6ml, AccuracyGood , Precision Poor
16.1, 16, 16.2 and 16ml, AccuracyPoor , Precision Good
 20, 20.2, 20.1 and 20ml AccuracyGood , Precision Good
 18, 15.5, 16.7 and 17.5ml Accuracy Poor, Precision Poor
Problem
1.Find the Absolute and Relative Errors in each of the following cases (all numbers
are rounded).
8.3425  0.87695
i. 67.4  145.5 ii. 0.561 5.7418 iv. v. 3.4(4.18  2.34)
2.567  3.029 29.876
iii.
5.467
2. If X = 3.25 and y = 4.75 are roundup numbers. Find the maximum absolute error
involved in evaluating
i. x + y ii. x - y iii. x/y iv. x2 + xy + y2
v. x2 – xy + y2 vi. x2 y + xy2

You might also like