ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 20 Oct 2013 11:35:14 +0200TypeError: ECL says: Maxima asks: Is y positive, negative, or zero?https://ask.sagemath.org/question/10636/typeerror-ecl-says-maxima-asks-is-y-positive-negative-or-zero/I'm using sage to give me the inverse of functions using solve(). Most of the time, it works fine. But when I have roots of anything involved(for example, "solve((5x-2)^(1/7)==y,x)", I get the error message in the title. Is there any way around this?Sun, 20 Oct 2013 10:22:35 +0200https://ask.sagemath.org/question/10636/typeerror-ecl-says-maxima-asks-is-y-positive-negative-or-zero/Answer by vdelecroix for <p>I'm using sage to give me the inverse of functions using solve(). Most of the time, it works fine. But when I have roots of anything involved(for example, "solve((5x-2)^(1/7)==y,x)", I get the error message in the title. Is there any way around this?</p>
https://ask.sagemath.org/question/10636/typeerror-ecl-says-maxima-asks-is-y-positive-negative-or-zero/?answer=15571#post-id-15571Hi,
The ECL lib complains because (to its mind) the answer depends on the fact that y being positive negative or zero. To specify some restriction on variables within Sage just do
sage: var('y')
y
sage: assume(y > 0)
sage: solve((5*x-2)^(1/7)==y,x)
[x == 1/5*y^7 + 2/5]
Now, the operation x -> x^(1/7) looks unamiguous on RR because x -> x^7 is a bijection on RR.
An alternative would be to rewrite the equation
sage: var('y')
y
sage: solve((5*x-2)==y^7,x)
[x == 1/5*y^7 + 2/5]
Sun, 20 Oct 2013 11:35:14 +0200https://ask.sagemath.org/question/10636/typeerror-ecl-says-maxima-asks-is-y-positive-negative-or-zero/?answer=15571#post-id-15571