title: In Python, excess work done problem for SciPY ode.int
body: <p>I'm trying to model a pursuit problem of bugs chasing one another in a 2 dimensional plane and I'm using SciPY.odeint to help me with this. With the following code, the model works however as the bugs get closer together the model breaks down and emits the  excess work done on this call (perhaps wrong Dfun type) error.</p>
  
  <pre><code>import numpy as np
  from scipy.integrate import odeint
  
  def split_list(a_list):
      half = len(a_list)//2
      return a_list[:half], a_list[half:]
  
  def diff(w, t):
      x_points, y_points = split_list(w)
      def abso(f, s):
          return np.sqrt((x_points[f] - x_points[s])**2 + (y_points[f] - y_points[s])**2)
      x_funct = [(x_points[i+1] - x_points[i]) / abso(i+1, i) for i in range(len(x_points) - 1)]
      x_funct.append((x_points[0] - x_points[-1]) / abso(0,-1))
  
      y_funct = [(y_points[i+1] - y_points[i]) / abso(i+1,i) for i in range(len(x_points) - 1)]
      y_funct.append((y_points[0] - y_points[-1]) / abso(0,-1))
      funct = x_funct + y_funct
      return funct
  
  def ode(tstart, tend, init_cond):
  
      t = np.linspace(tstart, tend, step_size)
  
      wsol = odeint(diff, init_cond, t)
      sols = [wsol[:,i] for i in range(len(init_cond))]
      x_sols, y_sols = split_list(sols)
      return x_sols, y_sols, t, tend
  
  bug_init_cond = [[-0.5, 1],
                   [0.5, 1],
                   [0.5, -1],
                   [-0.5, -1],]
  
  amount_of_bugs = 4
  step_size = 10000
  
  x_sols, y_sols, t, tend = ode(0, 5, [bug_init_cond[i][j] for j in range(2) for i in range(amount_of_bugs)])
  </code></pre>
  
  <p>As I'm quite new with using the Scipy.odeint function, I was wondering if there is a solution to this excess work done? Thank-you for your time.</p>