1 views

Original Title: 1 - YL Error Analysis and Interpolation - 2017

Uploaded by denizinak

- calcule_spline
- ANM CO PO PSO
- Is Language Infinite
- Vo2 Plateau Detection in Cycle Ergometry
- Tomos_Roberts.pdf
- Chapter 19
- RF-hwrf-2246
- maximaNotes9_Solver.pdf
- special
- exp2
- agri statistics
- kriging 1_3
- Finite Difference Method Using MATLAB
- GB CaseStudy T6
- 2017 Fee Schedule for permits
- Chapter 2
- ernest article
- Math g4 m1 End of Module Assessment
- Fourier 11
- Num Exam Questions

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

- calcule_splineUploaded byAna-Maria Ionita
- ANM CO PO PSOUploaded byAvinash Dholiwal
- Is Language InfiniteUploaded byManuel Jossias
- Vo2 Plateau Detection in Cycle ErgometryUploaded byVladimir Atanasov
- Tomos_Roberts.pdfUploaded byNUrul Aqilah Mus
- Chapter 19Uploaded bySaied Aly Salamah
- RF-hwrf-2246Uploaded byBhumi Bhatt
- maximaNotes9_Solver.pdfUploaded byyjlee123
- specialUploaded byapi-289794975
- exp2Uploaded bymoheldeenhijazi
- agri statisticsUploaded byOliver Talip
- kriging 1_3Uploaded bySunil Duwal
- Finite Difference Method Using MATLABUploaded byhawar2011
- GB CaseStudy T6Uploaded byMohammad Rasem Almasri
- 2017 Fee Schedule for permitsUploaded byMud Pye
- Chapter 2Uploaded byNorhawa Izani
- ernest articleUploaded byapi-281093780
- Math g4 m1 End of Module AssessmentUploaded byRuselle N. Navarro
- Fourier 11Uploaded byantonioch12
- Num Exam QuestionsUploaded bySamuel Mawutor Gamor
- Homework1 SolutionsUploaded byabhijeet
- Lecture 4Uploaded bySrikanth Nalla
- comp3Uploaded bymonu991
- Shoe LastdesignexplorationandcustomizationUploaded byAndika Surya
- Lecture 1Uploaded byhemanttgm
- HW4_fall_2017Uploaded byjeremy
- 2224-hw3Uploaded byTom Davis
- Fejer TheoremUploaded byVishal Nair
- complez analysisUploaded byargie2002
- complxanal z65Uploaded byJacecosmoz

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

- Simultaneous Determination of Salicylic Acid and Acetylsalicylic AciUploaded byiabureid7460
- Chambers AbsorberUploaded byasdsd
- Laboratory Exercises in General Chemistry, Semishin, Peace PublishersUploaded byRadhakrishnan Sreerekha
- Characterisation of System Performance of GPS Antennas in Mobile Terminals Including Enviornmenttal EffectsUploaded byJon Himes
- Passing Ship Effects CSLD 2002Uploaded byPeyman Mzn
- Prestressed-Concrete Analysis And Design By Naaman.epubUploaded byJazmìn Carolina Almache
- Fg Wilson p180p2 p200e2Uploaded byAngga Clevnezt
- 3--- K. J. Balkus. Chem. Educ. 68, 875, 1991Uploaded byGabriel Chaves
- Griffiths Errata.. Introduction to quantum mechanics, 1st ed. (2000) 1995Uploaded byrafael_pazin5105
- saaty1993Uploaded byCarito Standen
- Activated Carbons Prepared From Phosphoric Acid Activation of Grain SorghumUploaded byandresmilquez
- Latvia Civil Engineering 2011Uploaded byDaniel Rangel
- Solver ControlUploaded byHelen Hamoudi
- Characterization and Magnetic Properties of Nickel Ferrite Nanoparticles Prepared by Ball Milling TechniqueUploaded bysayantan2210
- Ohm's LawUploaded byAlyssa Karla Nortez Apura
- agkrizi_2Uploaded byΈνκινουαν Κόγκ Αδάμου
- Single+Laboratory+ValidationUploaded byMarcos Loredo
- D3237.pdfUploaded byKu Bon
- 05 Phi-c Reduction and Comparison With Bishops MethodUploaded byMihai Zaharia
- MR DAMPERUploaded bybalakarn
- fire pump CLUploaded byFakhreddine Zahi
- Field Development PlanningUploaded byShek Gh
- hp 48gII user's guide EnglishUploaded bySean Ma
- StrainUploaded bywahyusyah25
- Design of Small Centrifugal Compressors Performance Test FaciltityUploaded byalexandreburan
- Y6/AS Physics final exam 11_12 Unit 1_answersUploaded byPaul Burgess
- Equality and Operation on MatricesUploaded byHy Lau
- SERV1813Uploaded byroyert80
- DLRC Chemistry 16 Comprehensive Samplex for Long Exam 2Uploaded bykate_acama
- J. Lehman - Essential DignitiesUploaded byAdrian Lucian Moldovan