计算此积分的任何帮助,F
函数都使用f
涉及第一次积分的函数定义,最后是积分F
。
from scipy.integrate import quad
f = lambda x,a : a**2*x
def F(s,a):
return quad(f,0,s,args=(a,))
quad(F,0,5,args=(4,))
得到错误:
2 def F(s,a):
3 return quad(f,0,s,args=(a,))
----> 4 quad(F,0,5,args=(4,))
5
446 if points is None:
447 if infbounds == 0:
--> 448 return _quadpack._qagse(func,a,b,args,full_output,epsabs,epsrel,limit)
449 else:
450 return _quadpack._qagie(func,bound,infbounds,args,full_output,epsabs,epsrel,limit)
TypeError: must be real number, not tuple