[RFC]: evaluate a Chebyshev polynomial of the second kind on `[-2,2]` at a value `x`
Checklist
Please ensure the following tasks are completed before filing an issue.
- [x] Read and understood the Code of Conduct.
- [x] Searched for existing issues and pull requests.
- [x] If this is a general question, searched the FAQ for an existing answer.
- [x] If this is a feature request, the issue name begins with
RFC:.
Description
Description of the issue (or feature request).
Add support for evaluating a Chebyshev polynomial of the second kind on [-2,2] at a value x.
Package: @stdlib/math/base/special/chebyshev-s-polynomial
Alias: base.chebyshevspoly
Implementation should be straightforward, but depends on @stdlib/math/base/special/chebyshev-u-polynomial.
Related Issues
Does this issue (or feature request) have any related issues?
No.
Questions
Any questions for reviewers?
No.
Other
Any other information relevant to this issue (or feature request)? This may include screenshots, references, stack traces, sample output, and/or implementation notes.
Reference implementations:
@kgryte Is this issue still available to solve?
@kunal-511 Yes, this issue is still open.
Hi! I’m interested in working on this issue but noticed a couple of things I want to clarify first.
-
Missing module:
The issue mentions a dependency on@stdlib/math/base/special/chebyshev-u-polynomial, but I couldn’t find this module in the codebase. Could you please confirm whether:
- This module is planned to be implemented separately?
- Or should I implement the Chebyshev polynomials of the second kind directly (e.g., using a recurrence) without relying on that module?
-
Implementation approach:
The issue states the implementation should be straightforward. Should I assume this means implementing the standard recurrence relation for ( U_n(x) ):
$$ \begin{aligned} U_0(x) &= 1 \ U_1(x) &= 2x \ U_n(x) &= 2x \cdot U_{n-1}(x) - U_{n-2}(x), \quad n \geq 2 \end{aligned} $$
-
Domain for evaluation:
Since Chebyshev polynomials of the second kind are standardly defined on ([-1,1]), but this issue mentions ([-2,2]), should the inputxbe:
- evaluated directly on ([-2, 2]), or
- mapped/scaled to ([-1, 1]) before evaluation?
Thanks for your guidance!