Skip to content

Fix solve so that additional args are properly handled #10750

@kcrisman

Description

@kcrisman

In this ask.sagemath question, there is some inconsistency in our use of Maxima's solve, or possibly its solving.

s=list(var('s_%d' % i) for i in range(3));
var('x y z');
print solve([],s_0,s_1,s_2)
print solve([z==z],s_0,s_1,s_2)
print solve([z==z,y==y],s_0,s_1,s_2)
print solve([z==z,y==y,x==x],s_0,s_1,s_2)
print solve([s_0==0],s_0,s_1,s_2);
print solve([s_0==0,s_1==s_1],s_0,s_1,s_2)
[[s_0 == c1, s_1 == c2, s_2 == c3]]
({s_0: r1}, [])
[[s_0 == r6, s_1 == r5, s_2 == r4]]
[[s_0 == r9, s_1 == r8, s_2 == r7]]
([s_0 == 0], [1])
[[s_0 == 0, s_1 == r11, s_2 == r10]]

Most of these do make sense, but you'll notice the change from complex to real variables, one place that seems to have a multiplicity, and the one with only a dictionary as output!

See also this sage-devel thread for another example of where this cropped up. We need to change the behavior of solve and the documentation to fix this.

CC: @jhpalmieri

Component: symbolics

Keywords: solve, maxima, Maxima, sd35.5

Work Issues: error in Maxima

Author: John Palmieri

Reviewer: Paul Zimmermann

Issue created by migration from https://trac.sagemath.org/ticket/10750

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions