MathGroup Archive 2009

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

Search the Archive

Re: simplifying a resulted derivative expression

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96118] Re: simplifying a resulted derivative expression
  • From: Peter Pein <petsie at dordos.net>
  • Date: Thu, 5 Feb 2009 04:41:25 -0500 (EST)
  • References: <gm9ckc$135$1@smc.vnet.net>

kem schrieb:
> Hi, I have a function f[ux, uy, vx, vy, wx, wy, u, v, w, x, y]
> 
> I am doing different manipulations with this function and the results
> I get have expressions like that:
> 
> Derivative[0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0][f][ux, uy, vx, vy, wx, wy,
> u, v, w, x, y]
> 
> which is difficult to understand. The question is how can I substitute
> automatically the above expression by: fu ?
> 
> (it means I need to see that the derivative is taken over the 7th
> argument which is 'u' and write that f is derived with respect to u
> which I want to be written as fu)
> 
> Can it be done?
> 
> Thanks a lot!
> 

Do you mean sth. like

Format[Derivative[dl__][func_][args__]] :=
    Subscript[func, Sequence @@
       Pick[{args}, {dl}, 1]] /; MatchQ[{dl}, {(0 | 1)..}]

and now try


If you need higher derivatives w.r.t. some variables,

Format[Derivative[dl__][func_][args__]] := Subscript[func,
     Sequence @@ Flatten[Apply[Table[#1, {#2}] & ,
        Transpose[{{args}, {dl}}], {1}]]]

could be acceptable.

Try

Derivative[0,0,0,0,0,0,1,0,0,0,0][f][ux,uy,vx,vy,wx,wy,u,v,w,x,y]

to get f_u
or

Derivative[0,0,0,0,0,0,1,0,0,1,1][f][ux,uy,vx,vy,wx,wy,u,v,w,x,y]

which prints as f_{u,x,y}
or feed it with higher derivatives

Derivative[0,0,0,0,0,0,1,0,2,2,1][f][ux,uy,vx,vy,wx,wy,u,v,w,x,y]

to get f_{u,w,w,x,x,y}


HTH,
Peter


  • Prev by Date: Re: Changing Line Color in Plot
  • Next by Date: Re: Changing Line Color in Plot
  • Previous by thread: Re: simplifying a resulted derivative expression
  • Next by thread: Bug in HypergeometricPFQ[{}, {1/2, 3/4, 3/4}, x]]