import numpy as np
def main():
    #1-- Integral积分
    from scipy.integrate import quad, dblquad, nquad
    print(quad(lambda x:np.exp(-x),0,np.inf))
    print(dblquad(lambda t,x:np.exp(-x*t)/t**3, 0, np.inf, lambda x:1,lambda x:np.inf))
    def f(x,y):
        return x*y
    def bound_y():
        return [0,0.5]
    def bound_x(y):
        return [0,1-2*y]
    print(nquad(f,[bound_x,bound_y]))

if __name__ == '__main__':
    main()

  

相关文章:

  • 2021-07-16
  • 2021-08-24
  • 2021-04-04
  • 2021-07-30
  • 2021-11-07
  • 2021-10-05
  • 2021-11-15
  • 2022-02-13
猜你喜欢
  • 2021-09-06
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2021-10-21
  • 2021-11-23
  • 2021-10-10
相关资源
相似解决方案