Hello,
I am trying to re-implement most of the code from "Structure and
Interpretation of Classical Mechanics" (Sussman and Wisdom,
http://mitpress.mit.edu/sicm) in sympy.  The original language is
their particular dialect of Scheme.  I have had success with most of
the first chapter, but with quite a few "kludges": I will mail the
mailing list with details when the code is a bit cleaner.

Currently, I find the following issue:

theta = Function("theta")
phi = Function("phi")
psi = Function("psi")
t = symbols("t")
trigsimp(expand(diff(theta(t),
t)*sin(phi(t))*sin(psi(t))*sin(theta(t)),True,True),True,True)
(output)==>  0
trigsimp(expand(diff(theta(t),
t)*sin(phi(t))*sin(psi(t))*sin(theta(t)),True,True),True,False)
(output)==>  D(theta(t), t)*sin(phi(t))*sin(psi(t))*sin(theta(t))

The second answer is correct, the first is wrong.  Is there a problem
with recursive evaluation when derivatives are present?  I ran into
this problem when trying to simplify the derivative of a matrix.
Without "recursive", non-derivative expressions are rather
inadequately simplified; with "recursive", expressions containing
derivatives apparently return zero.

A previous issue, while I am on the subject: "from sympy import *"
clobbers the Python builtin "sum" function, so eg
sum([1,2,3])
doesn't work.  Is that intended?

All this is on Sympy 0.6.6. (Ubuntu 10.04 package).  Should I upgrade?

Thanks,

Rahul

-- 
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.

Reply via email to