4
$\begingroup$

I am using the Chebyshev spectral differentiation technique that is described concisely under "details" here. The idea is to take the initial data $v_0,v_1\,...,v_N$ and store it in union with itself as the vector $$V = [v_0\,v_1\,...\,v_{N-1}\,v_N\,v_{N-1}\,v_{N-2}\,...\,v_1]^\top$$

From there, the Fourier transform of this vector $V$ is taken. However, for the Fourier transform to provide a good interpolation of the data in $V$, $V$ should be smooth and periodic. Although $V$ is continous and periodic, there is (generally) a discontinuity in its first derivative (around the entries $v_{N-1},v_N,v_{N-1}$). Why, then, is this method of differentiation still so effective?

$\endgroup$
2
  • $\begingroup$ The way they arranged the array confused you. It's just packing the data to be able to use U=Re(FFT(V)) later. The more effective would be to use Discrete Cosine Transform. They just followed the recipe from Trefethen, ch. 8. since this is what they can implement in Mathematica easily. $\endgroup$ May 9, 2013 at 12:16
  • $\begingroup$ Thanks Johntra. I think I may have asked the question too unclearly - I figured out the answer though, and documented it below. $\endgroup$
    – Doubt
    May 9, 2013 at 13:14

1 Answer 1

4
$\begingroup$

Ah, I have realized the answer to my own question:

It is important to recognize that the initial data $v_0,...,v_N$ is not stored on a uniform grid, but rather at the Chebyshev points $$ x_j = \cos\frac{\pi j}{N},\qquad j=0,...,N.$$

Now as long as the initial data has a decent polynomial interpolation, then \begin{align} v_j = p(x_j) &= a_0 + a_1x_j + \cdots + a_Nx_j^N \\ &=a_0 + a_1\cos\frac{\pi j}{N} + \cdots + a_N\cos^N\frac{\pi j}{N} \\ &=a_0 + a_1\cos\theta_j + \cdots + a_N\cos^N\theta_j = f(\theta_j) \end{align} where $\theta_j = \pi j/N\in[0,\pi]$ is a uniform grid. Therefore, on the new uniform grid the data is an even function (hence the powers of cosine), and in particular $df/d\theta|_{\theta=0} = 0$. Thus the function can easily be extended to $[-\pi,\pi]$, giving a smooth, even, periodic function with data at uniformly-spaced gridpoints: ripe for the Fourier transform.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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