# User defined function

I'm working with beta distribution and its integral. A straightforward integral of beta distribution would return the hypergeometric form of the incomplete beta function. This makes my results very messy and difficult to work with. I have been able to define a function class IncBeta as

def D_t(self, t, z, w, **kwds):
return t^(z-1)*(1-t)^(w-1)#/beta(z, w)

IncBeta=function('IncBeta', nargs=3, derivative_func=D_t, latex_name='I_x')


Is there a way that I can define an inverse function class of the above and tell Sage the integral of that inverse function leads to IncBeta?

edit retag close merge delete

1

What you seek is a way to define some integrate_func ; as far as I know, there is no easy way to do that.

It should be noted that, even if Maxima "knows" that :

(%i21) diff(beta_incomplete(a, b, z), z);
(%o21) (1-z)^(b-1)*z^(a-1)


it won't use it to compute :

(%i22) integrate(x^(a-1)*(1-x)^(b-1), x);
(%o22) 'integrate((1-x)^(b-1)*x^(a-1),x)


Your problem is not limited to Sage...

( 2021-11-19 21:20:38 +0200 )edit