Download presentation
Presentation is loading. Please wait.
Published byPeregrine Mosley Modified over 8 years ago
1
Approximating Derivatives Using Taylor Series and Vandermonde Matrices
2
The Problem Approximate f (k) (a) using the values of the function f (x) at Any n points to approximate f (a), f ’ (a), …, f (n-1) (a)
3
The Problem Approximate f (k) (a) using the values of the function f (x) at Any n points 2n+1 points f (–n), …, f (0), …, f (n) to approximate f (a), f ’ (a), …, f (n-1) (a) f (a), f ’ (a), …, f (2n) (a)
4
The Problem Approximate f (k) (a) using the values of the function f (x) at Any n points 2n+1 points f (–n), …, f (0), …, f (n) 3 points f (–1), f (0) and f (1) to approximate f (a), f ’ (a), …, f (n-1) (a) f (a), f ’ (a), …, f (2n) (a) f (a), f ’ (a), f ’’ (a)
5
Taylor Series We will use Taylor Series expanded around a. For example,
6
Since we want an approximation for f (a), we need all of the coefficients of f (a) to add up to 1. To make the approximation as good as possible (i.e. to reduce error), we would like all of the coefficients of f ’ (a) and f ’’ (a) to add up to 0. We can expand each of these points around a :
8
This leads to
10
Taylor coefficients matrix A
11
This leads to Then = the first column of A - 1. Taylor coefficients matrix A
12
This leads to Then = the first column of A - 1. Taylor coefficients matrix A
13
This leads to Then = the second column of A - 1. Taylor coefficients matrix A
14
This leads to Then = the third column of A - 1. Taylor coefficients matrix A
15
The Problem Approximate f (k) (a) using the values of the function f (x) at Any n points 2n+1 points f (–n), …, f (0), …, f (n) 3 points f (–1), f (0) and f (1) to approximate f (a), f ’ (a), …, f (n-1) (a) f (a), f ’ (a), …, f (2n) (a) f (a), f ’ (a), f ’’ (a)
16
The Problem Approximate f (k) (a) using the values of the function f (x) at Any n points 2n+1 points f (–n), …, f (0), …, f (n) 3 points f (–1), f (0) and f (1) to approximate f (a), f ’ (a), …, f (n-1) (a) f (a), f ’ (a), …, f (2n) (a) f (a), f ’ (a), f ’’ (a) Weightings c 1, c 2, … are simply the columns of the inverse of the Taylor coefficients matrix A.
17
Problem with 2n+1 points, n=2 Goal: approximate f (a), f ’ (a), f ‘’ (a), f (3) (a), f (4) (a) using values f (–2), f (–1), f (0), f (1), f (2). This leads to the Taylor coefficients matrix
19
For example, with a = 0:
20
With a =0 The columns of A - 1 give desired weightings.
21
With a =0 The columns of A - 1 give desired weightings. For example,
22
With a =0 The columns of A - 1 give desired weightings. For example,
23
Vandermonde matrices: 5 x 5 case
24
Compare to
25
Vandermonde matrices: 5 x 5 case
28
L - 1 with our points: (example) Where Each element of L - 1 will be a constant. For example, take row 3, column 2 of L - 1 :
29
L - 1 with our points: L - 1 will simplify to:
30
U - 1 with our points: U - 1 will simplify to:
31
Taylor coefficient matrix A = DV T DVTVT
32
( U -1 ) T =
34
Recall, this means… If we want to approximate the value of f (3) (a), we use the corresponding column of A - 1 as weights for our points.
35
With a =0 The columns of A - 1 give desired weightings.
36
With a =0 The columns of A - 1 give desired weightings. For example,
37
With a =0 The columns of A - 1 give desired weightings. For example,
38
Problem with 2n+1 points, n=4 Let’s look at the case where we have 9 points -4, …, 0, … 4 and we want to find the best approximation for f (6) (0).
39
Problem with 2n+1 points, n=4 Let’s look at the case where we have 9 points -4, …, 0, … 4 and we want to find the best approximation for f (6) (0).
40
In summary We can approximate f(a) for any a using information at 2n+1 points centered around 0. The weights will be the columns of A - 1, the Taylor coefficients matrix
41
Can compute one element of A -1 The optimal weights for f (n) (a) are simply the values in the k+1 st column of A -1. The k+1 st column of A -1 is (L -1 ) T (k+1 st column of (U -1 ) T ) k! that is, (L -1 ) T (k+1 st row of U -1 ) k! In fact, we can compute individual entries (and thus any single column) of A -1 using the nice formulas for individual entries of L -1 and U -1 that we saw earlier.
42
Comparison with Matlab
43
In summary We can approximate f(a) for any a using information at 2n+1 points centered around 0. The weights will be the columns of A - 1, the Taylor coefficients matrix We can quickly and easily find A - 1 using transposed Vandermonde matrices We use LU factorization L - 1 and U - 1 have “nice” formulas We can compute a single column (or even value) of U - 1.
44
Current work Generalizations: Approximations using: Points that are not centered at 0. Points that are not space one unit apart. Further work: Approximation using arbritary points. General formula for approximation error. Comparisons to existing techniques.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.