>>> A[i].diff(A[j])
KroneckerDelta(i, j)
>>> A[i].diff(i)
A[1]
>>> A[i**2].diff(i)
A[2*i]
But, does it make sense to derive an indexed symbol by the index?
Do you have an applied example where this would help? If it simplifies users' code I think that would be an argument for it.
I don't think it makes sense. The index is a discrete variable, but
derivatives only make sense for continuous variables.
--
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 sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/5fae1ac7-0524-43b8-88e2-2cb05139a24f%40googlegroups.com.
Perhaps the derivative should raise an exception and is_constant should ignore the derivative check if the derivative raises an exception.