0% found this document useful (0 votes)
83 views29 pages

Lec 1 Error Analysis

This document provides an overview of the MATH-352 Numerical Methods course taught by Professor Atifa Kanwal. It introduces numerical methods and their importance in engineering problem solving. Sources of errors in numerical methods like rounding errors and truncation errors are discussed. The concepts of accuracy, precision, significant figures and different types of errors like absolute error and relative error are explained.

Uploaded by

Misbah 01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views29 pages

Lec 1 Error Analysis

This document provides an overview of the MATH-352 Numerical Methods course taught by Professor Atifa Kanwal. It introduces numerical methods and their importance in engineering problem solving. Sources of errors in numerical methods like rounding errors and truncation errors are discussed. The concepts of accuracy, precision, significant figures and different types of errors like absolute error and relative error are explained.

Uploaded by

Misbah 01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

MATH-352

Numerical Methods
Atifa Kanwal
[email protected]
Office # 303, Faculty Block, SEECS, NUST
Introduction and Error
Analysis
Numerical Methods by Chapra
Numerical Analysis by Burden & Faires
Introduction
 Numerical Methods are techniques by which
mathematical problems are formulated so that they
can be solved with arithmetic operations.

 Although numerical methods involve large


numbers of tedious arithmetic calculations,
however with the development of fast efficient
digital computers, the role of numerical methods in
engineering problem solving has increased
dramatically in recent years.
Why should you study Numerical
Methods
Numerical methods are capable of handling large
systems of equations, nonlinearities and
complicated geometries that are often impossible
to solve analytically.
For Example
To solve the problems that can not be solved
analytically
x u2
1 

2 

e du
2
What is the acceleration at t=7 seconds?
 You often use commercially available prepackaged
computer programs that involve numerical
methods. The intelligent use of these programs is
often predicated on knowledge of the basic theory
underlying these methods.

 Many problems cannot be approached using


canned programs. If you are conversant with
numerical methods and are adept at computer
programming, you can design your own programs
to solve problems.
Errors
The knowledge we have of the physical world is
obtained by doing experiments and measurements.
In this course, we analyze such data and draw
conclusions from it.
In doing this it is crucial to understand that all
measurements of physical quantities are subject to
uncertainties. It is never possible to measure
anything exactly.
It is good to make error as small as possible but it is
always there. And in order to draw valid conclusions,
the error must be indicated and dealt properly.
Sources of Errors
The main sources of error are as follow:

 Gross Error are either caused by human mistakes or


by the computer.

 Round-off Error is introduced by rounding-off


numbers to a limited number of decimal places.
In order to obtain a smaller error as a result of
rounding-off error, we apply the following rules
when performing manual calculations.
Sources of Errors: Rules of Rounding
off
 If the first discarded digit is Example:
less than 5 the previous digit 56.44 becomes 56.4
is unchanged.
 If the first discarded digit is
greater than 5 the previous Example:
digit is increased by 1. 56.47 becomes 56.5
 If the first discarded digit is
exactly 5 the previous digit Examples:
is increased by 1 if it odd 56.45 becomes 56.4
56.75 becomes 56.8
and is unchanged if it is
even.
Sources of Errors:Cont…
 Truncation Error arises when we replace one
infinite series by another with fewer terms. In
analyzing errors arising from the truncation of
series, several types of series expansions can be
considered. These include the following.
 Binomial expansion

 Infinite geometric progression

 Taylor or Maclaurin Series

In this course, we will consider only Taylor/Maclaurin


series.
Precision and Accuracy
 Accuracy refers to how closely a computed a
measured value agrees with the true value.

 Precision refers to how closely individual computed


or measured value agrees with each other.

 Precision is governed by the number of digits being


carried in the numerical calculations.
 Accuracy is governed by the errors in the numerical
approximation.
Example
 Let us consider
example of target
practice.
 Bull’s eye represents
the truth value.
 The bullet holes on
each target in fig
represent
approximations of
numerical technique.
 Results in (b) and (d)
are equally accurate
but (d) is more precise.
Significant Digits/Figures
Significant Digits/Figures
The significant digits in a
measurement consist of all the
digits known with certainty
plus one final digit, which is
uncertain or is estimated.
For example: Study the diagram below.

Using the ruler at the top of the diagram, what is the length of
the darker rectangle found in between the two rulers?

Answer: The length is between 4 and 5 cm. The “4” is certain,


but the distance past 4 cm will have to be estimated. A
possible estimate might be 4.3. Both of these digits are
significant. The first digit is certain and the second digit is
uncertain because it is an estimate.
Using the ruler at the bottom of the diagram, what is the length of the
darker rectangle found in between the two rulers?

Answer: The edge of the rectangle is between 4.2 cm and 4.3 cm.
We are certain about the 4.2, but the next digit will have to be
estimated. As possible estimation might be 4.27. All three digits
would be significant. The first two digits are certain and the last
digit is uncertain.
Please remember…
The last digit in a measurement
is always the uncertain digit.

It is significant even if it is
not certain.

The more significant digits a value


has, the more accurate the
measurement will be.
R U LE S
A F EW
Q U I T E M A N Y
E A R E H O W
THER ETERMINE A
T D G I T S I L L
THA A N T D I
Y O U W
N IF I C H A S .
SI G M EN T H ES E
A S U R E R I Z E T
ME O M EM O
ED T
NE
U L ES .
R
RULE: If a number contains no zeros,
all of the digits are significant.

How many significant


digits are in each of
the following
examples? Answers:
a) 438 a) 3

b) 26.42 b) 4

c) 1.7 c) 2

d) .653 d) 3
RULE: All zeros between two non zero
digits are significant.

How many significant


digits are in each of
the following Answers:
examples?
 
a) 3
a) 506
b) 5
b) 10,052
c) 6
c) 900.431
RULE: Zeros to the right of a non zero digit
a) If they are to the right of a nonzero number but not sandwiched
between nonzero and decimal point, they are not significant.

How many significant


digits are in each of
the following Answers:
examples?
 
a) 3
a) 4830
b) 1
b) 60
c) 1
c) 4,000
RULE: Zeros to the right of a non zero digit
b) If these zeros are sandwiched between a nonzero
number and a decimal point, they are significant.

How many significant


digits are in each of
the following
examples? Answers:
 
a) 4830. a) 4
b) 60. b) 2
c) 4,000. c) 4
RULE: In decimals less than one, zeros to the right of a decimal point
that are to the left of the first non-zero digit are never significant. They
are simply place holders.

How many significant


digits are in each of
the following Answers:
examples?
  a) 1
a) 0.06 b) 2

b) 0.0047 c) 1

c) 0.005
RULE: All zeros to the right of a decimal point and to the
right of a non-zero digit are significant.

How many significant


digits are in each of
the following
examples? Answers:
 
a) .870 a) 3
b) 8.0 b) 2
c) 16.40 c) 4
d) 35.000 d) 5
e) 1.60 e) 3
Practice Problems
How many significant digits
are in each of the following
examples? Answers:
 
1) 47.1 1) 3
2) 9700. 2) 4
3) 0.005965000 3) 7
4) 560 4) 2
5) 0.0509 5) 3
6) 701.905 6) 6
7) 50.00 7) 4
8) 50.012 8) 5
9) 0.000009 9) 1
10) 0.0000104 10) 3
Error Definitions
Absolute error is the discrepancy between the true and
approximated value

A shortcoming of this definition is that it takes no


account of the order of magnitude of the value under
examination.
Error Definitions:Cont…
One way to account for the magnitudes of the
quantities being evaluated is to normalize the error
of the true value that is called True Fractional
Relative Error
Error Definitions:Cont…
For numerical methods, the true value will be known
only when we deal with functions that can be solved
analytically. However, in real world applications, we
will obviously not know the true answer as prior.
For these situations, an alternative is to normalize
the error using the best available estimate of the true
value, that is, to the approximation itself, as
Error Definitions: Example
Suppose that we have the task of measuring the
lengths of a bridge and a rivet and come up with 9999
and 9 cm, respectively. If the true values are 10,000
and 10 cm, respectively, compute
a) The true error
b) True percent relative error

Solution:
c) For bridge for rivet
d) For bridge

For rivet
So measurement of bridge is more accurate than rivet.

You might also like