Before suggesting a solution I need to point out a problem with your
suggestion. Namely, multiplication and application are two very
different operation (there is overlap (e.g. matrix multiplication) but
I will leave it out for the moment). SymPy does not have support for
this type of "abuse of notation" for the moment. If you are
interesting implementing it yourself your best shot (in my opinion)
would be to get inspiration by the matrix expression module and the
rewrite rules module.

On the other hand if you want to use simple vanilla python for all
this you can just use the `diff` global function but presumably you do
not want that in order to facilitate automatic simplifications like
"2*p - p -> p".

If this is the case (and you are absolutely sure that this is
necessary (usually it is not)) you can try to use the differential
geometry module (in differential geometry vector fields are
differential operators). If you know the formalism it will be very
easy to use, however if you do not know it you will need to read
something more than just the documentation.

http://docs.sympy.org/dev/modules/diffgeom.html#sympy.diffgeom.BaseVectorField

On 25 January 2013 23:49, ruoyu zhang <[email protected]> wrote:
>>>> p = DifferentialOperator(t)
>>>> a * p * f(t)
> Derivative(f(t), t)*a
>
> p is a DifferentialOperator, when it multiply with some expression  at right
> side, it calculates the derivative of the expression.
>
> --
> 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].
> Visit this group at http://groups.google.com/group/sympy?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
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].
Visit this group at http://groups.google.com/group/sympy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to