380 likes | 393 Views
Chem 302 - Math 252. Chapter 3 Interpolation / Extrapolation. Interpolation / Extrapolation. Experimental data at discrete points Need to know the dependent variable at a value of the independent variable that was not measured
E N D
Chem 302 - Math 252 Chapter 3Interpolation / Extrapolation
Interpolation / Extrapolation • Experimental data at discrete points • Need to know the dependent variable at a value of the independent variable that was not measured • Need to know what value of the independent variable gives a particular value of the dependent variable • Point is within range of experimental data then called interpolation • Point is outside range of experimental data then call extrapolation • Same techniques • Extrapolation more risky
Linear Interpolation • Assume data varies linearly between 2 points • Connect-the-dots
Linear Interpolation – Viscosity of Water Find at 25 °C Exp 25 =8.937 mP
Linear Interpolation – Viscosity of Water ln() vs 1/T nearly linear
Linear Interpolation – Viscosity of Water Find at 25 °C Exp 25 =8.937 mP
Linear Interpolation – Heat Capacity of Benzene Find C at 220, 250 & 270 K Find C at 20 K Exp C20 = 8.4 J/K
Quadratic Interpolation • Assume data is quadratic between 3 points
Quadratic Interpolation Do it !
Quadratic Interpolation – Viscosity of Water Find at 25 °C Exp 25 =8.937 mP
Quadratic Interpolation – Viscosity of Water Find at 25 °C Using points 2,3,4 Using points 3,4,5 Exp 25 =8.937 mP
Quadratic Interpolation – Heat Capacity of Benzene Find C at 20, 220, 250 & 270 K
Lagrangian Interpolation • Generalization of linear & quadratic interpolations • Uses nth order polynomial & n+1 points Unique solution
Other Interpolation Functions • Does not have to be a power series • Methods are same as Lagrangian Interpolation • Usually 2nd order (quadratic) or 3rd order (cubic) Lagrangian interpolation is sufficient
Lorentzian Interpolation • Uses Lorentzian lineshape Peak height – A Peak Position – x0 Full Width at Half Height (FWHH) – 2/B 3 three points (usually three at top of peak)
Lorentzian Interpolation Quadratic interpolation on 1/y
Magnitude-Lorentzian Interpolation Uses square root of Lorentzian lineshape Peak height – A1/2 Peak Position – x0 Full Width at Half Height (FWHH) – 3 three points (usually three at top of peak)
Magnitude-Lorentzian Interpolation Quadratic interpolation on 1/y
KCe Interpolation Based on Lorentzian & Magnitude-Lorentzian e = 1 – quadratic e = -1 – Lorentzian e = -1/2 – Magnitude-Lorentzian Optimized e for different lineshapes (mostly used in FTICR-MS) Keefe, Comisarow, App. Spectrosc. 44, 600 (1990)
Magnitude-Lorentzian Interpolation Quadratic interpolation on y-e
Gaussian Interpolation Based on Gaussian lineshape Peak height – A Peak Position – x0 Full Width at Half Height (FWHH) –
Gaussian Interpolation Can be converted to form Quadratic interpolation on lny
Find Peak Position & Height • Use various interpolation functions to find peak position and height • Determine interpolation function (top 3, 5 or 7 points) • Differentiate interpolation function and find root (i.e. find location max) - position • Evaluate interpolation function at peak position (height) 1034.6 0.73050 1035.1 0.75487 1035.5 0.76894 1036.0 0.77183 1036.5 0.75979 1037.0 0.73585 1037.5 0.69860 Seven Highest points
Find Peak Position & Height Quadratic Interpolation
Find Peak Position & Height Comparison of Interpolation Methods
Spline Interpolation • So far methods have used a moving window of subset of data • May be discontinuous at edges of windows • Causes jagged plots • Spline interpolation forces slopes (and in some cases higher derivatives) to match at edges of windows • Creates smooth plots
Cubic Spline with Slope Matching Value of x such that x2 < x < x3 p(x) forced to pass through (x2,y2) & (x3,y3) p(x) forced to match slopes at (x2,y2) & (x3,y3)
Cubic Spline with Slope Matching Approximate slopes
Cubic Spline with Slope Matching • Between 1st and last pair of points • Can set slopes = 0 • Natural spline • Good if data is flat at extremes • Can set • Useful if slope is basically constant • Can extrapolate using closest region • Can set