Hello, On Sun, Jun 10, 2012 at 6:37 PM, Alan Bromborsky <[email protected]> wrote: > Consider the expression: > > A = (-3.0*x**2*(x**2 + y**2 + z**2)**(-2.5) - 3.0*y**2*(x**2 + y**2 + > z**2)**(-2.5) - 3.0*z**2*(x**2 + y**2 + z**2)**(-2.5) + 3*(x**2 + y**2 + > z**2)**(-1.5)) > > It is zero, but sympy cannot simplify it. Now consider > > ((x**2 + y**2 + z**2)**(2.5))*A = (-3.0*x**2 - 3.0*y**2 - 3.0*z**2 + 3*(x**2 > + y**2 + z**2)**1.0) > > which is again zero but sympy cannot simplify (x**2 + y**2 + z**2)**1.0 to > (x**2 + y**2 + z**2) > > Is there a good general strategy for simplifying sums of radicals which > frequently occur in vector analysis.
Is there a reason to use float numbers instead of Rationals here? When I substitute floats with corresponding Rationals, SymPy successfully reduces the first two expressions to zero. Sergiu -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
