I apologize if this not the correct place to ask a simple user question, but I'm having some trouble understanding SymPy.
I am not a mathematician, and I'm trying to use SymPy for symbolic differentiation. I can differentiate basic functions but I'm having trouble with one that has summation and vectors. It's an objective function for an optimization problem. How would I a represent an error function like this in SymPy? Sorry I don't know how to write these mathematical functions as plain text, hopefully you can understand it: f(x) = Sum from n=1 to N: (yn - xn)^2 where y and x are vectors with N elements. I'm basically summing the squared error of the vector x compared to the target vector y. My actual function is something like f(x) = (1 / Sum from n=1 to N: xn) * (Sum from n=1 to N: ((yn - xn)^2 / xn)) I need to represent these types of functions as SymPy functions so I can get their derivatives, so I can use them in in gradient decent optimization algorithms. Any help would be very much appreciated. -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sy...@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.