0% found this document useful (0 votes)
9 views40 pages

Lecture

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views40 pages

Lecture

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Approximation Theory

Padé Approximation

Numerical Analysis and Computing


Lecture Notes #13
— Approximation Theory —
Rational Function Approximation

Joe Mahaffy,
[email protected]
Department of Mathematics
Dynamical Systems Group
Computational Sciences Research Center
San Diego State University
San Diego, CA 92182-7720
http://www-rohan.sdsu.edu/∼jmahaffy

Spring 2010
Joe Mahaffy, [email protected] Rational Function Approximation — (1/21)
Approximation Theory
Padé Approximation

Outline

1 Approximation Theory
Pros and Cons of Polynomial Approximation
New Bag-of-Tricks: Rational Approximation
Padé Approximation: Example #1

2 Padé Approximation
Example #2
Finding the Optimal Padé Approximation

Joe Mahaffy, [email protected] Rational Function Approximation — (2/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Polynomial Approximation: Pros and Cons.

Advantages of Polynomial Approximation:


[1] We can approximate any continuous function on a closed inter-
val to within arbitrary tolerance. (Weierstrass approximation
theorem)

Joe Mahaffy, [email protected] Rational Function Approximation — (3/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Polynomial Approximation: Pros and Cons.

Advantages of Polynomial Approximation:


[1] We can approximate any continuous function on a closed inter-
val to within arbitrary tolerance. (Weierstrass approximation
theorem)
[2] Easily evaluated at arbitrary values. (e.g. Horner’s method)

Joe Mahaffy, [email protected] Rational Function Approximation — (3/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Polynomial Approximation: Pros and Cons.

Advantages of Polynomial Approximation:


[1] We can approximate any continuous function on a closed inter-
val to within arbitrary tolerance. (Weierstrass approximation
theorem)
[2] Easily evaluated at arbitrary values. (e.g. Horner’s method)
[3] Derivatives and integrals are easily determined.

Joe Mahaffy, [email protected] Rational Function Approximation — (3/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Polynomial Approximation: Pros and Cons.

Advantages of Polynomial Approximation:


[1] We can approximate any continuous function on a closed inter-
val to within arbitrary tolerance. (Weierstrass approximation
theorem)
[2] Easily evaluated at arbitrary values. (e.g. Horner’s method)
[3] Derivatives and integrals are easily determined.
Disadvantage of Polynomial Approximation:
[1] Polynomials tend to be oscillatory, which causes errors. This
is sometimes, but not always, fixable: — E.g. if we are free to
select the node points we can minimize the interpolation error
(Chebyshev polynomials), or optimize for integration (Gaussian
Quadrature).
Joe Mahaffy, [email protected] Rational Function Approximation — (3/21)
Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Moving Beyond Polynomials: Rational Approximation

We are going to use rational functions, r (x), of the form


n
X
pi x i
p(x) i=0
r (x) = = m
q(x) X
1+ qi x i
j=1

and say that the degree of such a function is N = n + m.

Joe Mahaffy, [email protected] Rational Function Approximation — (4/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Moving Beyond Polynomials: Rational Approximation

We are going to use rational functions, r (x), of the form


n
X
pi x i
p(x) i=0
r (x) = = m
q(x) X
1+ qi x i
j=1

and say that the degree of such a function is N = n + m.


Since this is a richer class of functions than polynomials — rational
functions with q(x) ≡ 1 are polynomials, we expect that rational
approximation of degree N gives results that are at least as
good as polynomial approximation of degree N.

Joe Mahaffy, [email protected] Rational Function Approximation — (4/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation

Extension of Taylor expansion to rational functions; selecting the


pi ’s and qi ’s so that r (k) (x0 ) = f (k) (x0 ) ∀k = 0, 1, . . . , N.

p(x) f (x)q(x) − p(x)


f (x) − r (x) = f (x) − =
q(x) q(x)

Joe Mahaffy, [email protected] Rational Function Approximation — (5/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation

Extension of Taylor expansion to rational functions; selecting the


pi ’s and qi ’s so that r (k) (x0 ) = f (k) (x0 ) ∀k = 0, 1, . . . , N.

p(x) f (x)q(x) − p(x)


f (x) − r (x) = f (x) − =
q(x) q(x)

P∞
Now, use the Taylor expansion f (x) ∼ i=0 ai (x − x0 )i , for
simplicity x0 = 0:

X m
X n
X
i i
ai x qi x − pi xi
i=0 i=0 i=0
f (x) − r (x) = .
q(x)

Joe Mahaffy, [email protected] Rational Function Approximation — (5/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation

Extension of Taylor expansion to rational functions; selecting the


pi ’s and qi ’s so that r (k) (x0 ) = f (k) (x0 ) ∀k = 0, 1, . . . , N.

p(x) f (x)q(x) − p(x)


f (x) − r (x) = f (x) − =
q(x) q(x)

P∞
Now, use the Taylor expansion f (x) ∼ i=0 ai (x − x0 )i , for
simplicity x0 = 0:

X m
X n
X
i i
ai x qi x − pi xi
i=0 i=0 i=0
f (x) − r (x) = .
q(x)
Next, we choose p0 , p1 , . . . , pn and q1 , q2 , . . . , qm so that the numerator
has no terms of degree ≤ N.
Joe Mahaffy, [email protected] Rational Function Approximation — (5/21)
Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation: The Mechanics.

For simplicity we (sometimes) define the “indexing-out-of-bounds”


coefficients:
½
pn+1 = pn+2 = · · · = pN = 0
qm+1 = qm+2 = · · · = qN = 0,

so we can express the coefficients of x k in



X m
X n
X
i i
ai x qi x − pi x i = 0, k = 0, 1, . . . , N
i=0 i=0 i=0

as
k
X
ai qk−i = pk , k = 0, 1, . . . , N.
i=0

Joe Mahaffy, [email protected] Rational Function Approximation — (6/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation: Abstract Example 1 of 2

Find the Padé approximation of f (x) of degree 5, where


f (x) ∼ a0 + a1 x + . . . a5 x 5 is the Taylor expansion of f (x) about
the point x0 = 0.
The corresponding equations are:

x0 a0 − p0 = 0
x1 a0 q1 + a1 − p1 = 0
x2 a0 q2 + a1 q1 + a2 − p2 = 0
x3 a0 q3 + a1 q2 + a2 q1 + a3 − p3 = 0
x4 a0 q4 + a1 q3 + a2 q2 + a3 q1 + a4 − p4 = 0
x5 a0 q5 + a1 q4 + a2 q3 + a3 q2 + a4 q1 + a5 − p5 = 0

Note: p0 = a0 !!! (This reduces the number of unknowns and


equations by one (1).)
Joe Mahaffy, [email protected] Rational Function Approximation — (7/21)
Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation: Abstract Example 2 of 2

We get a linear system for p1 , p2 , . . . , pN and q1 , q2 , . . . , qN :


      
a0 q1 p1 a1
 a1 a0   q2   p2   a2 
      
 a2 a1 a0   q3  −  p3  = −  a3  .
      

 a3 a2 a1 a0   q4   p4   a4 
a4 a3 a2 a1 a0 q5 p5 a5

If we want n = 3, m = 2:
      
a0 q1 p1 a1
 a1 a0  q2   p2   a2 
      
 a2 a1 a0  0 − p3  = − a3 .
      
 a3 a2 a1 a0  0   0   a4 
a4 a3 a2 a1 a0 0 0 a5

Joe Mahaffy, [email protected] Rational Function Approximation — (8/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation: Abstract Example 2 of 2

We get a linear system for p1 , p2 , . . . , pN and q1 , q2 , . . . , qN :


      
a0 q1 p1 a1
 a1 a0   q2   p2   a2 
      
 a2 a1 a0   q3  −  p3  = −  a3  .
      

 a3 a2 a1 a0   q4   p4   a4 
a4 a3 a2 a1 a0 q5 p5 a5

If we want n = 3, m = 2:
      
a0 −1 q1 0 a1
 a1 a0  q2   p2   a2 
      
 a2 a1 0  p1 − p3  = − a3 .
      
 a3 a2 0 a0  0   0   a4 
a4 a3 0 a1 a0 0 0 a5

Joe Mahaffy, [email protected] Rational Function Approximation — (8/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation: Abstract Example 2 of 2

We get a linear system for p1 , p2 , . . . , pN and q1 , q2 , . . . , qN :


      
a0 q1 p1 a1
 a1 a0   q2   p2   a2 
      
 a2 a1 a0   q3  −  p3  = −  a3  .
      

 a3 a2 a1 a0   q4   p4   a4 
a4 a3 a2 a1 a0 q5 p5 a5

If we want n = 3, m = 2:
      
a0 −1 q1 0 a1
 a1 a0 −1  q2   0   a2 
      
 a2 a1 0  p1 − p3  = − a3 .
      
 a3 a2 0 0  p2   0   a4 
a4 a3 0 0 a0 0 0 a5

Joe Mahaffy, [email protected] Rational Function Approximation — (8/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation: Abstract Example 2 of 2

We get a linear system for p1 , p2 , . . . , pN and q1 , q2 , . . . , qN :


      
a0 q1 p1 a1
 a1 a0   q2   p2   a2 
      
 a2 a1 a0   q3  −  p3  = −  a3  .
      

 a3 a2 a1 a0   q4   p4   a4 
a4 a3 a2 a1 a0 q5 p5 a5

If we want n = 3, m = 2:
      
a0 −1 q1 0 a1
 a1 a0 −1  q2   0   a2 
      
 a2 a1 0 −1  p1 − 0  = − a3 .
      
 a3 a2 0 0  p2   0   a4 
a4 a3 0 0 0 p3 0 a5

Joe Mahaffy, [email protected] Rational Function Approximation — (8/21)


Pros and Cons of Polynomial Approximation
Approximation Theory
New Bag-of-Tricks: Rational Approximation
Padé Approximation
Padé Approximation: Example #1

Padé Approximation: Abstract Example 2 of 2

We get a linear system for p1 , p2 , . . . , pN and q1 , q2 , . . . , qN :


      
a0 q1 p1 a1
 a1 a0   q2   p2   a2 
      
 a2 a1 a0   q3  −  p3  = −  a3  .
      

 a3 a2 a1 a0   q4   p4   a4 
a4 a3 a2 a1 a0 q5 p5 a5

If we want n = 3, m = 2:
    
a0 0 −1 q1 a1
 a1 a0 0 −1   q2 a2
    
   
 a2 a1 0 0 −1   p1  = − a3 .
    
 a3 a2 0 0 0   p2   a4 
a4 a3 0 0 0 p3 a5

Joe Mahaffy, [email protected] Rational Function Approximation — (8/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 1 of 3


(−1)k k
The Taylor series expansion for e −x about x0 = 0 is ∞
P
k=0 k! x ,
hence {a0 , a1 , a2 , a3 , a4 , a5 } = {1, −1, 12 , −1 1 −1
6 , 24 , 120 }.

Joe Mahaffy, [email protected] Rational Function Approximation — (9/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 1 of 3


(−1)k k
The Taylor series expansion for e −x about x0 = 0 is ∞
P
k=0 k! x ,
hence {a0 , a1 , a2 , a3 , a4 , a5 } = {1, −1, 12 , −1 1 −1
6 , 24 , 120 }.

    
1 0 −1 q1 −1

 −1 1 0 −1   q2




 1/2 


 1/2 −1 0   p1
0 −1    = −
  −1/6 ,

 −1/6 1/2 0 0 0  p2
   1/24 
1/24 −1/6 0 0 0 p3 −1/120

which gives {q1 , q2 , p1 , p2 , p3 } = {2/5, 1/20, −3/5, 3/20, −1/60}

Joe Mahaffy, [email protected] Rational Function Approximation — (9/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 1 of 3


(−1)k k
The Taylor series expansion for e −x about x0 = 0 is ∞
P
k=0 k! x ,
hence {a0 , a1 , a2 , a3 , a4 , a5 } = {1, −1, 12 , −1 1 −1
6 , 24 , 120 }.

    
1 0 −1 q1 −1

 −1 1 0 −1   q2




 1/2 


 1/2 −1 0   p1
0 −1    = −
  −1/6 ,

 −1/6 1/2 0 0 0  p2
   1/24 
1/24 −1/6 0 0 0 p3 −1/120

which gives {q1 , q2 , p1 , p2 , p3 } = {2/5, 1/20, −3/5, 3/20, −1/60}, i.e.

3 3 1
1 − x + x2 − x3
r3,2 (x) = 5 20 60 .
2 1 2
1+ x + x
5 20
Joe Mahaffy, [email protected] Rational Function Approximation — (9/21)
Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 2 of 3

All the possible Padé approximations of degree 5 are:

r5,0 (x) = 1 − x + 12 x 2 − 16 x 3 + 1 4
24 x − 1 5
120 x

3 2 1 3
1− 54 x+ 10 x − 15 1
x + 120 x4
r4,1 (x) = 1+ 15 x

3 2 1 3
1− 53 x+ 20 x − 60 x
r3,2 (x) = 1 2
1+ 25 x+ 20 x

1 2
1− 25 x+ 20 x
r2,3 (x) = 1+ 53 x+ 20
3 2 1 3
x + 60 x

1− 51 x
r1,4 (x) = 3 2
1+ 54 x+ 10 x + 151 3 1
x + 120 x4

1
r0,5 (x) = 1+x+ 12 x 2 + 61 x 3 + 24
1 4 1
x + 120 x5

Note: r5,0 (x) is the Taylor polynomial of degree 5.

Joe Mahaffy, [email protected] Rational Function Approximation — (10/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 3 of 3

The Absolute Error.


0.1

R{5,0}(x)

0.01

0.001

0.0001

1e-05
0 0.5 1 1.5 2

Joe Mahaffy, [email protected] Rational Function Approximation — (11/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 3 of 3

The Absolute Error.


0.1

R{5,0}(x)
R{4,1}(x)

0.01

0.001

0.0001

1e-05
0 0.5 1 1.5 2

Joe Mahaffy, [email protected] Rational Function Approximation — (11/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 3 of 3

The Absolute Error.


0.1

R{5,0}(x)
R{4,1}(x)
R{3,2}(x)
0.01

0.001

0.0001

1e-05
0 0.5 1 1.5 2

Joe Mahaffy, [email protected] Rational Function Approximation — (11/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 3 of 3

The Absolute Error.


0.1

R{5,0}(x)
R{3,2}(x)
R{2,3}(x)
0.01

0.001

0.0001

1e-05
0 0.5 1 1.5 2

Joe Mahaffy, [email protected] Rational Function Approximation — (11/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 3 of 3

The Absolute Error.


0.1

R{5,0}(x)
R{2,3}(x)
R{1,4}(x)
0.01

0.001

0.0001

1e-05
0 0.5 1 1.5 2

Joe Mahaffy, [email protected] Rational Function Approximation — (11/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 3 of 3

The Absolute Error.


0.1

R{5,0}(x)
R{2,3}(x)
R{0,5}(x)
0.01

0.001

0.0001

1e-05
0 0.5 1 1.5 2

Joe Mahaffy, [email protected] Rational Function Approximation — (11/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Concrete Example, e −x 3 of 3

The Absolute Error.


0.1

R{5,0}(x)
R{4,1}(x)
R{3,2}(x)
0.01 R{2,3}(x)
R{1,4}(x)
R{0,5}(x)

0.001

0.0001

1e-05
0 0.5 1 1.5 2

Joe Mahaffy, [email protected] Rational Function Approximation — (11/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Padé Approximation: Matlab Code.

The algorithm in the book looks frightening! If we think in term of the


matrix problem defined earlier, it is easier to figure out what is going on:
% The Taylor Coefficients, a0 , a1 , a2 , a3 , a4 , a5
a = [1 −1 1/2 −1/6 1/24 −1/120]’;
N = length(a); A = zeros(N-1,N-1);
% m is the degree of q(x), and n the degree of p(x)
m = 3; n = N-1-m;
% Set up the columns which multiply q1 through qm
for i=1:m
A(i:(N-1),i) = a(1:(N-i));
end
% Set up the columns that multiply p1 through pn
A(1:n,m+(1:n)) = -eye(n)
% Set up the right-hand-side
b = - a(2:N);
% Solve
c = A\b;
Q = [1 ; c(1:m)]; % Select q0 through qm
P = [a0 ; c((m+1):(m+n))]; % Select p0 through pn

Joe Mahaffy, [email protected] Rational Function Approximation — (12/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Optimal Padé Approximation?

One Point Optimal Points


Polynomials Taylor Chebyshev
Rational Functions Padé ???

From the example e −x we can see that Padé approximations suffer


from the same problem as Taylor polynomials – they are very
accurate near one point, but away from that point the
approximation degrades.
“Chebyshev-placement” of interpolating points for polynomials
gave us an optimal (uniform) error bound over the interval.
Can we do something similar for rational approximations???

Joe Mahaffy, [email protected] Rational Function Approximation — (13/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Chebyshev Basis for the Padé Approximation!

We use the same idea — instead of expanding in terms of the


basis functions x k , we will use the Chebyshev polynomials,
Tk (x), as our basis, i.e.
Pn
pk Tk (x)
rn,m (x) = Pk=0
m
k=0 qk Tk (x)
where N = n + m, and q0 = 1.

Joe Mahaffy, [email protected] Rational Function Approximation — (14/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Chebyshev Basis for the Padé Approximation!

We use the same idea — instead of expanding in terms of the


basis functions x k , we will use the Chebyshev polynomials,
Tk (x), as our basis, i.e.
Pn
pk Tk (x)
rn,m (x) = Pk=0
m
k=0 qk Tk (x)
where N = n + m, and q0 = 1.
We also need to expand f (x) in a series of Chebyshev polynomials:

X
f (x) = ak Tk (x),
k=0
so that
P∞ Pm
qk Tk (x) − nk=0 pk Tk (x)
P
k=0 ak Tk (x) k=0
f (x) − rn,m (x) = Pm .
k=0 qk Tk (x)

Joe Mahaffy, [email protected] Rational Function Approximation — (14/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

The Resulting Equations

Again, the coefficients p0 , p1 , . . . , pn and q1 , q2 , . . . , qm are chosen


so that the numerator has zero coefficients for Tk (x),
k = 0, 1, . . . , N, i.e.

X m
X n
X ∞
X
ak Tk (x) qk Tk (x) − pk Tk (x) = γk Tk (x).
k=0 k=0 k=0 k=N+1

We will need the following relationship:


1£ ¤
Ti (x)Tj (x) = Ti+j (x) + T|i−j| (x) .
2
Also, we must compute (maybe numerically)

1 1 f (x) 2 1 f (x)Tk (x)


Z Z
a0 = √ dx and ak = √ dx, k ≥ 1.
π −1 1 − x 2 π −1 1 − x2

Joe Mahaffy, [email protected] Rational Function Approximation — (15/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Example: Revisiting e −x with Chebyshev-Padé Approximation 1/5

The 8th order Chebyshev-expansion (All Praise Maple) for e −x is


P8CT (x) = 1.266065878 T0 (x) − 1.130318208 T1 (x) + 0.2714953396 T2 (x)
−0.04433684985 T3 (x) + 0.005474240442 T4 (x)
−0.0005429263119 T5 (x) + 0.00004497732296 T6 (x)
−0.000003198436462 T7 (x) + 0.0000001992124807 T8 (x)

and using the same strategy — building a matrix and


right-hand-side utilizing the coefficients in this expansion, we can
solve for the Chebyshev-Padé polynomials of degree (n + 2m) ≤ 8:
CP
Next slide shows the matrix set-up for the r3,2 (x) approximation.

Note: Due to the “folding”, Ti (x)Tj (x) = 21 Ti+j (x) + T|i−j| (x) ,
£ ¤

we need n + 2m Chebyshev-expansion coefficients. (Burden-


Faires do not mention this, but it is “obvious” from algo-
rithm 8.2; Example 2 (p. 519) is broken, – it needs P̃7 (x).)
Joe Mahaffy, [email protected] Rational Function Approximation — (16/21)
Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Example: Revisiting e −x with Chebyshev-Padé Approximation 2/5

· ¸
1
T0 (x) : 2 a1 q1 + a2 q2 − 2p0 = 2a0
· ¸
1
T1 (x) : 2 (2a0 + a2 )q1 + (a1 + a3 )q2 − 2p1 = 2a1
· ¸
1
T2 (x) : 2 (a1 + a3 )q1 + (2a0 + a4 )q2 − 2p2 = 2a2
· ¸
1
T3 (x) : 2 (a2 + a4 )q1 + (a1 + a5 )q2 − 2p3 = 2a3
· ¸
1
T4 (x) : 2 (a3 + a5 )q1 + (a2 + a6 )q2 − 0 = 2a4
· ¸
1
T5 (x) : 2 (a4 + a6 )q1 + (a3 + a7 )q2 − 0 = 2a5

Joe Mahaffy, [email protected] Rational Function Approximation — (17/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Example: Revisiting e −x with Chebyshev-Padé Approximation 3/5


RCP
4,1 (x) =

1.155054 T0 (x) − 0.8549674 T1 (x) + 0.1561297 T2 (x) − 0.01713502 T3 (x) + 0.001066492 T4 (x)
T0 (x) + 0.1964246628 T1 (x)

RCP
3,2 (x) =

1.050531166 T0 (x) − 0.6016362122 T1 (x) + 0.07417897149 T2 (x) − 0.004109558353 T3 (x)


T0 (x) + 0.3870509565 T1 (x) + 0.02365167312 T2 (x)

RCP
2,3 (x) =
0.9541897238 T0 (x) − 0.3737556255 T1 (x) + 0.02331049609 T2 (x)
T0 (x) + 0.5682932066 T1 (x) + 0.06911746318 T2 (x) + 0.003726440404 T3 (x)

RCP
1,4 (x) =

0.8671327116 T0 (x) − 0.1731320271 T1 (x)


T0 (x) + 0.73743710 T1 (x) + 0.13373746 T2 (x) + 0.014470654 T3 (x) + 0.00086486509 T4 (x)

Joe Mahaffy, [email protected] Rational Function Approximation — (18/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Example: Revisiting e −x with Chebyshev-Padé Approximation 4/5


−5 Error for Chebyshev−Pade−4−1 Approximation −5 Error for Chebyshev−Pade−3−2 Approximation
x 10 x 10
2 2

1.5 1.5

1 1

0.5 0.5

0 0

−0.5 −0.5

−1 −1

−1.5 −1.5

−2 −2
−1 −0.5 0 0.5 1 −1 −0.5 0 0.5 1
−5 Error for Chebyshev−Pade−2−3 Approximation −5 Error for Chebyshev−Pade−1−4 Approximation
x 10 x 10
2 2

1.5 1.5

1 1

0.5 0.5

0 0

−0.5 −0.5

−1 −1

−1.5 −1.5

−2 −2
−1 −0.5 0 0.5 1 −1 −0.5 0 0.5 1

Joe Mahaffy, [email protected] Rational Function Approximation — (19/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

Example: Revisiting e −x with Chebyshev-Padé Approximation 5/5


Error Comparison for 4−1 Approximations
−4 Error Comparison for 3−2 Approximations
−4
x 10 x 10
3.5
0 Chebyshev−Pade
Pade
−0.5 3

−1
2.5
−1.5
2
−2

−2.5 1.5
−3
1
−3.5

−4 0.5

−4.5 Chebyshev−Pade
Pade 0
−5
−1 −0.5 0 0.5 1 −1 −0.5 0 0.5 1
−4 Error Comparison for 1−4 Approximations
−4 Error Comparison for 2−3 Approximations x 10
x 10 15
0 Chebyshev−Pade
Pade
−0.5

−1

−1.5 10

−2

−2.5

−3
5
−3.5

−4

−4.5 Chebyshev−Pade
Pade
−5 0
−1 −0.5 0 0.5 1 −1 −0.5 0 0.5 1

Joe Mahaffy, [email protected] Rational Function Approximation — (20/21)


Approximation Theory Example #2
Padé Approximation Finding the Optimal Padé Approximation

The Bad News — It’s Not Optimal!

The Chebyshev basis does not give an optimal (in the min-max
sense) rational approximation. However, the result can be used as
a starting point for the second Remez algorithm. It is an
iterative scheme which converges to the best approximation.

A discussion of how and why (and why not) you may want to use
the second Remez’ algorithm can be found in Numerical Recipes
in C: The Art of Scientific Computing (Section 5.13). [You can
read it for free on the web(∗) — just Google for it!]
(∗) The old 2nd Edition is Free, the new 3rd edition is for sale...

Joe Mahaffy, [email protected] Rational Function Approximation — (21/21)

You might also like