MathGroup Archive 2007

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

Search the Archive

Re: Dt "gradient" (dumb title, sorry)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81091] Re: Dt "gradient" (dumb title, sorry)
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Wed, 12 Sep 2007 03:44:50 -0400 (EDT)
  • References: <fc4ht0$e8q$1@smc.vnet.net> <46E64FE6.8030903@gmail.com>

I agree with your assessment. I also think the present behavior should
be changed. Do you?

On 9/11/07, Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com> wrote:
> Chris Chiasson wrote:
>
> > I wanted a list of different total derivatives, so I fed in the
> > familiar {{vars},n} syntax to Dt. Dt took it without complaint, but I
> > don't trust the results:
>
> The "familiar {{vars, n} syntax" is explicitly documented for the
> partial derivative operator D only. I have found no reference or mention
> of this syntax for the total derivative operator in the documentation
> center, the 5.2 online help, the Mathematica book, and Michael Trott's
> work. (Of course this does not mean that such references do not exist,
> but they seem hard to find.)
>
> > In[1]:= Dt[z[x,y],{x,1}]
> > Dt[z[x,y],{y,1}]
> > Dt[z[x,y],{{x,y},1}]
> >
> > (*this paste of "copy as plain text" shows derivatives as exponents;
> > it's not my doing and isn't the subject of this post*)
> > Out[1]= Dt[y,x] (z^(0,1))[x,y]+(z^(1,0))[x,y]
> > Out[2]= (z^(0,1))[x,y]+Dt[x,y] (z^(1,0))[x,y]
> > Out[3]= {(z^(1,0))[x,y],(z^(0,1))[x,y]}
> >
> > I think out 3 should be a list containing the expression for out 1 and
> > the expression for out 2. It seems like Dt decided to ignore the
> > dependence of y on x in the first entry, and the dependence of x on y
> > in the second entry.
>
> Another explanation (or interpretation of this behavior) is that
> whenever Dt is fed with an argument of the form {{vars}, n} Dt calls D
> instead and we get a list of partial derivatives. That would explain why
> Dt does not complain and produces a result identical to D's.
>
> In[1]:= Dt[z[x, y], {{x, y}, 1}]
>
> Out[1]=
>    (1,0)         (0,1)
> {z     [x, y], z     [x, y]}
>
> In[2]:= D[z[x, y], {{x, y}, 1}]
>
> Out[2]=
>    (1,0)         (0,1)
> {z     [x, y], z     [x, y]}
>
>
> > Please let me know if my interpretation/expectation is wrong. Thanks.
>
> You can mimic the behavior of D and get the expected result with Dt
> using Thread and a one dimensional list of variables as in
>
> In[3]:= Thread[Dt[z[x, y], #] &[{x, y}]]
>
> Out[3]=
>             (0,1)          (1,0)
> {Dt[y, x] z     [x, y] + z     [x, y],
>
>     (0,1)                   (1,0)
>    z     [x, y] + Dt[x, y] z     [x, y]}
>
>
> Best regards,
> --
> Jean-Marc
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: framed plots with two y axes scales
  • Next by Date: Re: design question, how to have a set of manipulate controls, but have separate expression associated with each control?
  • Previous by thread: Re: Dt "gradient" (dumb title, sorry)
  • Next by thread: Re: Dt "gradient" (dumb title, sorry)