The wave equation
$$ u_{tt} = u_{xx} $$
with conditions $u(x,0)=f(x)$, and $u_{t}(x,0)=0$, has following solution in frequency spectrum,
$$ \hat{u} = \hat{f} \cos(\omega t) $$
and I tried to solve numerically in Python by inverting this in every time step.
The numpy.fft(f) only results in the amplitude of the frequencies, and it does not specify which amplitude is for which frequency. But some reference say the $\omega=0, 1/(n \triangle t), ...$ where $n$ is the number of points to evaluate $f(x)$.
But the result looks weird. Do I miss something here?