Maxima keep asking for assumptions even after given
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`
It may take some trial and error to get it work. E.g., the following assumption does the trick here:
@max-alekseyev thank you so much for your info! In fact
kappa > 1
alone is enough for maxima to proceed. So I guess maxima is just not properly implemented when$ 0 < \kappa < 1$? I tried different setups and maxima just keep asking for additional information yet deducible from the existing assumptions