14
http:// numericalmethods.eng.usf.edu 1 Direct Method of Interpolation Chemical Engineering Majors Authors: Autar Kaw, Jai Paul http://numericalmethods.eng.u sf.edu Transforming Numerical Methods Education for STEM Undergraduates

Direct Method of Interpolation

Embed Size (px)

DESCRIPTION

Direct Method of Interpolation. Chemical Engineering Majors Authors: Autar Kaw, Jai Paul http://numericalmethods.eng.usf.edu Transforming Numerical Methods Education for STEM Undergraduates. Direct Method of Interpolation http://numericalmethods.eng.usf.edu. What is Interpolation ?. - PowerPoint PPT Presentation

Citation preview

Page 1: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu 1

Direct Method of Interpolation

Chemical Engineering Majors

Authors: Autar Kaw, Jai Paul

http://numericalmethods.eng.usf.eduTransforming Numerical Methods Education for STEM

Undergraduates

Page 2: Direct Method of Interpolation

Direct Method of Interpolation

http://numericalmethods.eng.usf.edu

Page 3: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu3

What is Interpolation ?Given (x0,y0), (x1,y1), …… (xn,yn), find the value of ‘y’ at a value of ‘x’ that is not given.

Figure 1 Interpolation of discrete.

Page 4: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu4

Interpolants

Polynomials are the most common choice of interpolants because they are easy to:

Evaluate Differentiate, and Integrate

Page 5: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu5

Direct MethodGiven ‘n+1’ data points (x0,y0), (x1,y1),………….. (xn,yn),pass a polynomial of order ‘n’ through the data as

given below:

where a0, a1,………………. an are real constants. Set up ‘n+1’ equations to find ‘n+1’ constants. To find the value ‘y’ at a given value of ‘x’, simply

substitute the value of ‘x’ in the above polynomial.

.....................10n

nxaxaay

Page 6: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu6

Example To find how much heat is required to bring a kettle of water to its boiling

point, you are asked to calculate the specific heat of water at 61°C. The specific heat of water is given as a function of time in Table 1. Use linear, quadratic and cubic interpolation to determine the value of the specific heat at T = 61°C.

Table 1 Specific heat of water as a function of temperature.

Figure 2 Specific heat of water vs. temperature.

Temperature, Specific heat,

22425282

100

41814179418641994217

CT

Ckg

JpC

Page 7: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu7

Linear Interpolation

Solving the above two equations gives,

Hence

TaaTC p 10

41865252 10 aaC p

41998282 10 aaC p

5.41630 a 43333.01 a

.8252,43333.05.4163 TTTC p 6143333.05.416361 pC

Ckg

J

9.4189

50 60 70 80 904185

4190

4195

42004.199 10

3

4.186 103

y s

f range( )

f x desired

x s1

10x s0

10 x s range x desired

Page 8: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu8

Quadratic Interpolation

Solving the above three equations gives

Quadratic Interpolation

2210 TaTaaTC p

0.41350 a 3267.11 a 32 106667.6 a

4199828282

4186525252

4179424242

2210

2210

2210

aaaCp

aaaCp

aaaCp

Page 9: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu9

Quadratic Interpolation (contd)

8242

10666763267104135 23

T

,T.T..TC p

Ckg

J

...C p

2.4191

61106667661326710413561 23

40 45 50 55 60 65 70 75 80 854175

4180

4185

4190

4195

42004.199 10

3

4.179 103

y s

f range( )

f x desired

8242 x s range x desired

%030063.01002.4191

9.41892.4191

a

The absolute relative approximate error obtained between the results from the first and second order polynomial is

Page 10: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu10

Cubic Interpolation 3

32

210 TaTaTaaTC p

4217100100100100

419982828282

418652525252

417942424242

33

2210

33

2210

33

2210

33

2210

aaaaCp

aaaaCp

aaaaCp

aaaaCp

0.40780 a 4771.41 a 062720.02 a 43 101849.3 a

Page 11: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu11

Cubic Interpolation (contd)

40 50 60 70 80 90 1004170

4180

4190

4200

4210

42204.217 10

3

4.179 103

y s

f range( )

f x desired

10042 x s range x desired

10042

,101849.306272.04771.44078 342

T

TTTTCp

Ckg

J.

...T

04191

611018493610627206144714407861 342

%027295.01000.4190

2.41910.4190

a

The absolute relative approximate error obtained between the results from the first and second order polynomial is

Page 12: Direct Method of Interpolation

http://numericalmethods.eng.usf.edu12

Comparison Table

Order of Polynomial

1 2 3

TC p Ckg

J

9.4189 2.4191 0.4190

Absolute Relative Approximate Error

---------- %030063.0 %027295.0

Page 13: Direct Method of Interpolation

Additional ResourcesFor 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/direct_method.html

Page 14: Direct Method of Interpolation

THE END

http://numericalmethods.eng.usf.edu