>>> from __future__ import division ... ... from sympy import * ... from 
sympy.tensor import IndexedBase, Idx ... ... a, b = symbols('a b') ... 
F_tensor = symbols('F_tensor', cls=Function)
... ... i = map(Idx, ['i']) ... ... x = IndexedBase('x') ... y = 
IndexedBase('y') ... 
>>> F_tensor = (y[i] - (b*x[i]+a))**2
>>> F_tensor
(−a−bx[i]+y[i])2
>>> diff(F_tensor, b)
−2(−a−bx[i]+y[i])2 x[i](−a−bx[i]+y[i])−1

-- 
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/37834bb3-bae0-4678-9471-34b0afacca9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to