Re: Bug in D (or Derivative) ( Was: Re: DSolve bug)
- To: mathgroup at smc.vnet.net
- Subject: [mg97930] Re: [mg97919] Bug in D (or Derivative) ( Was: Re: DSolve bug)
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Thu, 26 Mar 2009 05:19:26 -0500 (EST)
- References: <612696379.19321237704569790.JavaMail.root@mmm.inp.demokritos.gr> <200903251046.FAA24696@smc.vnet.net>
On 25 Mar 2009, at 11:46, schochet123 at gmail.com 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'] 0 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, http://forums.wolfram.com/mathgroup/archive/2008/Jul/msg00801.html Andrzej Kozlowski
- References:
- Bug in D (or Derivative) ( Was: Re: DSolve bug)
- From: schochet123@gmail.com
- Bug in D (or Derivative) ( Was: Re: DSolve bug)