MathGroup Archive 2007

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

Search the Archive

Fold and Cross

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83865] Fold and Cross
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Mon, 3 Dec 2007 05:42:05 -0500 (EST)

to teach Cross how die differentiate I did:

Unprotect[Cross];		
(1) Cross/: D[Cross[u_,v_],x_]:=Cross[D[u,x],v]+Cross[u,D[v,x]];
(2) Cross/: D[Cross[u_, v_], {x_, n_}] :=
         Sum[Binomial[n, k] Cross[D[u, {x, k}], D[v, {x, n - k}]], {k, 0, n}];
Protect[Cross];

This works very well für things like D[(u x v), t] or D[(u x v), {t,3}].
Now I tried to implement a tag for D[(u x v),x,y,...] and did the
following:

Unprotect[Cross];
(3) Cross /: D[Cross[u_, v_], x_, y__] := Fold[D, Cross[u, v], Flatten[{x, y}]];
Protect[Cross];

But this doesn't do what I expected. It seems that tag (1) is not used,
so there remain term with Derivative[n,m][Cross][...].

What I am doing wrong?


Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: Question with ListPlot
  • Next by Date: plotting vectors
  • Previous by thread: Re: Manipulate - ODE
  • Next by thread: Re: Fold and Cross