Ask Your Question

aldo's profile - activity

2015-12-25 16:09:54 +0200 received badge  Popular Question (source)
2015-12-25 16:09:54 +0200 received badge  Notable Question (source)
2015-12-25 16:09:54 +0200 received badge  Famous Question (source)
2015-03-16 18:46:36 +0200 received badge  Nice Question (source)
2015-03-16 18:45:36 +0200 received badge  Student (source)
2015-03-16 17:06:26 +0200 asked a question Questions about the parameters in the output of solve

I am writing a program that, among other things, has to solve many systems of polynomial equations (of degree <= 3) determined by the data entered by the user. Each system of equations consists of 3 equations in 3 variables. Sometimes the equations in a given system are redundant, and therefore the output of solve contains parameters (free variables). Is there any way to know which variables in the output of solve are the parameters (without having to look at the actual output in Sage)?

Here is a simple example.


The output is

[{x: -r6 + 1, y: r6}]

How do I know which variable is the free variable in this case (without looking at the output)? Is it true that the free variable(s) in the output of solve will always be the "last variable(s)" (in the alphabetical order), y in this case? Is there a is_free_variable function (similar to the is_integer function)? In my program, I need to be able to identify the free variables in the solution of solve, y in this case, without looking at the output, and substitute those variables by a few numerical values.

I understand that the solve function in Sage uses the corresponding Maxima function. It seems that Sage does not recognize the Maxima function %rnum_list (which gives the list of parameters introduced in the solutions by solve and algsys). Is there a Sage function that does the same as %rnum_list?