Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I solve such a problem.

Lets have a function $Y=\sum_{k=-\infty}^\infty i\hat Y e^{ik\pi y}$ and then I have a function which is defined as $X=\sum_{k=-\infty}^\infty ik^2\hat Y e^{ik\pi y}$.

I know the $Y$. The $i$ is imaginary unit.

How can I compute the $X$? I think I do the FFT on $Y$ and obtain thus the $\hat Y$, right? And then I think I will do the backward FFT of function $f=ik^2\hat Y$. But what have I do with the summation index $k$ here in the $f$?

It is right that $FFT(ik^2\hat Y)=X$ ?

I'm not sure absolutely what to do with $k$ when the FFT sum is summated per $k$.

share|improve this question
up vote 2 down vote accepted

It appears you are very close to your answer, so I am going to detail the process as a whole to clarify a couple small details. If this doesn't answer your question, please comment and I will modify my answer.

You know $Y$, so you evaluate it at a number of points over your interval and plug it into $FFT$. This produces your $\hat Y$, which is a vector. Let's denote each element in this vector as $\hat Y_k$.

You then have that $\hat X_k = i k^2 \hat Y_k$. $\hat X$ is a vector the same length as $\hat Y$. You then plug $\hat X_k$ back into your $FFT^{-1}$ to produce your X. It appears the only thing you were missing was representing $\hat Y$ as a vector. Note that the $i k^2$ can be any function of $k$ you want.

share|improve this answer
ok, many thanks! but what plug I into f, only $\hat Y_k$? I have several functions derived from $Y$, they are different in the form, lets say $\hat X_k=ik^2\hat Y_k$, $\hat Z_k(j)=i(k^2+j^2)Y_k$ for some quantity $j$ and so one. Please what should I plug into FFT$^{-1}$? I mean how I say to the program that I need to use the summation number $k$ and how it should look like? Many thanks, I hope this is not too stupid question ;) – lovis Feb 11 '13 at 18:39
I updated the last paragraph slightly. Let me know if this helps or if you need more clarification. – Godric Seer Feb 11 '13 at 21:29
yes, of course! many thanks! – lovis Feb 12 '13 at 9:33

You may not realize this but you have, in fact, that $X(y)=-\frac1{\pi^2}Y''(y)$. If you know $Y(y)$ then it should be simple enough to compute $X(y)$.

share|improve this answer
that I haven't realized - many thanks! – lovis Feb 12 '13 at 9:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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