def intcurve_diffequ(vector_field, param, start_point, coord_sys=None):
 if ((contravariant_order(vector_field) != 1) or covariant_order(vector_field)):
  raise ValueError('The supplied field was not a vector field.')
 coord_sys = (coord_sys if coord_sys else start_point._coord_sys)
 gammas = [Function(('f_%d' % i))(param) for i in range(start_point._coord_sys.dim)]
 arbitrary_p = Point(coord_sys, gammas)
 coord_functions = coord_sys.coord_functions()
 equations = [simplify((diff(cf.rcall(arbitrary_p), param) - vector_field.rcall(cf).rcall(arbitrary_p))) for cf in coord_functions]
 init_cond = [simplify((cf.rcall(arbitrary_p).subs(param, 0) - cf.rcall(start_point))) for cf in coord_functions]
 return (equations, init_cond)

def intcurve_diffequ ( vector_field , param , start_point , coord_sys = None ) : if ( ( contravariant_order ( vector_field ) != 1 ) or covariant_order ( vector_field ) ) : raise ValueError ( 'The supplied field was not a vector field.' ) coord_sys = ( coord_sys if coord_sys else start_point . _coord_sys ) gammas = [ Function ( ( 'f_%d' % i ) ) ( param ) for i in range ( start_point . _coord_sys . dim ) ] arbitrary_p = Point ( coord_sys , gammas ) coord_functions = coord_sys . coord_functions ( ) equations = [ simplify ( ( diff ( cf . rcall ( arbitrary_p ) , param ) - vector_field . rcall ( cf ) . rcall ( arbitrary_p ) ) ) for cf in coord_functions ] init_cond = [ simplify ( ( cf . rcall ( arbitrary_p ) . subs ( param , 0 ) - cf . rcall ( start_point ) ) ) for cf in coord_functions ] return ( equations , init_cond )
return the differential equation for an integral curve of the field .