All published worksheets from http://sagenb.org
#COUNTS SUM OF PARTIAL DERIVATIVES def total(M,f): M=M.split(',') for i in range(0,len(M)): M[i]= var(M[i]) a=0 for n in M: a+=diff(f,n) return a ##TYPE VARIABLES AND POLYNOMIAL print total('x,y,z',(x^2+y^2+z^2)^2)