Numerical Methods.  Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain.

Slides:



Advertisements
Similar presentations
Selected from presentations by Jim Ramsay, McGill University, Hongliang Fei, and Brian Quanz Basis Basics.
Advertisements

Chapter 18 Interpolation The Islamic University of Gaza
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
1 Curve-Fitting Spline Interpolation. 2 Curve Fitting Regression Linear Regression Polynomial Regression Multiple Linear Regression Non-linear Regression.
EARS1160 – Numerical Methods notes by G. Houseman
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
Curve-Fitting Interpolation
Direct Method of Interpolation
Curve Fitting and Interpolation: Lecture (II)
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 23 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 24 Regression Analysis-Chapter 17.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 181 Interpolation.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Interpolation Chapter 18.
Chapter 6 Numerical Interpolation
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 21 CURVE FITTING Chapter 18 Function Interpolation and Approximation.
8/15/ Differentiation-Discrete Functions Major: All Engineering Majors Authors: Autar Kaw, Sri Harsha Garapati.
CpE- 310B Engineering Computation and Simulation Dr. Manal Al-Bzoor
CSE 330 : Numerical Methods
Reading Between the Lines
1 Trapezoidal Rule of Integration. What is Integration Integration: The process of measuring the area under a function.
1 Interpolation. 2 What is Interpolation ? Given (x 0,y 0 ), (x 1,y 1 ), …… (x n,y n ), find the value of ‘y’ at a.
1 Lagrangian Interpolation Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
Today’s class Spline Interpolation Quadratic Spline Cubic Spline Fourier Approximation Numerical Methods Lecture 21 Prof. Jinbo Bi CSE, UConn 1.
Polynomial Interpolation You will frequently have occasions to estimate intermediate values between precise data points. The function you use to interpolate.
Numerical Methods For Slides Thanks to Lecture 6 Interpolation
Quadratic Spline Interpolation Part 1 of 2
1 Newton’s Divided Difference Polynomial Method of Interpolation Major: All Engineering Majors Authors: Autar Kaw,
Trapezoidal Rule of Integration
CHAPTER 3 NUMERICAL METHODS
CSE 330 : Numerical Methods Lecture 15: Numerical Integration - Trapezoidal Rule Dr. S. M. Lutful Kabir Visiting Professor, BRAC University & Professor.
Lecture 22 Numerical Analysis. Chapter 5 Interpolation.
Computers in Civil Engineering 53:081 Spring 2003 Lecture #15 Spline Interpolation.
KFUPM SE301: Numerical Methods Topic 5: Interpolation Lectures 20-22:
Lecture 16 - Approximation Methods CVEN 302 July 15, 2002.
Jump to first page Chapter 3 Splines Definition (3.1) : Given a function f defined on [a, b] and a set of numbers, a = x 0 < x 1 < x 2 < ……. < x n = b,
Computer Programming (TKK-2144) 13/14 Semester 1 Instructor: Rama Oktavian Office Hr.: M.13-15, W Th , F
1 Direct Method of Interpolation Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
Kinematics in One Dimension
1 INTERPOLASI. Direct Method of Interpolation 3 What is Interpolation ? Given (x 0,y 0 ), (x 1,y 1 ), …… (x n,y n ), find the value of ‘y’ at a value.
1 Spline Interpolation Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
1 Chapter 4 Interpolation and Approximation Lagrange Interpolation The basic interpolation problem can be posed in one of two ways: The basic interpolation.
Interpolation - Introduction
1 Approximating functions, polynomial interpolation (Lagrange and Newton’s divided differences) formulas, error approximations.
11/22/ Differentiation-Discrete Functions.
Derivatives in physics.
Introduction to Numerical Methods Mathematical Procedures
Chapter 7 Numerical Differentiation and Integration
Curve-Fitting Spline Interpolation
1. 2 What is Integration? Integration The process of measuring the area under a curve. Where: f(x) is the integrand a= lower limit of integration b=
Interpolation.
Interpolation Estimation of intermediate values between precise data points. The most common method is: Although there is one and only one nth-order.
Chapter 18.
Differentiation-Discrete Functions
Reading Between the Lines
Spline Interpolation Method
Chapter 3 Section 4.
Chapter 18.
Spline Interpolation Method
Spline Interpolation Method
INTERPOLASI.
Why Splines ?
Numerical Computation and Optimization
Splines There are cases where polynomial interpolation is bad
Direct Method of Interpolation
SKTN 2393 Numerical Methods for Nuclear Engineers
Numerical Computation and Optimization
Reading Between the Lines
Newton’s Divided Difference Polynomial Method of Interpolation
Lagrangian Interpolation
Presentation transcript:

Numerical Methods

 Polynomial interpolation involves finding a polynomial of order n that passes through the n+1 points.  Several methods to obtain such a polynomial include the direct method, Lagrangian interpolation method and Newton’s divided difference polynomial method.  Actually, when n becomes large, in many cases, one may get oscillatory behavior in the resulting polynomial.  This was shown by Runge when he interpolated data based on a simple function of on an interval of [–1, 1]. 2

 For example, take six equidistantly spaced points in [–1, 1] for the given function and find y’s at these points as given in Table 1. 3 x – – –

 Now through these six points, one can pass a fifth order polynomial [where,-1<x<1]  On plotting the fifth order polynomial (Figure in the next slide) and the original function, one can see that the two do not match well  One may consider choosing more points in the interval [– 1, 1] to get a better match, but it diverges even more (see Figure in other slide), where 20 equidistant points were chosen in the interval [–1, 1] to draw a 19th order polynomial 4

5

6

 So what is the answer to using information from more data points, but at the same time keeping the function true to the data behavior?  The answer is in spline interpolation. The most common spline interpolations used are linear, quadratic, and cubic splines. 7

 Given (x0,y0), (x 1, y 1 ), (x 2, y 2 )......(x n,y n ), fit linear splines (Figure below) to the data. This simply involves forming the consecutive data through straight lines. So if the above data is given in an ascending order, the linear splines are given by y i =f(x i ) 8 (x 0, y 0 ) (x 1, y 1 ) (x 2, y 2 ) (x 3, y 3 ) x y

Note the term in the above function are simply slopes between x i and x i+1 At the interior points of the data, the slope changes abruptly. This means that the first derivative is not continuous at these points So how do we improve on this? We can do so by using quadratic splines

 In these splines, a quadratic polynomial approximates the data between two consecutive data points.  Given, fit quadratic splines through the data. The splines are given by So how does one find the coefficients of these quadratic splines? There are such coefficients

 To find unknowns, one needs to set up equations and then simultaneously solve them. These equations are found as follows.  1. Each quadratic spline goes through two consecutive data points  This condition gives 2n equations as there are n quadratic splines going through two consecutive data points 11

 2. The first derivatives of two quadratic splines are continuous at the interior points. For example, the derivative of the first spline is equal to that of the second spline at x=x 1, so at x=x 2  Similarly at other interior points

 Since there are (n-1) interior points, we have (n-1) such equations. So far, the total number of equations is (2n)+(n-1) = (3n-1) equations. We still then need one more equation.  We can assume that the first spline is linear, that is a 1 =0  This gives us 3n equations and 3n unknowns. These can be solved by a number of techniques used to solve simultaneous linear equations. 13

 The upward velocity of a rocket is given as a function of time as 14 (s) (m/s) a)Determine the value of the velocity at t = 16 seconds using quadratic splines. b) Using the quadratic splines as velocity functions, find the distance covered by the rocket from t=11 s to t=16 s. c) Using the quadratic splines as velocity functions, find the acceleration of the rocket at t=16 s.

 a) Since there are six data points, five quadratic splines pass through them. v(t)=a 1 t 2 +b 1 t+c 1 ; 0<t<10 v(t)=a 2 t 2 +b 2 t+c 2 ; 10<t<15 v(t)=a 3 t 2 +b 3 t+c 3 ; 15<t<20 v(t)=a 4 t 2 +b 4 t+c 4 ; 20<t<22.5 v(t)=a 5 t 2 +b 5 t+c 5 ; 22.5<t<30  The equations are found as follows  Each quadratic Spline passes through two consecutive data points and quadratic splines have continuous derivative at interior data points and finally assume a 1 =0 15

The fifteen number of equations are  c 1 =0..……. (1)  100a 1 +10b 1 +c 1 =227.04………. (2)  100a 2 +10b 2 +c 2 =227.04………. (3)  225a 2 +15b 2 +c 2 =362.78………. (4)  225a 3 +15b 3 +c 3 =362.78………. (5)  400a 3 +20b 3 +c 3 =517.35………. (6)  400a 4 +20b 4 +c 4 =517.35………. (7)  506a b 4 +c 4 =602.97………. (8) 16  506a b 5 +c 5 =602.97….(9)  900a 5 +30b 5 +c 5 = ….(10)  20a 1 +b 1 -20a 2 -b 2 =0 …..(11)  30a 2 +b 2 -30a 3 -b 3 =0.…...(12)  40a 3 +b 3 -40a 4 -b 4 =0.…...(13 )  45a 4 +b 4 -45a 5 -b 5 = (14)  a 1 =0....(15)

17

18 aiai bibi cici – – – –152.13

v(t)= t ; 0<t<10 v(t)= t t ; 10<t<15 v(t)= t t ; 15<t<20 v(t)= t 2 – t ; 20<t<22.5 v(t)= t t ; 22.5<t<30 v(16)= m/s s(16)= m a(16)= m/s 2 19

Thanks 20