3
$\begingroup$

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]}]]
$\endgroup$
1

1 Answer 1

5
$\begingroup$

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}]]

which has answer

(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}]]

which has answer:

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.

$\endgroup$
7
  • $\begingroup$ updated the question. I made some mistake while copying the code.. $\endgroup$
    – AIB
    May 20, 2013 at 10:51
  • $\begingroup$ Do you want it with or without the $n$ in the integrand? It works either way. $\endgroup$
    – bill s
    May 20, 2013 at 11:01
  • $\begingroup$ with n..Anyway, since they are constants , doesnt matter $\endgroup$
    – AIB
    May 20, 2013 at 11:52
  • $\begingroup$ 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$ $\endgroup$
    – AIB
    May 20, 2013 at 12:05
  • $\begingroup$ @AIB: You still haven't answered my question. No assumptions on $n$? BTW, you might be interested in Boole[]. $\endgroup$ May 20, 2013 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.