chebbasisgen: Generating Unidimensional Chebyshev polynomial (monomial)...

Description Usage Arguments Details Value References See Also Examples

View source: R/definefuns.R

Description

The function calculates the monomial basis of Chebyshev polynomials for the given unidimensional nodes, s_{i}, over a bounded interval [a,b].

Usage

1
chebbasisgen(stock, npol, a, b, dorder = NULL)

Arguments

stock

An array of Chebyshev polynomial nodes s_{i}
(an array of stocks in capn-packages)

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, Φ_{mn} is:

Φ_{mn} = ≤ft[ \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

chebnodegen

Examples

1
2
3
4
5
6
7
## 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)

capn documentation built on May 1, 2019, 11:15 p.m.

Related to chebbasisgen in capn...