text: import numpy as np
  from runge_kutta import runge_kutta
  
  
  def f(u, t, mu=0.012277471):
      
      u1 = u[0]
      u2 = u[1]
      v1 = u[2]
      v2 = u[3]
  
      D1=((u1 + mu)**2 + u2**2)**(3/2)
      D2=((u1 - (1.0-mu))**2 + u2**2)**(3/2)
      
      res = np.array([
          v1,
          v2,
          u1 + 2.0*v2 - (1.0 - mu)*(u1+mu)/D1 - mu*(u1 - (1.0 - mu))/D2,
          u2 - 2.0*v1 - (1.0 - mu)*u2/D1 - mu*u2/D2
      ], dtype=float)
  
      return res
  