On 11/02/2021 20:44, Aaron Meurer wrote:


How would you handle dividing both sides of an equation by something? I don't know if a piecewise makes sense. (a = b)/x would be "a/x = b/x if x != 0, ??? otherwise". What meaningful thing could the ??? be? You can easily manipulate an equation into nonsense if you aren't careful about this (just Google "proof that 1 = 2"). But I don't know if SymPy should try to take responsibility to prevent it.

This is exactly why I think it would be good to give the users DivideSides, and MultiplySides, which they could use as they saw appropriate, rather than eqn(a,b)/c, etc.  SymPy would not take responsibility for this mathematical operation. To me, this is exactly analogous to subs:

cos(x).subs(cos,sin)

sin(x)

SymPy does not guarantee that this is valid!

Also there is absolutely no sense in which eqn(a,b) is twice as big as eqn(a,b)/2, so is it desirable that the notation should suggest that it is?

David



--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/63a41f4b-e97b-b55d-84de-e55b739b6d20%40dbailey.co.uk.

Reply via email to