chebbasisgen {capn} | R Documentation |
Generating Unidimensional Chebyshev polynomial (monomial) basis
Description
The function calculates the monomial basis of Chebyshev polynomials for the given unidimensional nodes,
s_{i}
, over a bounded interval [a,b].
Usage
chebbasisgen(stock, npol, a, b, dorder = NULL)
Arguments
stock |
An array of Chebyshev polynomial nodes |
npol |
Number of polynomials (n polynomials = (n-1)-th degree) |
a |
The lower bound of inverval [a,b] |
b |
The upper bound of inverval [a,b] |
dorder |
Degree of partial derivative of the basis; Default is NULL; if dorder = 1, returns the first order partial derivative |
Details
Suppose there are m
numbers of Chebyshev nodes over a bounded interval [a,b]:
s_{i} \in [a,b],
for i = 1,2,\cdots,m
.
These nodes can be nomralized to the standard Chebyshev nodes over the domain [-1,1]:
z_{i} = \frac{2(s_{i} - a)}{(b - a)} - 1
.
With normalized Chebyshev nodes, the recurrence relations of Chebyshev polynomials of order n
is defined as:
T_{0} (z_{i}) = 1
,
T_{1} (z_{i}) = z_{i}
, and
T_{n} (z_{i}) = 2 z_{i} T_{n-1} (z_{i}) - T_{n-2} (z_{i})
.
The interpolation matrix (Vandermonde matrix) of (n-1)-th Chebyshev polynomials with m
nodes,
\Phi_{mn}
is:
\Phi_{mn} = \left[ \begin{array}{ccccc}
1 & T_{1} (z_{1}) & \cdots & T_{n-1} (z_{1})\\
1 & T_{1} (z_{2}) & \cdots & T_{n-1} (z_{2})\\
\vdots & \vdots & \ddots & \vdots\\
1 & T_{1} (z_{m}) & \cdots & T_{n-1} (z_{m})
\end{array} \right]
.
The partial derivative of the monomial basis matrix can be found by the relation:
(1-z_{i}^{2}) T'_{n} (z_{i}) = n[ T_{n-1} (z_{i}) - z_{i} T_{n} (z_{i}) ]
.
The technical details of the monomial basis of Chebyshev polynomial can be referred from Amparo et al. (2007)
and Miranda and Fackler (2012).
Value
A matrix (number of nodes (m
) x npol (n
)) of (monomial) Chebyshev polynomial basis
References
Amparo, Gil, Javier Segura, and Nico Temme. (2007) Numerical Methods for Special Functions. Cambridge: Cambridge University Press.
Miranda, Mario J. and Paul L. Fackler. (2002) Applied Computational Economics and Finance. Cambridge: The MIT Press.
See Also
Examples
## Reef-fish example: see Fenichel and Abbott (2014)
data("GOM")
nodes <- chebnodegen(param$nodes,param$lowerK,param$upperK)
## An example of Chebyshev polynomial basis
chebbasisgen(nodes,20,0.1,1.5)
## The partial derivative of Chebyshev polynomial basis with the same function
chebbasisgen(nodes,20,0.1,1.5,1)