On Mon, Apr 21, 2014 at 11:30 AM, Peter Eastman <[email protected]> wrote:
>> Another option might be to use a substitution sqrt(v1**2 + v2**2 + v3**2)
>> -> |v|.
>
>
> That works for this toy example because it's so simple.  But in the real
> calculation I'm trying to do, I have a couple of dozen variables that are
> all related to each other in different ways, and finding the simplest
> representation of an expression can require lots of different
> transformations between them in different directions.  Also, if I do the
> substitution you suggest I can no longer do any calculations with the
> resulting expression, because it now includes the variable v along with v1,
> v2, and v3, and Sympy doesn't know how it's related to them.

Right. Is there any other CAS that can do this better (maybe
Mathematica)? Pretty much you want to calculate the derivatives
in a "clever" way. I am not sure how this would be implemented, other
than SymPy knowing that sqrt(v1**2 + v2**2 + v3**2) and |v|
is the same thing.

Ondrej

-- 
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/CADDwiVB_azFDSS_0Vu4kf0j9OnZWq6qdjQ5TR%2B89GOrQBAFx%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to