Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After executing the start of your code :

sage: h
(p1, alpha, beta) |--> 1/(p1^(2/3)*(-p1 + 1)^(2/3))
sage: k`k`
(p1, xi) |--> -(e^(-p1*xi) - 1)*e^(-p1*xi)
sage: hk
(p1, alpha, beta, xi) |--> -(e^(-p1*xi) - 1)*e^(-p1*xi)/(p1^(2/3)*(-p1 + 1)^(2/3))

Both h and k are symbolic functions (more precisely callable symbolic expressions needing respectively three and four arguments. But so is hk which needs four arguments.

iuntegrate works on symbolic expressions, not on such functions. What you intended is probably :

sage: definite_integral(hk(p1, alpha, beta, xi), p1, 0, 1)
integrate((e^(p1*xi) - 1)*e^(-2*p1*xi)/(p1^(2/3)*(-p1 + 1)^(2/3)), p1, 0, 1)

This integral turns out to be undoable by the four built-in integrators ; mathematica_free fails to return anything. However, Mathematica boasts :

sage: mathematica.Integrate(hk(p1, alpha, beta, xi), (p1, 0, 1)).sage()
sqrt(pi)*(bessel_I(-1/6, 1/2*xi)*e^(1/2*xi) - 2^(1/6)*bessel_I(-1/6, xi))*xi^(1/6)*e^(-xi)*gamma(1/3)

Note, however, that Mathematica fails to integrate the indefinite integral :

sage: mathematica.Integrate(hk(p1, alpha, beta, xi), p1)
-Integrate[(-1 + E^(-(p1*xi)))/(E^(p1*xi)*(1 - p1)^(2/3)*p1^(2/3)), p1]

which renders impossible the verification by re-differentiation. The only possible "raincheck" would be to plot the numerical value of the Mathematica ex^ression againts the numerical integration for various value of xi, and to check that these value do not depend on alpha nor beta...

Summary : Here may be tygers...

HTH,