I want to take this triple integral over func(eps,e,p,M)
:
The integral is over eps
, e
and p
and the code is here:
def Probability(eps,e,p,M):
prob=eps*e*(e**2-p**2)*function(M)
return prob
a=0
b=np.inf
def gfun():
return 0.25
def hfun():
return 0.5
def qfun(e):
return -e
def rfun(e):
return 3*e-1
def n(M):
n=integrate.tplquad(Probability, 0, np.inf,gfun,hfun,qfun,rfun,args=(M))
return n
but I get this error:
integrate() argument after * must be an iterable, not float
I don't know what's the problem, and the other question: is the ordering of parameters in function Probability True?