title: Python scipy.integrate.odeint failure for simple gravity simulation
body: <p>I am trying to write a very simple gravity simulation of a mass orbiting the origin. I have used scipy.integrate.odeint to integrate the differential equations.</p>
  
  <p>The problem is that I get the following error message:</p>
  
  <pre><code>ODEintWarning: Excess work done on this call (perhaps wrong Dfun type). Run with full_output = 1 to get quantitative information.
    warnings.warn(warning_msg, ODEintWarning)
  </code></pre>
  
  <p>As well as this something is clearly going wrong - the equations are not being integrated correctly and the motion is incorrect. Below is a plot of the motion for initial conditions that should give circular motion around the origin:</p>
  
  <p><a href="https://i.stack.imgur.com/T75g8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T75g8.png" alt="image"></a></p>
  
  <p>This is the code:</p>
  
  <pre><code>import numpy as np
  from scipy.integrate import odeint
  import matplotlib.pyplot as plt
  
  G=1
  m=1
  def f_grav(y, t):
      x1, x2, v1, v2 = y
      m = t
      dydt = [v1, v2, -x1*G*m/(x1**2+x2**2)**(3/2), -x2*G*m/(x1**2+x2**2)**(3/2)]
      return dydt
  
  t = np.linspace(0, 100, 1001)
  init = [0, 1, 1, 0]
  ans = odeint(f_grav, init, t)
  print(ans)
  
  x = []
  y = []
  for i in range (100):
      x.append(ans[i][0])
      y.append(ans[i][1])
  plt.plot(x, y)
  plt.show()
  </code></pre>
  
  <p>Note that I have used this function before, and writing almost identical code for an SHM differential equation obtains correct results. Changing the numbers in <code>t</code> does not help. Does anyone have any idea as to why this may be failing so badly?</p>