function up = kepler ( t, u )

%*****************************************************************************80
%
%% kepler() evaluates the right hand side of the Kepler ODE.
%
% Pre: t (time) is a scalar and u is a 4-vector whose components
%      have the property that
%
%            u(1) = x(t)      u(2) = (d/dt)x(t)
%            u(3) = y(t)      u(4) = (d/dt)y(t)
%
%      where (x(t),y(t)) are the equations of motion in
%      the 2-body problem.
%
% Post:up is a 4-vector with the property that  it is
%      the derivative of u at time t.
%      
  r3 = (u(1)^2 + u(3)^2)^1.5;

  up(1,1) =  u(2);
  up(2,1) = -u(1)/r3;
  up(3,1) =  u(4);
  up(4,1) = -u(3)/r3;

  return
end

