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 comput
On 24/05/16 20:05, Michael Orlitzky wrote:
On 05/24/2016 10:20 AM, Vincent Delecroix wrote:
The above is coherent. But I would prefer if simplify_real would raise
an error if some argument of sqrt has a chance to be < 0.
What about sqrt(2*x^16 + 10*x^11 - 9*x^10 + x^7 + x^4 - 17*x^2 - x)?
On 05/24/2016 10:20 AM, Vincent Delecroix wrote:
>
> The above is coherent. But I would prefer if simplify_real would raise
> an error if some argument of sqrt has a chance to be < 0.
>
What about sqrt(2*x^16 + 10*x^11 - 9*x^10 + x^7 + x^4 - 17*x^2 - x)?
--
You received this message because y
On 24/05/16 09:13, Eric Gourgoulhon wrote:
Le mardi 24 mai 2016 16:03:55 UTC+2, Michael Orlitzky a écrit :
If you're sure that every expression involved is real, that's still the
correct answer, because x == 0. If sqrt(x) or sqrt(-x) might not be
real, you're going to get nonsense calling
Le mardi 24 mai 2016 16:03:55 UTC+2, Michael Orlitzky a écrit :
>
>
> If you're sure that every expression involved is real, that's still the
> correct answer, because x == 0. If sqrt(x) or sqrt(-x) might not be
> real, you're going to get nonsense calling simplify_real() on them.
>
>
Yes, I t
On 05/24/2016 09:55 AM, Vincent Delecroix wrote:
> Well
>
> sage: (sqrt(-x) * sqrt(x) * sqrt(-x) * sqrt(x)).simplify_real()
> -x^2
>
If you're sure that every expression involved is real, that's still the
correct answer, because x == 0. If sqrt(x) or sqrt(-x) might not be
real, you're going to g
Well
sage: (sqrt(-x) * sqrt(x) * sqrt(-x) * sqrt(x)).simplify_real()
-x^2
Vincent
On 24/05/16 08:13, Eric Gourgoulhon wrote:
Le mardi 24 mai 2016 14:21:23 UTC+2, vdelecroix a écrit :
Hi Eric,
Thanks for sharing the `simplify_real`!
However, I am not happy with this solution either. The m
Le mardi 24 mai 2016 14:21:23 UTC+2, vdelecroix a écrit :
>
> Hi Eric,
>
> Thanks for sharing the `simplify_real`!
>
> However, I am not happy with this solution either. The method
> simplify_real never checks the domain of functions. This is a complete
> nonsense.
>
> sage: (sqrt(-x) * sqrt
Hi Eric,
Thanks for sharing the `simplify_real`!
However, I am not happy with this solution either. The method
simplify_real never checks the domain of functions. This is a complete
nonsense.
sage: (sqrt(-x) * sqrt(-x)).simplify_real()
-x
I would like simplify to do the following
- if ther
Hi Vincent,
Note that with your assumptions, invoking simplify_real() does the job:
sage: bool((sqrt(x) * sqrt(y) == sqrt(x*y)).simplify_real())
True
This is because
sage: sqrt(x*y).simplify_real()
sqrt(x)*sqrt(y)
Best regards,
Eric.
--
You received this message because you are subscribed
On Tuesday, May 17, 2016 at 2:36:45 PM UTC-7, vdelecroix wrote:
>
> Nice! Thanks Nils. What about introducing the following scheme in all
> relevant functions
>
> {{{
> if all variables are real:
> turn maxima in real domain
>
> do what has to be done
>
> if all variables are real:
>
On 17/05/16 16:26, Nils Bruin wrote:
On Tuesday, May 17, 2016 at 1:27:40 PM UTC-7, vdelecroix wrote:
Is there a way to let Sage knows about sqrt(xy) = sqrt(x) sqrt(y) in the
case x and y real positive?
Vincent
Perhaps this is cheating:
sage: maxima_calculus("domain:real")
real
sage: var("
On Tuesday, May 17, 2016 at 1:27:40 PM UTC-7, vdelecroix wrote:
>
> Is there a way to let Sage knows about sqrt(xy) = sqrt(x) sqrt(y) in the
> case x and y real positive?
>
> Vincent
Perhaps this is cheating:
sage: maxima_calculus("domain:real")
real
sage: var("x,y");
sage: bool(sqrt(x)*sqr
13 matches
Mail list logo