Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I frequently have trouble trying to place limits on Solve or Reduce using assumptions and domains. For example, this code:

Assuming[x > 0 && x < 1, Solve[(1 - (1 - x)^3)^3 == x, x, Reals]]

Produces results both with complex number, and with x outside the range specified. The exact output is long (and includes the desired results), but a subset is pasted below. What is going on? $$\left\{\{x\to 0\},\{x\to 1\},\left\{x\to 1-\frac{\left(1-i \sqrt{3}\right) \left(\frac{1}{2} \left(-9+\sqrt{93}\right)\right)^{1/3}}{2 3^{2/3}}+\frac{1+i \sqrt{3}}{2^{2/3} \left(3 \left(-9+\sqrt{93}\right)\right)^{1/3}}\right\}\right\}$$

share|cite|improve this question
up vote 2 down vote accepted

Solve[{(1 - (1 - x)^3)^3 == x, 0 < x < 1}, x, Reals] works fine in Mathematica 8... Reduce[{(1 - (1 - x)^3)^3 == x, 0 < x < 1}, x, Reals] is pretty much equivalent.

share|cite|improve this answer
Hmmm.. I am on 7 right now, but I believe I had the same problem on my home computer, which has 8 (for students). I'll double check when home. But even if it is just for 7, I still don't get why it doesn't work. The code we entered was exactly the same. – OctaviaQ Sep 18 '11 at 16:37
Well, Assuming[] does not seem to be suited for use with Solve[] or Reduce[]; better to input the constraints along with the equations for these. – J. M. Sep 18 '11 at 16:51
Hmmm... ok when I use reduce, and I do it the way you suggest, it works. Solve still gives me complex numbers. But, this is better, thanks! – OctaviaQ Sep 18 '11 at 16:53
Still have the problem in v8, but only sporatically. I guess I'll just assume it's a bug. – OctaviaQ Sep 25 '11 at 18:15
@JandR: As a point of note, Solve changed between v.7 and v.8. In v.7 the third param was for variables to eliminate, and in v.8 it is for the domain. Also, according to the docs, Assuming only affects those functions that have an Assumptions option. So, you have to include your assumptions as extra equations passed to Solve and Reduce, as J.M. shows. – rcollyer Oct 9 '11 at 17:55

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.