I didn't look into that but it definitely sounds interesting. Especially as the coefficient manipulation is mildly unstable for higher derivatives. Need to work out the math first though ;). Thanks for the hint.
On 25.07.2011 15:59, Charles R Harris wrote: > On Sun, Jul 24, 2011 at 5:10 PM, Robert Elsner <[email protected]> wrote: > >> Boiled it down a bit more to only include code that actually takes time. >> First time around I found the other variant more instructive because it >> shows the discrepancy between the DCT and the loop but might be >> confusing. Thus here the bare minimum that correctly calculates the >> coefficients of the first derivative from the coefficients of the >> Chebyshev polynomials. >> >> > Have you tried using an (inverse) discrete sine transform to get the > derivative? dT_n/dx = n*U_{n-1}, where U_n is the Chebyshev polynomial of > the second kind, sin((n+1)\theta)/sin(theta) where cos(\theta) = x. I don't > believe the discrete sine transform is part of scipy, but you can just use > the inverse fft instead. > > <snip> > > Chuck > > > > > _______________________________________________ > NumPy-Discussion mailing list > [email protected] > http://mail.scipy.org/mailman/listinfo/numpy-discussion _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
