Introduction to Interpolation A shortcoming of Taylor polynomial is that the higher-order derivatives must be known,and often they are either not available or they are lard to compute. ■ Suppose that the functionf(x)is known at the N+1 points (xoo), (),...,(N N),where the values xk are spread out over the interval [a,b] and satisfy asxox<...<xv<b,and yfx). A polynomial P(x)of degree N will be constructed that passes through these N+1 points. In the construction,only the numerical values xk and yk are needed.Hence the higher-order derivatives are not necessary. 华南师范大学数学科学学院谢卿玲
Introduction to Interpolation ◼ A shortcoming of Taylor polynomial is that the higher-order derivatives must be known, and often they are either not available or they are lard to compute. ◼ Suppose that the function y=f (x) is known at the N+1 points (x0 ,y0 ), (x1 ,y1 ),…,(xN,yN), where the values xk are spread out over the interval [a,b] and satisfy a≤x0<x1<…<xN≤b, and yk=f(xk ). A polynomial P(x) of degree N will be constructed that passes through these N+1 points. ◼ In the construction, only the numerical values xk and yk are needed. Hence the higher-order derivatives are not necessary. 华南师范大学数学科学学院 谢骊玲
Introduction to Interpolation-Cont. Use the known N+1 points'coordinates (xo-o),(),...,(XNN) to establish a linear system of the coefficients ak (k-0,...,N)of the polynomial P(x),and solve the system to obtain the polynomial P(x)which interpolates the known points. This method for finding the coefficients is mathematically sound,but sometimes the matrix is difficult to solve accurately. Interpolation means to estimate a missing function value by taking a weighted average of known function values at neighboring points 华南师范大学数学科学学院谢删玲
Introduction to Interpolation-Cont. ◼ Use the known N+1 points’ coordinates (x0 ,y0 ), (x1 ,y1 ),…,(xN ,yN ) to establish a linear system of the coefficients ak (k=0,…,N) of the polynomial PN (x), and solve the system to obtain the polynomial PN (x) which interpolates the known points. ◼ This method for finding the coefficients is mathematically sound, but sometimes the matrix is difficult to solve accurately. ◼ Interpolation means to estimate a missing function value by taking a weighted average of known function values at neighboring points. 华南师范大学数学科学学院 谢骊玲
Linear Interpolation A linear interpolant passes through two given points (x)and (xy), with the form f(x)=b。+b(x-xo) ”低西) where b。=f(xo) f() b=f()-f(xo) 依%) X1-Xo fi(x)can be written as a slightly different form as follow: y=f(x)=yo *必利 x-Xo Lagrange linear interpolating polynomial X0-X1 华南师范大学数学科学学院谢玲
Linear Interpolation ◼ A linear interpolant passes through two given points and with the form where ( , ) 0 0 x y ( , ), 1 1 x y ( ) ( ) 1 0 1 0 f x = b + b x − x ( ) 0 0 b = f x 1 0 1 0 1 ( ) ( ) x x f x f x b − − = 华南师范大学数学科学学院 谢骊玲 f1 (x) can be written as a slightly different form as follow: 1 0 1 0 1 0 1 1 0 ( ) x x x x y f x y y x x x x − − = = + − − Lagrange linear interpolating polynomial
Example The path of a rapid laser is given by these specifications. If the laser is traversing from x=2 to x=4.25 in a linear path,find the value of y at x=4 using the above method. x (m) y(m) Path of a robot 2 7.2 4.25 7.1 7 6 5.25 6 4 7.81 5 2 9.2 3.5 0 0 10.6 5 华南师范大学数学科学学院谢细玲
Example ◼ The path of a rapid laser is given by these specifications. ◼ If the laser is traversing from x = 2 to x = 4.25 in a linear path, find the value of y at x = 4 using the above method. Path of a robot 0 1 2 3 4 5 6 7 8 0 5 10 15 X Y x (m) y (m) 2 7.2 4.25 7.1 5.25 6 7.81 5 9.2 3.5 10.6 5 华南师范大学数学科学学院 谢骊玲
Linear Interpolation y=f(x)=Y ox-x+y X-0 2.18 0-X1 X1-X0 1u6 0●● x=2.00,y(x0)=7.2 f(range) 7.14 XX x1=4.25,y(x1)=7.1 y=(x)=7.2 x-4.25 +7.1 x-2 -l0 2-4.25 4.25-2 =-0.0444x+7.2889 At x=4, (2.00≤x≤4.25) f(4.00)=-0.0444×4+7.2889=7.1113im). 华南师范大学数学科学学院谢卿玲
Linear Interpolation 5 0 5 10 7.08 7.1 7.12 7.14 7.16 7.18 7.2 7.2 7.1 y s f(range) f(x desired) x s 1 x s +10 0 −10 x s range x desired 1 0 1 0 1 0 1 1 0 ( ) x x x x y f x y y x x x x − − = = + − − 2.00, x0 = y(x0 ) = 7.2 4.25, x1 = y(x1 ) = 7.1 1 4.25 2 ( ) 7.2 7.1 2 4.25 4.25 2 0.0444 7.2889 x x y f x x − − = = + − − = − + (2.00≤ x ≤4.25) 华南师范大学数学科学学院 谢骊玲 At x = 4, (4.00) 0.0444 4 7.2889 7.1113( ). 1 f = − + = in