9
$\begingroup$

Is there a preferred way how to implement a fast (approximate) evaluation of the Chebyshev interpolation polynomial on uniform grid (given the function values at the Chebyshev nodes)? My problem is that the interpolation becomes slow when the degree of the interpolating polynomial increases.

The following ideas came to my mind:

  • Try to adapt non-uniform FFT (NFFT) techniques
  • Use FFT to compute the derivates at the Chebyshev nodes, potentially after first going to a finer (Chebyshev) grid. Then use a piecewise cubic interpolation for (approximative) evaluation.
  • Use some formula that only uses function values (and potentially derivatives) at "nearby" Chebyshev nodes (this is related a specific NFFT technique).
$\endgroup$
  • $\begingroup$ Have a look at chebfun! It is a whole library that bases on function representations by means of Chebyshev polynomials. It is open source, highly optimized, and well maintained and I guess that if there exists a preferred way for the pointwise evaluation of a polynomial, then you will find it there. $\endgroup$ – Jan Oct 15 '17 at 1:26
11
$\begingroup$

Have you thought of using Barycentric Interpolation? A detailed description on how to do it efficiently for Chebyshev nodes is given in Section 5 of this paper.

This is actually an exact evaluation of the Chebyshev interpolant. If you're evaluating a polynomial of degree $n$ at $m$ nodes, the cost is in $\mathcal O(nm)$.

Update

Another alternative, if you have the Chebyshev coefficients of your interpolatory polynomial, is to use the Clenshaw algorithm. If you only have the function values at the Chebyshev nodes, but have to evaluate the polynomial several times, you could compute the coefficients with an FFT.

The Clenshaw algorithm is somewhat faster than Barycentric interpolation as it requires only additions and multiplications, and that it also vectorizes quite nicely.

$\endgroup$
  • $\begingroup$ Currently, I do it by precomputing the weights relative to the function values at the Chebyshev nodes for a specific evaluation point, then evaluate this point for all interpolations I have to do (there are many, all with identical Chebyshev nodes and identical evaluation points), and then move on to the next evaluation point. $\endgroup$ – Thomas Klimpel Oct 4 '12 at 7:35
  • $\begingroup$ @ThomasKlimpel: How are you computing the weights? If you're using Chebyshev nodes on $[-1,1]$, they're just $\pm 1$, or $\pm 1/2$ at the edges. If speed is really of the essence, I've added the Clenshaw algorith to my reply. In my experience, it's about four times faster in compiled code. $\endgroup$ – Pedro Oct 4 '12 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.