Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Chebyshev2Basis

Open In Colab

Overview

Chebyshev2Basis provides the second-kind Chebyshev polynomial basis Un(x)U_n(x) on [−1,1][-1, 1]. It is related to derivatives of first-kind polynomials and is useful when expressing functions directly in a basis of Un(x)U_n(x) polynomials.

Key Functionality / API

  • CalculateWeights(N, x, a=-1, b=1) returns basis weights.

  • DerivativeWeights(N, x, a=-1, b=1) returns derivative weights.

  • WeightMatrix(N, X) stacks weights for a vector of sample points.

Usage Example

Evaluate second-kind Chebyshev weights and build a weight matrix for multiple sample points.

Weights at x=-0.3: [ 1.    -0.6   -0.64   0.984  0.05  -1.014]
WeightMatrix shape: (5, 6)
Row for x=0: [ 1.  0. -1. -0.  1.  0.]