Peace be upon you,
I have the following definite integral for the mathematical expectation of some distribution \begin{align*} \int_{-1}^1 z^2\int_{\max(z-1,-1)}^{\min(0,z)} (z-y)^a(-y)^b \ ,dy \,dz \end{align*} where \begin{align*} a,b\in(-1,0) \end{align*} I have the following result for the answer of the related definite integral. Though, it is very long, but I could take its advantage if Hypergeometric function was defined in either of Octave, Scilab or Apache Common Math (java library); because I need to use it in my program in Java and these are java connection bridges to open-source math world.
However, I think that it is not necessary for me to exhaust my self by such formula when my integral is a specifically special case of the indefinite one. I suppose that it can be written in terms of a simpler well-known function (something similar to incomplete Beta function).
Here I see that it has some problems to become a function of incomplete Beta function \begin{align*} &\int_{-1}^0 z^2\int_{-1}^z (z-y)^a(-y)^b\,dy\,dz &&+\int_0^1 z^2\int_{z-1}^0 (z-y)^a(-y)^b \, dy \, dz\\ &\int_{-1}^0 z^2\int_{-z}^1 (z+y)^a y^b \, dy \, dz &&+\int_0^1 z^2\int_0^{1-z} (z+y)^a y^b \, dy \, dz \\ &\int_{-1}^0 z^2 \int_0^{1+z} y^a (-z+y)^b \, dy \, dz &&+\int_0^1 z^2\int_0^{1-z} (z+y)^a y^b \, dy \, dz \\ &\int_{-1}^0 (-1)^{b}z^{2+a+b} \int_0^{1+z} (\frac{y}{z})^a (1-\frac{y}{z})^b \, dy \, dz&&+\int_0^1 (-1)^b z^{2+a+b}\int_0^{1-z} (\frac{-y}{z})^b (1-\frac{-y}{z})^a \, dy \, dz\\ \end{align*} As you can see the internal terms are similar but different (regarding $dy$) from incomplete Beta function: \begin{align*} B\left(x; a,b \right)= \int_0^x t^{a-1} (1-t)^{b-1} dt \end{align*} However, I do not persist that it becomes in terms of the incomplete Beta function. I only want to analytically solve this to become in terms of a well-known function and run it on Octave or Scilab or Apache common math. Any idea?