The example demonstrating the proper way to normalize results from FFT to get $\hat{u}_k$ coefficients was wrong. Instead of $n_x e^{-i k x_0}$ the normalization factor is $n_x e^{i k x_0}$. When $x_0 = -\pi$ that error was overshadowed. I changed the example now to have $x_0 = -2\pi/3$.
The example demonstrating the proper way to normalize results from FFT to get $\hat{u}_k$ coefficients was wrong. Instead of $n_x e^{-i k x_0}$ the normalization factor is $n_x e^{i k x_0}$. When $x_0 = -\pi$ that error was overshadowed. I changed the example now to have $x_0 = -2\pi/3$.