Adding Symbol('t') to the free_symbols property of my class worked!
Here's what it can do now:

In [1]: run kinematics.py

In [2]: x = TVS('x')

In [3]: y = TVS('y')

In [4]: t = Symbol('t')

In [5]: diff(2 * x**2 + 4 + y,t)
Out[5]: 4*x*xdt + ydt

In [7]: diff(diff(2 * x**2 + 4 + y,t),TVS('xdt'))
Out[7]: 4*x


TVS is timevaryingsymbol, athough I think Renato's DynamicSymbol
sounds better.
I think this is exactly what I wanted; Thanks!

-Gilbert



On Jun 4, 7:16 am, Chris Smith <[email protected]> wrote:
> It would help me understand if you gave an example input/output pair so I
> could see what you were wanting to do. I did look at the gist but didn't see
> the output that you wanted. Would idiff be of any use?
>
>     >>> help(idiff)
>     Help on function idiff in module sympy.geometry.util:
>
>     idiff(eq, y, x, dep=None)
>         Return dy/dx assuming that y and any other variables given in dep
>         depend on x.
>
>         >>> from sympy.abc import x, y, a
>         >>> from sympy.geometry.util import idiff
>
>         >>> idiff(x**2 + y**2 - 4, y, x)
>         -x/y
>         >>> idiff(x + a + y, y, x)
>         -1
>         >>> idiff(x + a + y, y, x, [a])
>         -D(a, x) - 1

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