function du=kdv(u,t)
  alpha=0.01;
  n=length(u);
  dx=2*pi/n;
  du=u;
  for k=2:n-1
    du(k)=u(k)*(u(k-1)-u(k+1))/(2*dx);
  end
  du(1)=u(1)*(u(n)-u(2))/(2*dx);  
  du(n)=u(n)*(u(n-1)-u(1))/(2*dx);

  for k=3:n-2
    du(k)=du(k)-alpha*(u(k+2)-2*u(k+1)+2*u(k-1)-u(k-2))/(2*dx**3);
  end
  k=1;
  du(k)=du(k)-alpha*(u(k+2)-2*u(k+1)+2*u(n)-u(n-1))/(2*dx**3);
  k=2;
  du(k)=du(k)-alpha*(u(k+2)-2*u(k+1)+2*u(k-1)-u(n))/(2*dx**3);
  k=n-1;
  du(k)=du(k)-alpha*(u(1)-2*u(k+1)+2*u(k-1)-u(k-2))/(2*dx**3);
  k=n;
  du(k)=du(k)-alpha*(u(2)-2*u(1)+2*u(k-1)-u(k-2))/(2*dx**3);
  
