Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Total Derivative and Output Display Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65097] Re: Total Derivative and Output Display Question
  • From: dh <dh at metrohm.ch>
  • Date: Tue, 14 Mar 2006 06:00:24 -0500 (EST)
  • References: <duubsl$h0s$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Matt,
I think you treat Mathematica not very fair.
You are actually complaining that Mathematica did its job and did not 
stop in the middle of it. You also want Mathematica to use unclear 
notation where it is not clear what variables a function depends on.
Consider your wanted output:

  dz/dt = dz/dx(dx/dr dr/dt + dx/ds ds/dt) + dz/dy(dy/dr dr/dt + dy/ds 
ds/dt)

here you actually state (without explicitely writing it) that: x=x[r,s], 
y=y[r,s], r=r[t], s=s[t] and z=z[x[..],y[..]]
Therefore you get your output, written in its full glory, (beside term 
ordering and notation) by:

Dt[z[ x[r[t], s[t]], y[r[t], s[t]] ], t] // InputForm

this gives (InputForm):
Derivative[0, 1][z][x[r[t], s[t]], y[r[t], s[t]]]*
   (Derivative[1][s][t]*Derivative[0, 1][y][r[t], s[t]] +
    Derivative[1][r][t]*Derivative[1, 0][y][r[t], s[t]]) +
  (Derivative[1][s][t]*Derivative[0, 1][x][r[t], s[t]] +
    Derivative[1][r][t]*Derivative[1, 0][x][r[t], s[t]])*Derivative[1, 
0][z][x[r[t], s[t]], y[r[t], s[t]]]

you can now identify:
Derivative[0, 1][z][x[r[t], s[t]], y[r[t], s[t]]]   to be dz/dy
Derivative[1][s][t]*Derivative[0, 1][y][r[t], s[t]] to be dy/ds ds/dt
Derivative[1][r][t]*Derivative[1, 0][y][r[t], s[t]] to be dy/dr dr/dt
Derivative[1][s][t]*Derivative[0, 1][x][r[t], s[t]] to be dx/ds ds/dt
Derivative[1][r][t]*Derivative[1, 0][x][r[t], s[t]] to be dx/dr dr/dt
Derivative[1, 0][z][x[r[t], s[t]], y[r[t], s[t]]]   to be dz/dx

Daniel

Matt wrote:
> Hello Mathgroup,
>    I have been experimenting with the Dt[] function in Mathematica.
> The reason for this is that as I review or work with new topics in
> math, I try to see how the same results achieved by hand can or will be
> realized in Mathematica.  I recently needed to review the concept of
> the total derivative, and as is my usual practice, to ensure I
> understood what I was doing, I came up with an example that would be a
> challenge, that is, a challenge for me.
>   Here's what I did on paper (the actual example was two levels deeper
> than this, but this should suffice for the sake of argument):
> 
> z = f(x,y);
> x = g(r,s);
> y = h(r,s);
> r = a(t,u);
> s = b(t,u);
> 
> What is the total (partial) derivative of z with respect to 't'?
> 
> On paper, I worked this out to (all derivatives should be considered as
> partial):
> 
> dz/dt = dz/dx(dx/dr dr/dt + dx/ds ds/dt) + dz/dy(dy/dr dr/dt + dy/ds
> ds/dt).
> 
> As you can see, there are no f's, g's, h's, a's, or b's, because we all
> understand that when we state something like z = f(x, y), we are
> stating that z is the dependent variable and x and y are the
> independent variables and 'f' is just part of the notation indicating
> that z is a function of x and y.
> 
> I then wanted to see how I could achieve this same result in
> Mathematica in a general way.  I tackled the same problem, but I left r
> and s as functions of only t.  I won't attempt to get the results from
> my Mathematica attempt in this message.  Suffice it to say that I went
> through many iterations in order to achieve my less than satisfactory
> results.
> 
> Here is the Mathematica code (converted to InputForm):
> 
> Clear[a, b, f, g, h, r, resultOne, resultTwo, s, t, x, y, z, ζ, ξ]
> r = a[t];
> s = b[t];
> x = g[r, s];
> y = h[r, s];
> z = f[x, y];
> resultOne = Dt[z, t]
> resultOne /. {Replacement Rules}
> 
> Unfortunately, converting my replacement rules to InputForm didn't work
> very well.  I will post what I have done as a notebook.  Here is the
> direct link (please replace 'notvalid' with 'anonmous':
> 
> http://home.comcast.net/~notvalid/mathematica/TotalDerivativeQuestion.nb
> 
> As those of you who download it will see, there are numerous problems
> with my approach.  The first is that it appears overly burdensome to
> convert from Mathematica's default output form, to the more
> 'traditional' mathematical form.  Secondly, even after I convert, I end
> up with the differential operators being in the wrong order, and I'm
> not really sure about how to avoid that.
> 
> Thanks for any and all help,
> 
> Matt
> 


  • Prev by Date: Re: Re: Mathematica and Education
  • Next by Date: Re: Re: Re: Mathematica and Education
  • Previous by thread: Total Derivative and Output Display Question
  • Next by thread: Re: Total Derivative and Output Display Question