Download presentation

Presentation is loading. Please wait.

Published byJuliette Heselton Modified about 1 year ago

1
Numerical Methods

2
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

3
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 – – –

4
Now through these six points, one can pass a fifth order polynomial [where,-1

5
5

6
6

7
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

8
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

9
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

10
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

11
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

12
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

13
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

14
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.

15
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

16
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
17

18
18 aiai bibi cici – – – –152.13

19
v(t)= t ; 0

20
Thanks 20

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google