How to solve absolute value equations?
moliata opened this issue · comments
To fix this, we need to set Symbol as a real number. But I can't find where SymPy Gamma converts string to a SymPy Input and where specifically variables to Symbols.
@moliata Update sympy to the latest version and using solveset is viable option.
solveset (Abs(x), x)
This can be done in resultsets.py
diff --git a/app/logic/resultsets.py b/app/logic/resultsets.py
index 90004f0..171d8a1 100644
--- a/app/logic/resultsets.py
+++ b/app/logic/resultsets.py
@@ -701,7 +701,7 @@ no_pre_output = lambda *args: ""
all_cards = {
'roots': ResultCard(
"Roots",
- "solve(%s, {_var})",
+ "solveset(%s, {_var})",
lambda statement, var, *args: var,
format_output_function=format_list),
@charlesverge how can I update SymPy to the new version without having issues with dependency mpmath?
@moliata The pip command should be able to install mpmath for you.
@charlesverge my instance of SymPy Gamma is on Google App Engine, not on a local machine.