seemps.analysis.expansion.ChebyshevExpansion#
- class seemps.analysis.expansion.ChebyshevExpansion#
Bases:
PolynomialExpansionExpansion in the Chebyshev basis.
The Chebyshev polynomials \(T_k(x)\) are orthogonal on the interval \([−1, 1]\) with weight \(1/\sqrt{1−x^2}\). They are widely used in approximation theory since truncated Chebyshev series minimize the maximum error (near-best polynomial approximation).
See https://en.wikipedia.org/wiki/Chebyshev_polynomials for more information.
- deriv(m: int = 1) ChebyshevExpansion[source]#
Return the m-th derivative as a new ChebyshevExpansion.
- integ(m: int = 1, lbnd: float = 0.0) ChebyshevExpansion[source]#
Return the m-th integral as a new ChebyshevExpansion.
- classmethod interpolate(func: Callable[[ndarray[tuple[Any, ...], dtype[_ScalarT]]], float], approximation_domain: tuple[float, float] = (-1.0, 1.0), order: int | None = None, nodes: Literal['zeros', 'extrema'] = 'zeros') ChebyshevExpansion[source]#
Project a scalar function onto the Chebyshev basis on the given approximation domain.
The approximation domain must contain the full range of arguments on which the expansion will be evaluated; otherwise, rescaling maps the argument outside the orthogonality domain where the basis is not defined, leading to large errors.
- classmethod project(func: Callable[[ndarray[tuple[Any, ...], dtype[_ScalarT]]], float], approximation_domain: tuple[float, float] = (-1.0, 1.0), order: int | None = None) ChebyshevExpansion[source]#
Project a scalar function onto the Chebyshev basis on the given approximation domain.
The approximation domain must contain the full range of arguments on which the expansion will be evaluated; otherwise, rescaling maps the argument outside the orthogonality domain where the basis is not defined, leading to large errors.
- recurrence_coefficients(k: int) tuple[float, float, float][source]#
Returns the three-term coefficients of the Chebyshev recursion:
\[T_{k+1}(x) = 2x T_k(x) - T_{k-1}(x)\]