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/e4ca4e16-c983-4848-97c6-d20295fab87f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.