# Evaluating double Integral

While trying to evaluate the integral $\int_{y=0}^{x_2}\int_{x=0}^{min(x_1,y)} n (n - 1) (1 - y)^{(n - 2)}dxdy$ , Mathematica does not seem to yield any results.

 Integrate[n (n - 1) (1 - y)^(n - 2), {y, 0, x2}, {x, 0, Min[y, x1]}]


Wolframm alpha also fails saying standard computation time exceeded. Is there anyway to evaluate the integral? I also tried this,

Assuming[0 < x1 < x2 < 1,
Integrate[n (n - 1) (1 - y)^(n - 2), {y, 0, x2}, {x, 0, Min[y, x1]}]]

• No assumptions on n? May 20, 2013 at 6:38

Hopefully we're converging on the desired integral:

Assuming[(0 < x1 < x2 < 1),
Integrate[n (n - 1) (1 - y)^(n - 2), {y, 0, x2}, {x, 0, x1}]]


(n x1 (-1 + (1 - x2)^n + x2))/(-1 + x2)


Though it may be that what you are after is:

Assuming[(0 < x1 < x2 < 1),
Integrate[n (n - 1) (1 - y)^(n - 2), {x, 0, x1}, {y, 0, x2}]]


x1 (n - n (1 - x2)^(-1 + n))

The difference between the two is the order of integration: the first variable given corresponds to the outermost integral, and is done last.

• updated the question. I made some mistake while copying the code..
– AIB
May 20, 2013 at 10:51
• Do you want it with or without the $n$ in the integrand? It works either way. May 20, 2013 at 11:01
• with n..Anyway, since they are constants , doesnt matter
– AIB
May 20, 2013 at 11:52
• This is the actual integral I'm trying to evaluate: $\int_{x=0}^{x_1} \int_{y=0}^{x_2} n (n - 1) (1 - y)^{(n - 2)}dxdy$ subject to $0<x<y<1$ and $0<x_1<x_2<1$
– AIB
May 20, 2013 at 12:05
• @AIB: You still haven't answered my question. No assumptions on $n$? BTW, you might be interested in Boole[]. May 20, 2013 at 12:09