Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Second derivatives

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128529] Re: Second derivatives
  • From: Roland Franzius <roland.franzius at uos.de>
  • Date: Sun, 28 Oct 2012 23:41:09 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <k6flle$6vh$1@smc.vnet.net>

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



  • Prev by Date: Re: Trying to use Mathematica as "word processor" for my math homework
  • Previous by thread: Second derivatives
  • Next by thread: "Solve" on polynomial equality results in expressions containing "Root"