[Date Index]
[Thread Index]
[Author Index]
Re: Bug in D (or Derivative) ( Was: Re: DSolve bug)
*To*: mathgroup at smc.vnet.net
*Subject*: [mg97941] 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:21:28 -0500 (EST)
*References*: <612696379.19321237704569790.JavaMail.root@mmm.inp.demokritos.gr> <200903251046.FAA24696@smc.vnet.net> <8DF2CBD8-6542-461B-9A52-CDE33E721DA5@mimuw.edu.pl>
On 25 Mar 2009, at 14:40, Andrzej Kozlowski wrote:
>
> 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.
Actually, I was wrong here since, of course, u' is Derivative[1][u]
and this does involve u explicitly. Of course in this case
D[Derivative[1][u],u] does not make any mathematical sense (unless we
wanted this to mean the derivative in some functional sense, but then
what Mathematica does with it makes no sense anyway). This:
D[derivative[1][u], u]
Derivative[1][derivative[1]][u]
does make sense, as long as derivative is undefined, but this:
% /. derivative -> Derivative
Derivative[2][u]
doesn't.
Still, for Mathematica to be consistent and still make mathematical
sense, D[u',u] ought to return 0, as it in the example below.
Andrzej Kozlowski
> 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
>
>
>
Prev by Date:
**Re: SetDelayed::write ... [x_] is protected**
Next by Date:
**What's going on here (Table-generated lists)?**
Previous by thread:
**Re: Bug in D (or Derivative) ( Was: Re: DSolve bug)**
Next by thread:
**p-value ANOVA Tukey?**
| |