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