How to get kth derivative of f(x) where k is also a dummy index in summation. sym.diff(f,x,n) is interpreted as derivative of f with respect to both x and k not as kth derivative of f(x) which is what I want. The problem I have is in this expression
sym.Sum((1/sym.factorial(k)*sym.diff(fun,x,k)*(x-a)**k),(k,0,10))
Any suggestions? I want to some over kth derivatives as in taylor series, however, I don't know how to make sympy interpret k as number - order of the derivative (coming from the summation) and not a variable when it comes to the differentiation. The problem: how sum evaluates to zero