public static void solveInequalitiesEquationSymja(){
EvalUtilities util = new EvalUtilities(false, true);
IExpr result = util.evaluate("x^2<x");
IExpr result2 = Solve(result,x);
System.out.println("################## Inequalities equation ##################");
System.out.println(result);
System.out.println(result2);
}
结果是 x^2 < x
结果 2 是求解(x^2< x,x)
public static void solveModuleEquationSymja() {
ExprEvaluator util = new ExprEvaluator();
Parser parser = new Parser();
ASTNode exprNode = parser.parse("Sqrt[x^2] == 7");
AST2Expr ast2Expr = new AST2Expr();
IExpr ast = ast2Expr.convert(exprNode);
IAST function = Solve(ast, x);
IExpr result = util.evaluate(function);
System.out.println("################## Module equation ##################");
System.out.println(result);
}
{{x->-7},{x->7}} 有没有不使用 sqrt(x^2) 而是直接使用模数(x) 的解决方案?
先感谢您