MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Bug in D (or Derivative) ( Was: Re: DSolve bug)

  • To: mathgroup at
  • Subject: [mg97930] Re: [mg97919] Bug in D (or Derivative) ( Was: Re: DSolve bug)
  • From: Andrzej Kozlowski <akoz at>
  • Date: Thu, 26 Mar 2009 05:19:26 -0500 (EST)
  • References: <> <>

On 25 Mar 2009, at 11:46, schochet123 at wrote:

> The source of this bug seems to be the following bug in in D (or
> Derivative): According to Mathematica, D[u',u] yields u''. However,
> the correct answer is u''/u'
> (Homework for Calculus 1: use the chain rule to prove this.)

Not really. According to Mathematica's notion of derivative, D[u',u]  
ought to be 0, since u' does not involve u explicitly. In fact,

  D[u'', u']

which, of course, is much the same thing. The only way I know to get  
the answer you have in mind with Mathematica is:

  Dt[Derivative[1][u][x], u[x]]
  Derivative[2][u][x]*Dt[x, u[x]]

> The way Mathematica obtains its incorrect result is quite amusing, As
> Trace shows, Mathematica evaluates D[u',u] by noting that the FullForm
> of u' is Derivative[1][u], whose derivative with respect to u is (of
> course ;) ) Derivative[1]'[u].
> Mathematica then decides that Derivative[1]'  is Derivative[2],
> yielding Derivative[2][u], i.e., u''.

Indeed, this is right, and has been mentioned on this forum several  
times in the past (at least twice by me).
See, for example,

Andrzej Kozlowski

  • Prev by Date: Re: utterly confused by Lightweight Grid
  • Next by Date: animation in version 7.0 looks bad
  • Previous by thread: Bug in D (or Derivative) ( Was: Re: DSolve bug)
  • Next by thread: Re: Bug in D (or Derivative) ( Was: Re: DSolve bug)