[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to handle fft of initial condition?
From: |
John B. Thoo |
Subject: |
How to handle fft of initial condition? |
Date: |
Mon, 18 May 2009 08:22:12 -0700 |
Hi. I have a question about solving a differential equation using
fft, specifically, how to handle the initial condition.
Suppose the equation is
u_t = f(x, t), u(x,0) = u0(x).
Applying the F.T., I think I get the system of ODEs
d [u^]_k
-------- = [f^]_k(t), [u^]_k(0) = [u0^]_k,
dt
for k = -infinity..infinity, where ^ denotes the F.T. Then I
think the solution u would be
u(x,t) = \sum_{k=-infinity..infinity} [u^]_k(t) * exp(ikx).
My question is this: If I let [u0^] = fft (u0), how do I match a
negative index k when Octave begins with k = 1? E.g., if k = -3,
then I think I can handle [u^]_{-3} using complex conjugates:
d [u^]_{-3} d [u']_3
----------- = --------.
dt dt
But then what would be [u0^]_{-3}? Or am I approaching this wrongly
altogether?
Please let me know if my question is not clear and I will try to
restate it. Thanks.
---John.
- How to handle fft of initial condition?,
John B. Thoo <=