[go: up one dir, main page]

0% found this document useful (0 votes)
164 views28 pages

Source of Erros in Numerical Methods

The document discusses two main sources of numerical error in engineering calculations: 1) Round-off error, which occurs due to finite precision in numerical representations of values. This can cause small inaccuracies to accumulate over many calculations. 2) Truncation error, which occurs when mathematical operations are approximated, such as taking a finite number of terms in a Taylor series or using rectangles of finite width to approximate integrals. Several examples are provided to illustrate round-off and truncation errors, such as inaccuracies in Patriot missile calculations due to round-off, and errors in approximating derivatives, integrals and infinite series. The document recommends ways to reduce errors, such as taking more terms in approximations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
164 views28 pages

Source of Erros in Numerical Methods

The document discusses two main sources of numerical error in engineering calculations: 1) Round-off error, which occurs due to finite precision in numerical representations of values. This can cause small inaccuracies to accumulate over many calculations. 2) Truncation error, which occurs when mathematical operations are approximated, such as taking a finite number of terms in a Taylor series or using rectangles of finite width to approximate integrals. Several examples are provided to illustrate round-off and truncation errors, such as inaccuracies in Patriot missile calculations due to round-off, and errors in approximating derivatives, integrals and infinite series. The document recommends ways to reduce errors, such as taking more terms in approximations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Sources of Error

Major: All Engineering Majors


Authors: Autar Kaw, Luke Snyder
http://numericalmethods.eng.usf.edu
Transforming Numerical Methods Education for STEM
Undergraduates
1/11/2010

Sources of Error

http://numericalmethods.eng.usf.edu

Two sources of numerical error


1) Round off error
2) Truncation error

Round-off Error
http://numericalmethods.eng.usf.edu

Round off Error


Caused by representing a number
approximately
1
0.333333
3

2 1.4142...

Problems created by round off error


28 Americans were killed on February 25,
1991 by an Iraqi Scud missile in Dhahran,
Saudi Arabia.
The patriot defense system failed to track
and intercept the Scud. Why?

Problem with Patriot missile


Clock cycle of 1/10 seconds was
represented in 24-bit fixed point
register created an error of 9.5 x
10-8 seconds.
The battery was on for 100
consecutive hours, thus causing
an inaccuracy of
s
3600s
= 9.5 10
100hr
1hr
0.1s
= 0.342 s
8

Problem (cont.)
The shift calculated in the ranging system
of the missile was 687 meters.
The target was considered to be out of
range at a distance greater than 137
meters.

Effect of Carrying Significant


Digits in Calculations

http://numericalmethods.eng.usf.edu

Find the contraction in the


diameter
Tc

D = D (T )dT
Ta

Ta=80oF; Tc=-108oF; D=12.363

= a0+ a1T + a2T2


10

Thermal Expansion
Coefficient vs Temperature

D = D T

T(oF)
-340
-300
-220
-160
-80
0
40
80

(in/in/oF)
2.45
3.07
4.08
4.72
5.43
6.00
6.24
6.47

11

Regressing Data in Excel


(general format)

= -1E-05T2 + 0.0062T + 6.0234

12

Observed and Predicted Values


= -1E-05T2 + 0.0062T + 6.0234

-340

(in/in/oF)
Given
2.45

(in/in/oF)
Predicted
2.76

-300

3.07

3.26

-220

4.08

4.18

-160

4.72

4.78

-80

5.43

5.46

6.00

6.02

40

6.24

6.26

80

6.47

6.46

T(oF)

13

Regressing Data in Excel


(scientific format)

= -1.2360E-05T2 + 6.2714E-03T + 6.0234


14

Observed and Predicted Values


= -1.2360E-05T2 + 6.2714E-03T + 6.0234

-340

(in/in/oF)
Given
2.45

(in/in/oF)
Predicted
2.46

-300

3.07

3.03

-220

4.08

4.05

-160

4.72

4.70

-80

5.43

5.44

6.00

6.02

40

6.24

6.25

80

6.47

6.45

T(oF)

15

Observed and Predicted Values


= -1.2360E-05T2 + 6.2714E-03T + 6.0234
= -1E-05T2 + 0.0062T + 6.0234
T(oF)

(in/in/oF)
Given

(in/in/oF)
Predicted

(in/in/oF)
Predicted

-340

2.45

2.46

2.76

-300

3.07

3.03

3.26

-220

4.08

4.05

4.18

-160

4.72

4.70

4.78

-80

5.43

5.44

5.46

6.00

6.02

6.02

40

6.24

6.25

6.26

80

6.47

6.45

6.46
16

THE END

17

Truncation Error
http://numericalmethods.eng.usf.edu

18

Truncation error
Error caused by truncating or
approximating a mathematical
procedure.

19

Example of Truncation Error


Taking only a few terms of a Maclaurin series to
x
e
approximate
2
3
x
x
e x = 1 + x + + + ....................
2! 3!

If only 3 terms are used,

x
x
Truncation Error = e 1 + x +
2!

20

Another Example of Truncation


Error
Using a finite x to approximate f (x)
f ( x)

f ( x + x) f ( x)
x

secant line

P
tangent line

Figure 1. Approximate derivative using finite x


21

Another Example of Truncation


Error
Using finite rectangles to approximate an
integral.
y
90

y = x2
60

30

0
0

1.5

4.5

7.5

10.5

12

22

Example 1 Maclaurin series


1.2

Calculate the value of e with an absolute


relative approximate error of less than 1%.
e

1.2

1.2 2 1.2 3
= 1 + 1.2 +
+
+ ...................
2!
3!
1.2

a %

__

___

2.2

1.2

54.545

2.92

0.72

24.658

3.208

0.288

8.9776

3.2944

0.0864

2.6226

3.3151

0.020736

0.62550

Ea

6 terms are required. How many are required to get


23
at least 1 significant digit correct in your answer?

Example 2 Differentiation
Find
for
and x = 0.2
f (3)

f ( x) = x 2

using

f (3 + 0.2) f (3)
f (3) =
0.2
3.2 2 32
f (3.2) f (3)
=
=
0.2
0.2

f ( x + x) f ( x)
f ( x)
x

'

1.24
10.24 9
= 6.2
=
0.2
0.2

The actual value is


f ' ( x ) = 2 x,

f ' (3) = 2 3 = 6

Truncation error is then, 6 6.2 = 0.2


Can you find the truncation error with x = 0.1

24

Example 3 Integration
Use two rectangles of equal width to
approximate the area under the curve for
f ( x) = x 2 over the interval [3,9]
y

90

y=x

x
dx

60

30

0
0

12

25

Integration example (cont.)


Choosing a width of 3, we have
9

2
2
x
dx
=
(
x
)

x =3

(6 3) + ( x 2 )

x =6

(9 6)

= (3 2 )3 + (6 2 )3
= 27 + 108 = 135

Actual value is given by


9

x 3 93 33
2
3 x dx = 3 = 3 = 234
3

Truncation error is then


234 135 = 99
26
Can you find the truncation error with 4 rectangles?

Additional Resources
For all resources on this topic such as digital audiovisual
lectures, primers, textbook chapters, multiple-choice tests,
worksheets in MATLAB, MATHEMATICA, MathCad and
MAPLE, blogs, related physical problems, please visit
http://numericalmethods.eng.usf.edu/topics/sources_of_err
or.html

THE END
http://numericalmethods.eng.usf.edu

You might also like