Ask Your Question
0

TypeError: ECL says: Maxima asks: Is y positive, negative, or zero?

asked 2013-10-20 10:22:35 +0100

Snap gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-10-20 11:35:14 +0100

vdelecroix gravatar image

updated 2013-10-20 14:17:44 +0100

Hi,

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]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-10-20 10:22:35 +0100

Seen: 1,634 times

Last updated: Oct 20 '13