Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

solve((x^3 - 4*x) > 0,x) does not enforce condition assume(x > 0)

I actually have two (related) questions.

First question, am I misunderstanding the following code?

forget()
assume(x>0)
solve((x^3 - 4*x) > 0,x)

The solution given by sagemath-7.3 is

[[x > -2, x < 0], [x > 2]]

but I would expect only the solution [x > 2] under the condition x > 0.

Is this a bug or am I doing something wrong?

Second question. How can I enforce the condition x > 0 myself and "solve" the resulting conditions of:

[[[D < -2],
  [D > 0, D < -1/9*sqrt(1081) + 116/9],
  [D > 1/9*sqrt(1081) + 116/9]],
 [[D > -4, D < -2],
  [D > 2, D < -1/3*sqrt(7009) + 116/3],
  [D > 1/3*sqrt(7009) + 116/3]],
 [[D > -4, D < 0], [D > 2, D < 11]],
 [[D < -6], [D > -2, D < 0], [D > 2, D < 19]],
 [[D < -4], [D > -2, D < 0], [D > 2]],
 [[D > -6, D < -4], [D > -2, D < 0], [D > 2]]]

How can I solve this type of question efficiently? I believe that discarding the negative solutions in the above system will imply that 2 < D < 1/9(116 - sqrt(1081)), for example. However, I'd like to do this for many other cases as well.

Any help will be appreciated!