From: Rainer Schöpf <rainer.schoepf@gm...>  20140323 19:20:21

On Sun, 23 Mar 2014 at 23:50 0000, abpetrov wrote: > > Hi, > > I try define a new operator f, and, respectively, a new derivation for it. > But there is an question. > > 1) > operator f$ > operator x$ > > df(f(x(i)),x(i)); > > This expression is not 0, it is right. > > 2) > operator f$ > operator x$ > > df(f(x(i)),x(k)); > > This expression is 0, it is not right. x(i) and x(k) are different, so there is no dependency between them. > I want have some unevaluated derivation, it is not 0. > > 3) I can define a rule, But it doesn't help. The result is 0. > operator f$ > operator x$ > operator Delta$ > Deriv_by_ind := { df (x(~j), x(~j1)) => Delta(jj1) }$ > let Deriv_by_ind$ > > df(f(x(i)),x(k)); > > How can I get unevaluated form df(f(x(i)),x(k)), which is not 0? Two possiblities: (a) define a rule for f: let { df(f(x(~j)),x(~k)) => df(f(x(j)),x(j)) * Delta(jk) when j neq k}; (b) Use the dfpart package: load_package dfpart; generic_function f(u); operator Delta,x; Deriv_by_ind := { df (x(~j), x(~j1)) => Delta(jj1) }; let Deriv_by_ind; Regards, Rainer 