error analysis, interpolation, numerical methods

© All Rights Reserved

1 views

error analysis, interpolation, numerical methods

© All Rights Reserved

- EMPIRICAL WAVELET TRANSFORM
- 9 2Post
- Shortcuts
- Ch5 Fourier Series
- New Hptu Syllabus CSE
- Almog, Joseph - Nothing, Something, Infinity
- BRT Toutorial
- Acad Command
- Sands Sup3
- W11_16C1_lec_2_23&25_11
- Finite Element Method_chapter4
- ftoe
- academic resume 1
- ECM6Lecture14cVietnam_2014.npdf
- Chapter10 Function of Matix
- BTech-Course_Outline Math II (1MT3) W2015
- Mathematical Supplement Part i
- 01530224
- 4 Point Teaching - MOTOMAN
- Lot SIze

You are on page 1of 38

9/18/2017 1

GEM 501E

#110, email:ounal@itu.edu.tr

Homework: 3 or 4 pieces of homework are to be

meticulously prepared. Submission (on time) is

compulsory for the final exam qualification.

Exams: 1 midterm exam (probably in the 7th or 8th

week) and a final exam.

Grading: 30% homework, 30% midterm, 40% final

9/18/2017 2

Error Analysis and

Interpolation

9/18/2017 3

Approximate Numbers

a0 : exact value

a : approximate value (Ex: 1/3 and 0.33)

a a0 a

is the absolute error of a

digit is meaningless. Should be correctly

written as: a=0.39

9/18/2017 4

Approximate Numbers

In the error analysis the relative error may be

defined as follows:

a

a

A0

, A0 0

Relative error is related with the number of

significant (meaningful) digits. For the previous

example:

0.0045 %0.45

0.0926

a

20.7426

9/18/2017 5

Significant Digits

The absolute error of a number, which is

correctly given, cannot be larger than the

half of the value of the last digit.

the absolute error is e0.0005. Here we have

3 significant digits after the decimal point.

9/18/2017 6

Absolute errors (uncertainties)

0.02 e0.005

3.1245 e0.00005

2.8 e0.05

5.0 e0.05

2. e0.5

123 not defined

9/18/2017 7

Arithmetic operations with

approximate numbers

The absolute error of the sum (or difference) of

multiple approximate numbers is the sum of the

absolute error of each number

S a1 a2 an

s a1 a2 an

If all ais have the same sign, the relative error of the

sum S (s) cannot be larger than the largest of the

relative errors of these terms:

min ai s max ai , i 1,2,, n

9/18/2017 8

Arithmetic operations with

approximate numbers

The relative error of the difference of two positive

numbers is larger than the relative errors of these

numbers

approximate numbers the relative errors of the

terms are summed:

a1 a2 am

r ; z xm yn

b1 b2 bn

r a a a b b b

1 2 m 1 2 n

z m x n y

9/18/2017 9

Errors in the calculation of function values

y f ( x) x

Relative error:

f ( x)

y x ln f ( x) x

f ( x)

9/18/2017 10

Errors in the calculation of function values

multivariable functions such as y=f(x1,x2,..,xn), if x1,

x2,..,xn are small enough:

n

f 1 f

y xi and y xi

i 1 xi i f xi

9/18/2017 11

Errors in the calculation of function values

Besides these rounding errors other rounding errors

can occur due to the use of binary system.

This can be partly minimised with the use of double

precision in the computational analyses.

9/18/2017 12

Errors in the calculation of function

values

Example

If the uncertainties in y and a are given as 0.1 and

1, respectively, calculate the absolute error of the

function, f=y cos(a) for y=3.0 and a=40 (degrees).

n

f

1deg=0.017rad y x

i 1 xi

i

f=|cos(a)|* y+|y sin(a)|x a=cos40x0.1+3xsin40x0.017=0.11

f=(2.3 0.1) or f= 2. without indicating the uncertainty value, since,

f<0.5

9/18/2017 13

Conditionedness in Functions

Let us define the maximum relative change in a function f(x) due to a small

change in the value of x:

number- (co) at that point will be infinite. This means that small changes in x will

cause large changes in f(x).

If the co gets larger, the function becomes an ill-conditioned function.

Example:

co

9/18/2017 14

Conditionedness in Functions

Example:

If f(x)=ex cox (What does this mean?)

Example:

around = 1 it is ill-

conditioned

9/18/2017 15

Numerical Instability

Numerical instability is a measure of how a rounding error is effective on the

result of a calculation.

Example:

Let us perform the calculation with 6-digit arithmetic

However, 6-digit arithmetic gives f(12345)=0.005 !!

Caution: The co of the function is around 0.5. This can be validated by assigning

an arbitrary value to x. However, we are not dealing with this but the effect of

the rounding in the mathematical operations on the result!

If we treat the function as F(t)=a-t, when ta, the result goes to zero. The

conditionedness of the function F(t) can be obtained as |t/t-a)|. When t a the

conditionedness goes to infinity which means that a small change in t will make

a large difference in the result.

9/18/2017 16

Truncation errors

Arises from the use of finite series instead of

infinite ones

Infinite: Finite:

9/18/2017 17

Truncation errors

Let us recall Taylor expansion and error formula

within [x,x0]:

n

f i x0

f x x x0 Rn x

i

i 0 i!

f n 1

Rn x x x0

n 1

; x0 x or x x0 ;

n 1 !

9/18/2017 18

Discretisation Errors

GCI (grid convergence index)

characteristic mesh

size

>1.3 is advised.

of the discretisation method:

9/18/2017 19

Discretisation Errors

GCI (grid convergence index)

The extrapolated values can be calculated.

mesh

9/18/2017 20

Discretisation Errors

GCI (grid convergence index)

Sample Calculations

9/18/2017 21

INTERPOLATION

Exact Approaches

9/18/2017 22

INTERPOLATION

-Exact Approaches-

The problem is to find a P(x) function that exactly

satisfies the values of f(x) at the discrete points xi

(P(xi)=f(xi)).

in the closed interval [a,b], then, there exists a

polynomial function, Pn(x), of degree n, such that:

f ( x) Pn ( x) , n n( )

9/18/2017 23

INTERPOLATION

-Exact Approaches-

Basically, the exact approaches have three

different versions:

Newtons divided-difference polynomials

Lagrange polynomials

Finite-difference polynomials (for equidistant

nodes)

9/18/2017 24

INTERPOLATION

-Exact Approaches-

-Divided-difference polynomials-

o f x Pn x Rn x

o Pn x f x0 x x0 f x1 , x0 x x0 x x1 f x2 , x1 , x0

x x0 x x1 x x2 f x3 , x2 , x1 , x0

x x0 x x1 x xn 1 f xn , xn 1 , , x1 , x0

o Rn x x x0 x x1 x xn f x, xn , xn 1 , , x1 , x0

x0 x xn

n f n 1

Rn x x xi , x, xn , xn 1 , , x0

o

i 0 n 1 !

9/18/2017 25

INTERPOLATION

-Exact Approaches-

-Divided-difference polynomials-

f x1 f x0

o

f x1 , x0 f x0 , x1

x1 x0

f x2 , x1 f x1 , x0

o f x2 , x1 , x0 f x1 , x0 , x2 f x0 , x2 , x1

x2 x0

o f x , x , , x f xn , xn 1 , , x1 f xn 1 , xn 2 , , x1 , x0

n 1

xn x0

n 0

9/18/2017 26

INTERPOLATION

-Exact Approaches-

-Lagrange Polynomials-

f x Pn x Rn x

n

Pn x Li x f xi

i 0

Li x

x x0 x x1 x xi 1 x xi 1 x xn

xi x0 xi x1 xi xi 1 xi xi 1 xi xn

L x

xx

n

j

i

x x

j 0 i j

f n 1

j i

n

Rn x x xi , x, x0 , x1 , , xn

i 0 n 1 !

9/18/2017 27

INTERPOLATION

-Exact Approaches-

-Lagrange Polynomials-

Lagrange polynomials are in fact obtained from divided-

difference polynomials. For example:

P2 x f x0 x x0 f x1 , x0 x x0 x x1 f x2 , x1 , x0

P2 x

9/18/2017 28

INTERPOLATION

-Exact Approaches-

-Finite-Difference Polynomials-

Forward differences

Backward differences

Central differences

9/18/2017 29

INTERPOLATION

-Exact Approaches-

-Finite-Difference Polynomials - Forward Differences-

E f xi f xi h f ( xi 1 )

f x f xi 1 f xi

The relationship with the shift

operator and the forward

difference operator is defined

E 1

n n in this manner.

9/18/2017 30

INTERPOLATION

-Exact Approaches-

-Finite-Difference Polynomials - Forward Differences-

f x Pn x Rn x

with

x x0

h

1 1 2 1 2 n 1

Pn f 0 f 0 2 f 0 3 f 0 n f 0

2! 3! n!

n

!

Pn x0 h i f 0

i 0 i !i!

1 2 n 1 2 n

Rn x0 h h n 1 f ( n 1) ( ) n 1 f 0

n 1! n 1!

9/18/2017 31

INTERPOLATION

-Exact Approaches-

-Finite-Difference Polynomials Backward Differences-

E f xi f xi h f ( xi 1 )

the shift operator and

the backward difference

1 E

n

1 n operator is defined in

this manner.

9/18/2017 32

INTERPOLATION

-Exact Approaches-

-Finite-Difference Polynomials Backward Differences-

f x Pn x Rn x

with

x x0

h

1 1 2 n 1

Pn f 0 f 0 2 f0 n f0

2! n!

f n 1

Rn 1 n h n 1 ; x n x0

(n 1)!

n ( f 0 )

Rn 1 n

(n 1)!

9/18/2017 33

INTERPOLATION

-Exact Approaches-

-Finite-Difference Polynomials Central Differences-

E f xi f xi h f ( xi 1 )

the shift operator and

the central difference

E

n 1/ 2

E

1 / 2 n operator is defined in

this manner.

9/18/2017 34

INTERPOLATION

-Exact Approaches-

-Finite-Difference Polynomials Central Differences-

Different formulations may be used.

For instance, by using Gauss forward central difference polynomial:

f x Pn x Rn x

with

x x0

h

1 1 1

f f x0 f x0 h 2 f x0

2

3 f x0 h 2

2! 3!

n ( f1/ 2 )

Rn 1 (n 1) n is even

(n 1)!

n ( f 0 )

Rn 1 1 (n 1) n is odd

(n 1)!

9/18/2017 35

INTERPOLATION

- Approximate Approaches- Least Squares

The squares of the error should be calculated:

2

N 2 N

n

E Pn xi f xi a j xi f xi

j

i 0 i 0 j 0

The coefficients aj of the polynomial that makes the error minimum is to

be found:

E

0

a j

standard deviation.

9/18/2017 36

INTERPOLATION

- Piecewise Approaches- Spline Interpolation

Third-order polynomials are to be

produced for all sections

For natural spline, at the boundaries:

Si-1(ti)=Si(ti)

S(ti-1)=S(ti+n)=z1=zn=0

Si-1(ti)=Si(ti)

(hi=ti+1-ti)

and we obtain:

9/18/2017 37

INTERPOLATION

- Piecewise Approaches- Spline Interpolation

An equation system is obtained and the second derivatives zis can be

found.

h=max|xi+1 -xi|

9/18/2017 38

- EMPIRICAL WAVELET TRANSFORMUploaded byChristo Jacob K
- 9 2PostUploaded byeperla
- ShortcutsUploaded byarunmohan1234
- Ch5 Fourier SeriesUploaded byTold Told Leung
- New Hptu Syllabus CSEUploaded byerankursharma1985
- Almog, Joseph - Nothing, Something, InfinityUploaded byCarlos Romero
- BRT ToutorialUploaded byAsem A. Hassan
- Acad CommandUploaded byPatar Pangaribuan
- Sands Sup3Uploaded bysharmilaiyer
- W11_16C1_lec_2_23&25_11Uploaded byZbigg
- Finite Element Method_chapter4Uploaded byNalaka Santhajeewa
- ftoeUploaded byway12go
- academic resume 1Uploaded byapi-443361467
- ECM6Lecture14cVietnam_2014.npdfUploaded byduyvu
- Chapter10 Function of MatixUploaded byAliAlMisbah
- BTech-Course_Outline Math II (1MT3) W2015Uploaded byRyan Andrews
- Mathematical Supplement Part iUploaded bycastrojp
- 01530224Uploaded byHany ElGezawy
- 4 Point Teaching - MOTOMANUploaded byAndré Lucas Monteiro
- Lot SIzeUploaded bymukesh
- IJETR022929Uploaded byerpublication
- V8Uploaded bypropernoun
- subodh surface rougnss file.pdfUploaded bysubodhceb
- MCSE004 Dec2013 SolutionUploaded byajay
- Tutorial InterpolateUploaded byMichael Fadjar
- s ChangeUploaded byRohitMadke
- Data Analysis and Graphing JrwUploaded bypranab
- ECE421_The Newton Polynomial InterpolationUploaded byjames Principe
- Limitsand ContinuityUploaded byEdwin S. Dagunot
- Métodos Numéricos para a Engenhauria, uma Introdução ao MATLAB - Vergílio T. S. Del ClaroUploaded byAdauto Alves

- The Internal Combustion Engine (Modelling Estimation and Control Issues)Uploaded byANIAPIERONI
- trozziUploaded bydenizinak
- 1993 Book Non ThermalPlasmaTechniquesFor 2Uploaded bydenizinak
- 2008 Book PlasmaAssistedDecontaminationOUploaded bydenizinak
- Kerwin NotesUploaded bydenizinak
- Kerwin_notes Hydrofoils and PropellersUploaded bymcrahan
- 7 - YL ODE_Multistep 2017Uploaded bydenizinak
- 7 - YL ODE_Onestep 2017Uploaded bydenizinak
- 8 - YL ODE_BVP 2017Uploaded bydenizinak
- 2 - YL Numerical Differentiation 2017Uploaded bydenizinak
- Applied Numerical Analysis 7Ed - Curtis F. Gerald, Patrick O. Wheatley - Solutions ManualUploaded byPaul Gallegos
- Furore Road MapUploaded bydenizinak

- Algebra_elemental(VOLIII).pdfUploaded byfugaperu
- 01. Math Practice ExamUploaded byoceanolive2
- Lattice Based Tools in Cryptanalysis for Public Key CryptographyUploaded byAIRCC - IJNSA
- Lab 1Uploaded byYJohn88
- AP Calc BC Study Guide/Formula SheetUploaded byannalie3
- MCS-031 Solved Assignment 2015-16Uploaded bysatisch
- Math 080 Final-exam Review 04-2017Uploaded byNomad1971
- FoliationsUploaded byJama Hana
- Maths Revision Notes 3Uploaded byMADHAVI BARIYA
- GeomMech2-2ndUploaded bymlouredocasado
- Seminario Felipe SlidesUploaded byGuillermo Fresco
- Ma 102 Lecture Notes 9Uploaded byShubhamMittal
- vornoi FDMUploaded byAnkur Bhatnagar
- Algebra Homework Set 7 Hung Tran. 8.3.11 (⇒) Suppose RUploaded bythp343
- Process Dynamics and Control SolutionsUploaded byciotti6209
- Optimal control matlabUploaded byMarcus Macêdo
- Spatial FilteringUploaded byAnonymous 0L2mVaI
- Kendali_Optimal.pptxUploaded byRiky Fitriadi
- unit 4567 big ideasUploaded byapi-321572202
- 2nd Quarter Exam Math IVUploaded byAlfredo L. Cariaso
- Defence PresentationUploaded byrajesh g
- Trigonometric Functions Problem Solving ApproachUploaded byheatingboiler
- 1Uploaded bySanjay Gupta
- B-Spline-2DUploaded byIngJosephFlores
- Lecture 5 (Signal-Flow-Graphs).pdfUploaded byMomenNaeem
- DSPA kk parhi Solution Manual Chap7Uploaded byNESEGA
- DXPUploaded bySakthivel Srini
- Generalized Single Valued Triangular Neutrosophic Numbers and Aggregation Operators for Application to Multi-attribute Group Decision MakingUploaded byAnonymous 0U9j6BLllB
- IMP harvard.pdfUploaded byTalha Mir
- 3. Arithmetic Operators, Expressions, and Assignment.pdfUploaded byOnny Khaeroni

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.