Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12208

Re: Second derivatives

From Roland Franzius <roland.franzius@uos.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Second derivatives
Date 2012-10-29 04:24 +0000
Message-ID <k6l0dq$gpi$1@smc.vnet.net> (permalink)
References <k6flle$6vh$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


Am 27.10.2012 05:50, schrieb Bruce McGough:
> According to the documentation, D[f,{list,n}) should give the n-th order tensor capturing the corresponding Taylor coefficient.  This doesn't seem to work in the following example:
>
> G[x_] := F[h[x]];
> D[G[{x1, x2}], {{x1, x2}, 2}]
>
> The correct answer is given by
>
> D[D[G[{x1, x2}], {{x1, x2}}], {{x1, x2}}]
>
> Note that for an "abstract function H,
>
> D[H[{x1, x2}], {{x1, x2}, 2}]  = D[D[H[{x1, x2}], {{x1, x2}}], {{x1, x2}}]
>
> Any explanation would be very helpful.

As in most such cases, rule [-1]:
Garbage in -> garbage out

Your definition is mathematically a undefined object in the class of 
multilinear maps over a differentiable manifold.

The resulting output is obtained by formal application of algebraic rules,

together with List being "not-a-function" for "D" (D has attribute 
"Listable").

The input could be refused by a D-parser, subjected to formal rules of 
predefined object classes.

The "wrong" result is explained by the rules for
Derivative[n,m],
the abstract operator for D with respect to
index position = argument positon
and
numeric value=repeating index

The starting point are the polynomial approximations of an expression in 
powers of Dt[x1] and Dt[x2]

You may take the Trace auf your expression: It constains expressions 
with partial derivatives with respect to something, that is not an 
identifiable variable.

d_{x1,x2} expression

Fully expanded:

In:
Collect[(Dt[Dt[F@h@{x1, x2}]] /. {HoldPattern[Dt[Dt[_]]] :> 0}),
{Dt[ x1], Dt[x2]}]

Out:

Dt[x2]^2*
(Derivative[2][F][h[{x1, x2}]]*Derivative[{0, 1}][h][{x1, x2}]^2
+ Derivative[1][F][h[{x1, x2}]]*Derivative[{0, 2}][h][{x1, x2}])
+
Dt[x1]*Dt[x2]*
(2*Derivative[2][F][h[{x1, x2}]]*Derivative[{0, 1}][h][{x1, 
x2}]*Derivative[{1, 0}][h][{x1, x2}]
+ 2*Derivative[1][F][h[{x1, x2}]]*Derivative[{1, 1}][h][{x1, x2}])
+
Dt[x1]^2*
(Derivative[2][F][h[{x1, x2}]]*Derivative[{1, 0}][h][{x1, x2}]^2
+ Derivative[1][F][h[{x1, x2}]]*Derivative[{2, 0}][h][{x1, x2}])


Here we have an UFO with a "List" argument instead of a sequence

Derivative[{1, 0}]

which of course somehow entered by formal application of chain rule 
algebraically and the  expression

D[f[{x1,x2}],x1] -> f'[{x1,x2}]*{1,0}

results from the fundamental stopper for Derivative at Sequence level

D[ f[Sequence[x1,x2]], x1] -> Derivative[ Derivative[#]][f][#]&[ 
Sequence[x1,x2] ]


For short:
D looks for occurrences of names or expressions in sums of products and 
returns the sums as sum over every occurence, each summand "no 
expression found" set  to zero, "expression once found" set to 1 once at 
each position in products (Leibniz rule).

Dt applies the formal differention rules of D for functions of many 
variables with respect to positions in "Sequences" of arguments to the 
universe of formal expressions.

If the innermost arguments of a function symbol are not Sequences 
throughout but List's or similar specialized heads, somewhere, the 
interpretation of the results of Dt and D remains up to you.

A too difficult task probably.

-- 

Roland Franzius

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Second derivatives Bruce McGough <bruce.mcgough@gmail.com> - 2012-10-27 03:50 +0000
  Re: Second derivatives Roland Franzius <roland.franzius@uos.de> - 2012-10-29 04:24 +0000

csiph-web