function dydx = deriv(u)
% DERIV calculates the first derivative in Fourier space
  n = length(u);
  k = make_k(n);
  dydx = real(ifft(1i*k.*fft(u)));
end
