Re: differentiation of cross products
- To: mathgroup at smc.vnet.net
- Subject: [mg16516] Re: [mg16419] differentiation of cross products
- From: BobHanlon at aol.com
- Date: Tue, 16 Mar 1999 03:59:58 -0500
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 3/13/99 8:14:21 AM, trotts at ucdavis.edu writes:
>Can anyone tell me how to differentiate the cross product
>of two vector-valued functions in Mathematica?
>The input
>
>D[Cross[g[t],h[t]],t]
>
>results in the output
>
>h'[t] Cross^(0,1)[g[t], h[t]] + g'[t] Cross^(1,0)[g[t], h[t]]
>
>which is not correct. The correct answer would be
>
>Cross[g'[t], h[t]] + Cross[g[t], h'[t]]
>
>I also tried
>
>(Cross[g[#],h[#]]&)'
>
>which gave me the following incorrect output:
>
>Cross^(1,0)[g[#1], h[#1]] g'[#1] + Cross^(0,1)[g[#1], h[#1]] h'[#1] &
>
>Please tell me if you know of a good way to deal with
>this problem.
>
Issac,
D[Cross[g[t],h[t]],t]
Derivative[1][h][t]*Derivative[0, 1][Cross][g[t], h[t]] +
Derivative[1][g][t]*Derivative[1, 0][Cross][g[t], h[t]]
g[t_] := {x1[t], y1[t], z1[t]};
h[t_] := {x2[t], y2[t], z2[t]};
D[Cross[g[t], h[t]], t] == Cross[g'[t], h[t]] + Cross[g[t], h'[t]]
True
Unprotect[Cross];
Cross /: D[Cross[r_, s_], z_] :=
Cross[D[r, z], s] + Cross[r, D[s, z]];
Protect[Cross];
Clear[g, h];
D[Cross[g[t], h[t]], t]
Cross[g[t], Derivative[1][h][t]] +
Cross[Derivative[1][g][t], h[t]]
Bob Hanlon