Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I input this function in Maple:

f := (x, y) -> exp(x+xy-2*y)

And take the derivative:

diff(f(x, y), x);

I receive:

exp(x + xy - 2 y)

But I would have expected it to be:


Does anyone have an explanation for this?

share|cite|improve this question
there is a typo in your code in definition of the function $f$: you have xy instead of x*y, so Maple thinks (!) that xy is another variable rather than the product of two – Ilya Nov 23 '11 at 13:19
I don't use maple, but does it matter that you write $xy$ and not $x*y$ – draks ... Nov 23 '11 at 13:21
Ah, silly me! It does indeed work when this is fixed. – ChrKroer Nov 23 '11 at 13:22
I think that could be an answer, @Ilya. :) – J. M. Nov 23 '11 at 13:24
Even in Mathematica xy is a variable, not a product. You have to write x y for Mathematica to interpret it as an implicit product. – GEdgar Nov 23 '11 at 13:55
up vote 4 down vote accepted

Maple understand each (non-predefined) expression of the form abcde as one variable. It also works for Mathematica where abcde means one variable while a b c d e is understood as a product of $5$ variables. Spaces does not work for Maple formulas typed in plain text, so you have to use * each time you want to multiply (works as well for Mathematica).

share|cite|improve this answer
Maple does interpret x y as multiplication if it is entered as 2D Math input, which is one of the two input forms recognized by its Standard GUI. The implicit multiplication of x y is not recognized when entered in (1D, plaintext) Maple Notation. – acer Nov 23 '11 at 17:21
@acer: thanks, I didn't know it since never used 2D Math input – Ilya Nov 23 '11 at 17:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.