Mathematica Stack Exchange is a question and answer site for users of Mathematica. 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
y = a + b x;

I can understand this output of the ordinary differentiation of y w.r.t. x

D[ y, x]

but I don't understand the mathematical meaning of this output

a + b x

In fact there is no matching usage of D[f] (with only single argument) in the Mathematica documentation. Usually Mathematica will flag up argument count mismatch when running, e.g.

"... called with m argument; n arguments are expected"

Can anyone help me to understand the meaning of D[f]? Is this a bug or undocumented behavior in Mathematica?

share|improve this question
up vote 13 down vote accepted

It's not a bug if you consider this behavior as a logical continuation of the following permissible syntax:

D[a + b x^3, x, x, x]

(* ==> 6 b *)

D[a + b x^3, x, x]

(* ==> 6 b x *)

D[a + b x^3, x]

(* ==> 3 b x^2 *)

D[a + b x^3]

(* ==> a + b x^3 *)

The point is that a Sequence of variables is allowed following the first argument of D. And the empty sequence in the last example is a special case of this.

share|improve this answer
That's a very good and compelling reasoning for the output it provides... In my earlier comment, I didn't say undefined syntax, but invalid syntax (I can see how "invalid" is incorrect terminology as well... I should've said "undocumented"). I would consider this to either be a documentation oversight (if this use is intended) or speculative... the definition might as well be D[f_] := f as I had said in my comment :) – R. M. Apr 1 '14 at 3:30
@rm-rf You may well be right - but I thought it's OK to postulate "innocent until proven guilty"... – Jens Apr 1 '14 at 3:35
In other words, D[f[x]] is the zeroth derivative, $f^(0)(x)$, the same as Derivative[0][f][x]. – Michael E2 Apr 1 '14 at 15:48
@MichaelE2 Right. I wonder if there's also a continuation to negative derivatives like in Derivative[-1], which is indeed the integral. Maybe f[x[D]]? – Jens Apr 1 '14 at 16:36
@Jens I'm not sure about f[x[D]]; however, I'd expect D[f[x], {x,-1}] would be ok, but it doesn't work. – Michael E2 Apr 1 '14 at 16:51

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.