Useful Resource:
https://math.mit.edu/~stevenj/fft-deriv.pdf (background section is how FFTW does things)
http://www.fftw.org/fftw3_doc/The-1d-Discrete-Fourier-Transform-_0028DFT_0029.html#The-1d-Discrete-Fourier-Transform-_0028DFT_0029 (The $Y_k$ here is the same as the $Y_k$ in Steven Johnsons' notes)
# Cubic NLSE
The Cubic NLSE can be written as:
$
i \frac{\partial \psi}{\partial x} + \frac{1}{2} \frac{\partial^2 \psi}{\partial t^2} + \left|\psi\right|^2\psi = 0
$
or equivalently
$
i \frac{\partial \psi}{\partial x} = (\hat{N} + \hat{D}) \psi
$
where
$
\begin{align}
\hat{N} &= - |\psi|^2, \\
\hat{D} &= - \frac{1}{2} \frac{\partial^2}{\partial t^2}.
\end{align}
$
The solution at an evolution step $x + \Delta x$ can be obtained as:
$
\psi(x + \Delta x, t) = \exp\left(-i \Delta x(\hat{N}+\hat{D})\right) \psi(x, t) \approx \exp\left(-i \Delta x\hat{N}\right)\exp\left(-i \Delta x\hat{D}\right)\psi(x,t)
$
Defining the Fourier transform over the temporal variable $t$
$
\psi(x, t) = \sum_\omega \tilde{\psi}_\omega(x) e^{i \omega t}
$
The dispersion step can be written as:
$
\exp\left(-i \Delta x\hat{D}\right) \rightarrow \exp\left(-i \Delta x (-1/2) (i \omega)^2\right) = \exp\left(-i \Delta x \omega^2/2 \right)
$
# Hirota Equation
The HE can be written as:
$
i \frac{\partial \psi}{\partial x} + \frac{1}{2} \frac{\partial^2 \psi}{\partial t^2} + \left|\psi\right|^2\psi - i \alpha \left(\frac{\partial^3 \psi}{\partial x^3} + 6 |\psi|^2 \frac{\partial \psi}{\partial x}\right)= 0
$
Now we have:
$
\hat{D} = -\frac{1}{2} \frac{\partial^2}{\partial t^2} + i \alpha \frac{\partial^3}{\partial t^3}.
$
And in Fourier Domain, the dispersion step can be written as:
$
\exp\left(-i \Delta x\hat{D}\right) \rightarrow \exp\left(-i \Delta x \left[ (-1/2) (i \omega)^2 + i \alpha (i \omega)^3\right]\right) = \exp\left(-i \Delta x \left[ \frac{1}{2}\omega^2 + \alpha \omega^3\right]\right)
$