On 05/24/2016 10:14 PM, Vincent Delecroix wrote:
>>
>> What about sqrt(2*x^16 + 10*x^11 - 9*x^10 + x^7 + x^4 - 17*x^2 - x)?
>>
> 
> What is the problem with this expression? It is very easy to decide the
> sign of any polynomial expression in one variable on any given interval.

But how much computation are you willing to do to determine that an
expression is nonnegative on the real line? I can think of worse things:

  sage: x = SR.var('x', domain='real')
  sage: assume(x > 0)
  sage: f = sqrt(x)

It should be safe to call simplify_real() on f, right?

  sage: f(x=I)
  sqrt(I)

To use simplify_real(), you need to be sure that all possible
subexpressions of your expression will remain real at all times
regardless of the values that you substitute for any variables. I don't
think anyone but the user can make that claim. Users probably shouldn't
do it either, but there's no other way to get simplifications like
log(8) + log(2) -> log(16).

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to