seemps.analysis.expansion.ChebyshevExpansion#

class seemps.analysis.expansion.ChebyshevExpansion#

Bases: OrthogonalExpansion

Expansion 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.

get_recurrence(k: int) tuple[float, float, float][source]#

Chebyshev recurrence.

Returns the three elements of the Chebyshev iteration

\[T_{k+1}(x) = 2x T_k(x) - T_{k-1}(x)\]

used by Clenshaw’s evaluation formula.

integ(m: int = 1, lbnd: float = 0.0) ChebyshevExpansion[source]#

Return the m-th integral as a new ChebyshevExpansion.

property p1_factor: float#

Return the scalar κ such that the first-degree basis polynomial satisfies P_1(x) = κ·x. Used to correctly seed the three-term recurrence relation.

classmethod project(func: Callable[[ndarray[tuple[Any, ...], dtype[_ScalarT]]], float], start: float = -1.0, stop: float = 1.0, order: int | None = None) ChebyshevExpansion[source]#

Project func defined on (start, stop) onto the orthogonal polynomial basis up to the given order.