CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
| Download
Project: Support and Testing
Views: 47Image: ubuntu2204
This use of solve works fine with one variable:
x
x^2=1 only
[]
If you use assume and solve together with more than one variable, then the assumptions just get ignored.
(x, y)
x^2=1 and y^2=1
[[, ], [, ], [, ], [, ]]
Using algorithm='sympy' uses sympy to solve, but doesn't take into account assumptions, evidently (because we never implemented that):
[, , , ]
Directly imposing constraints with sympy doesn't doesn't help (because probably the print name of var doesn't matter?):
x
y
[, , , ]
You can use Sympy entirely for this and that works fine (note that it solves for setting each expression to 0):
[(1, 1)]
[(1, 1)]