Ask Your Question

Revision history [back]

When there are parameters in the equations (variables which are not variables to-solve-for), I believe SageMath assumes these to be free parameters (as mentioned by a Sage developer on StackOverflow), and so it searches only for solutions which are valid for any value of these parameters. (This seems to be not documented.)

There are no such solutions in this case, so Sage yields the empty list of solutions.

What you can try is solve for all the variables first (to find whether there are solutions at all), and then start removing variables to-solve-for, i.e. turning variables into parameters, particularly those whose values are arbitrary.

In this case you can narrow it down to e.g.


which reveals in particular the relation between parameters

E == -((H - Q)*P^2 + (H - 3*Q + 1)*P*S - 2*(Q - 1)*S^2)/(P*S)

which shows that not all the parameters are free.