Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I've been having trouble to make mathematica evaluate an integral without specifying the values of the limits of integration. I mean, if I write


Mathematica returns the correct answer: $\frac{(x2)^2-(x1)^2}{2}$. But If I write something like


Mathematica just keeps the evaluation forever...

Is there something that I can do to avoid this behaviour?

share|improve this question
Consider what happens when x1 <= 1 <= x2 –  belisarius is forth Feb 26 '13 at 1:20

1 Answer 1

up vote 3 down vote accepted

The integral doesn't converge everywhere, see @belisarius comment, so tell Integrate what constraints you have on x1 and x2 via the Assumptions option:

Integrate[x^2/(1 - x), {x, x1, x2}, Assumptions -> 1 < x1 < x2 || x1 < x2 < 1]
(* 1/2 (x1 - x2) (2 + x1 + x2) + Log[1 - x1] - Log[1 - x2] *)
share|improve this answer
Oh, thank you. I din't know that I had to specify that, but obviously it makes perfect sense. Thank you –  PML Feb 26 '13 at 2:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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