I've updated the routine with the suggestions given by you. So far the variational operations are being applied correctly. You create the functional using the built-in Function class and then transform it to a variational expression Vexpr(): You can then differentiate an instance of Vexpr() using diff as usual.
I would kindly ask you some more help: - how to change the printer from Function to give just "u" instead of "u(x, t)", for example. I tried subclassing Function like shown in the code but without success - how to change the printer to print "\delta" + function.__class__.__name__. In qtconsole when I create a Symbol called 'delta' it changes it to a symbolic \delta.... is it possible to declare a method in the class to guide the printer in qtconsole? Thank you all! 2013/9/5 Saullo Castro <[email protected]> > Thank you! that helped! > > > > 2013/9/5 Sergey B Kirpichev <[email protected]> > >> On Thu, Sep 05, 2013 at 01:02:14PM +0200, Saullo Castro wrote: >> > One think, is it possible to define a method like __diff__() that >> tells >> > how the class should be differentiated in Sympy, like we do for >> __mul__, >> > __add__ etc... ? >> >> See the Derivative class docstring. >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "sympy" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/sympy/cvOjJdEWprM/unsubscribe. >> To unsubscribe from this group and all its topics, 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. >> 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 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. For more options, visit https://groups.google.com/groups/opt_out.
