I want to calculate an integration:
x, kappa, gamma = var("x, kappa, gamma", domain="positive")
from sage.functions.gamma import gamma as Gamma # avoid conflict in names
f = (kappa/gamma)^kappa * x^(kappa - 1) / Gamma(kappa) * exp(- kappa * x / gamma) # gamma distribution
with assuming(kappa, "noninteger", kappa - 1/2 > 0):
print(assumptions()) # (1)
display(integrate(f * log(x), (x, 0, oo))) # (2)
Line (1)
did print [kappa > 0, gamma > 0, x > 0, kappa is noninteger, kappa - 1/2 > 0]
,
but in line (2)
I get
ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(kappa-1/2>0)', see `assume?` for more details)
Is kappa-1/2 positive, negative or zero?`
Any idea how to progress?
(By the way, sympy
can do the integral but the result use PieceWise
, the conversion from which to SageMath is still not implemented so algorithm="sympy"
will fail)
info:
# sage --version
SageMath version 10.1, Release Date: 2023-08-20`