def sphere_dydt ( t, y ): #*****************************************************************************80 # ## sphere_dydt() evaluates the derivative of the sphere ODE. # import numpy as np a = 1.6 b = 1.0 c = 2.0 / 3.0 p = y[0] q = y[1] r = y[2] dpdt = ( 1.0 / c - 1.0 / b ) * r * q dqdt = ( 1.0 / a - 1.0 / c ) * p * r drdt = ( 1.0 / b - 1.0 / a ) * q * p dydt = np.array ( [ dpdt, dqdt, drdt ] ) return dydt