Is it typical to have to "fiddle around" with different
forms of an expression to get it to simplify? For example:

In [7]: from sympy import sqrt

In [8]: foo=-sqrt(-2*sqrt(2)+3)+sqrt(2*sqrt(2)+3)

In [9]: print foo
-sqrt(-2*sqrt(2) + 3) + sqrt(2*sqrt(2) + 3)

In [10]: print foo.simplify()
-sqrt(-2*sqrt(2) + 3) + sqrt(2*sqrt(2) + 3)

In [11]: print (foo**2).expand()
-2*sqrt(-2*sqrt(2) + 3)*sqrt(2*sqrt(2) + 3) + 6

In [12]: print (foo**2).expand().simplify()
4

Or is there some kind of "general strategy" that will
always work (assuming there is clearly a simplification
possible, like an integer as above)?

-Mike

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/1400536494.2532.18%40Vector.
For more options, visit https://groups.google.com/d/optout.

Reply via email to