Fixed multidimensional differentiation, added example