Ask Your Question

Solve behaviour on same equation twice

asked 2015-02-16 10:03:27 +0200

Thorsten gravatar image

Two questions: The first one: Solving an equation:


gives the solution [a=pi] but


raises to the somehow better solution [[a == pi*z425]] Where is the difference between the two equations?

A second one: A previous version of sage 5.something could solve


However Sage 6.4.1 Returns an empty list.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2015-02-23 08:43:09 +0200

Thorsten gravatar image

I have now looked at the underlying code for solve. It turns out that if the first argument of solve is an equation or a list of just one equation the object function sage.symbolic.expression.Expression.solve is used. This explains why the output of




may differ. To force to get all solutions in the first case one can use


Another thing I've found out is that in the definition of the underlying maxima function solve is declared as solve ([eqn_1, …, eqn_n], [x_1, …, x_n]) so the number of equations should match the number of variables.

If one reformulates the problem to


all solutions will be displayed.

However I liked the behaviour of previous Versions of sage That is: If solve could't find a solution the original equation was returned. That way it was clear that there may exist solutions sage could not found.

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

1 follower


Asked: 2015-02-16 10:03:27 +0200

Seen: 275 times

Last updated: Feb 23 '15