# Define
var('y'); var('x')
f(x,y)= -(x*y)*exp(-(x^2 + y^2))
fdx(x,y) = derivative(f(x,y), x)
fdy(x,y) = derivative(f(x,y), y)

# Check
print f(x,y)-f(y,x)

# Compare these
print derivative(f(x,y), x).simplify_full()
print derivative(f(x,y), y).simplify_full()

This will print

0
(2*x^2 - 1)*y*e^(-x^2 - y^2)
(2*x*y^2 - x)*e^(-x^2 - y^2)

Why is this? I can add ".collect('x')" at end of second expression, but I don't understand why it is not needed in first expression.

This is version 5.4.

--
Jori Mäntysalo

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to sage-support@googlegroups.com.
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to