Maybe it's easier to define some *if ... elif ... elif ... ... *clauses to
dispatch on the structure of F.
On Saturday, January 3, 2015 8:24:09 AM UTC+1, yueming liu wrote:
>
> According to the definition, we need the limit of the function when alpha
> approaches 0. How to implement this on a Function object?
>
> from sympy import *
> from sympy.abc import *
> from IPython.display import display
>
> init_printing(use_latex='mathjax')
>
> def func_diff(F, f, df):
> alpha = Symbol('alpha')
> F = F.subs(f, f+alpha*df)
> dF = F.diff(alpha)
> return simplify(dF.subs(alpha, 0))
>
> u = Function('u')(x,y,z)
> du = Function('\delta u')(x,y,z)
> dfun = func_diff(u**2, u, du)
> display(dfun)
>
--
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/97d092b1-d09e-42bc-9521-f363be5ae3e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.