Simplify the solution

Issue #159 closed
Former user created an issue

Hi,

I'm running the next code (with the latest changes you committed) IExpr exp = util.evaluate("Solve(x==2.0Sqrt(y)Sqrt(z),y)");

And get the next solution: {{y->0.25*(x/Sqrt(z))^2.0}}

How can I change the solution to be: {{y->0.25*x^2/z}}

Thanks

Comments (3)

  1. Axel Kramer repo owner

    This kind of simplification is only done in "exact mode":

    >> Solve(x==2*Sqrt(y)*Sqrt(z),y)
    {{y->x^2/(4*z)}}
    

    If you use floating point numbers like 2.0 you are in "numeric mode" and this simplification isn't done.

  2. Yehonatan Yochpaz

    Hi, Thanks for the response. Can I do something so the "numeric mode" will give me the my expected result?

  3. Log in to comment