1
$\begingroup$

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:

(1+y)exp(x+xy-2y)

Does anyone have an explanation for this?

  • 8
    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 two2011-11-23
  • 0
    I don't use maple, but does it matter that you write $xy$ and not $x*y$2011-11-23
  • 0
    Ah, silly me! It does indeed work when this is fixed.2011-11-23
  • 0
    I think that could be an answer, @Ilya. :)2011-11-23
  • 0
    @AndreasSpörl: for Maple it does. Was one of the reasons to switch to Mathematica for me2011-11-23
  • 4
    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.2011-11-23

1 Answers 1

4

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).

  • 3
    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.2011-11-23
  • 0
    @acer: thanks, I didn't know it since never used 2D Math input2011-11-23