Scipy --- 5. Numerical Integration

scipyThe integratemodule provides centralized numerical integration algorithms, including Ordinary Differential ODEnumerical integration.

1. Points

(1) numerical integration function:

scipy.integrate.quad(func, a, b, args=(), full_output=0, epsabs=1.49e-08, 
  epsrel=1.49e-08, limit=50, points=None, weight=None, wvar=None,
  wopts=None, maxp1=50, limlst=50)

parameter:

  • func: A Pythonfunction function object that represents the integral. If it has a plurality of parameters, only the integral on the first parameter. Other parameters, by argsproviding
  • a: Integration lower. With -numpy.infrepresentatives negative infinity
  • b: Integral limit. With numpy.infrepresentatives of positive infinity
  • args: Additional parameters passed tofunc
  • full_output: If non-zero, then returned by the dictionary for more information
  • Other parameters to control the details of the integration. Refer to the official manual

return value:

  • y: A floating-point scalar value represents the integration result
  • abserr: A floating point number with absolute error estimate
  • infodict: A dictionary containing additional information

2. solving ordinary differential equations

Guess you like

Origin www.cnblogs.com/nxf-rabbit75/p/12108632.html