MathGroup Archive 1999

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

Search the Archive

Re: differentiation of cross products

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16489] Re: [mg16419] differentiation of cross products
  • From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
  • Date: Tue, 16 Mar 1999 03:59:43 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Mathematica without additional packages cannot do "general" vector
algebra, just as it cannot do "general" matrix algebra, etc. To
illustrate what I mean, Mathematica gives know that 

In[7]:=
Cross[v,v]
Out[7]=
Cross[v, v]

but 


In[8]:=
Cross[{a,b,c},{a,b,c}]
Out[8]=
{0,0,0}

The same applies to yur situation. When you try to differentiate
D[Cross[g[t],h[t]],t] Mathematica does not know that g and h are vector
vlaues functions. It treats them as just ordinary complex valued
functions and differentiates Cross as an ordinary complex valued function
of two variables.

As far as I can see, the best you can do without a special package is
something like this:

In[1]:=
v[t_]:={v1[t],v2[t],v3[t]};w[t_]:={w1[t],w2[t],w3[t]};

In[2]:=
D[Cross[v[t],w[t]],t]-(Cross[D[v[t],t],w[t]]+Cross[v[t],D[w[t],t]])
Out[2]=
{0, 0, 0}

So you can verify that the identity D[Cross[g[t],h[t]],t]=Cross[g'[t],
h[t]] + Cross[g[t], h'[t]] is true. But as far as I can tell, the only
way you can make Mathematica actually use it is to program it yourself.
For example, you might do something like this:

In[1]:=
Unprotect[Cross];
Cross/:D[Cross[u_,v_],x_]:=Cross[D[u,x],v]+Cross[u,D[v,x]];
Protect[Cross]
Out[1]=
{"Cross"}

Now you will get what you wanted:

In[2]:=
D[Cross[g[t],h[t]],t]
Out[2]=
Cross[g[t], h'[t]] + Cross[g'[t], h[t]]

Of course once you have done this you will want to add other rules (e.g.
Cross[v_,v_]=0) and soon this will turn into a whole package. Such a
package may well already exist but at least it is not included among
Mathematica standard packages and does not seem to be on MathSource (?)



On Sat, Mar 13, 1999, Issac Trotts <trotts at ucdavis.edu> wrote:

>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.
>
>Thanks,
>Issac Trotts
>
>P.S.: Please send your response to trotts at ucdavis.edu .
>
>
>
>


Andrzej Kozlowski
Toyama International University
JAPAN
http://sigma.tuins.ac.jp/
http://eri2.tuins.ac.jp/



  • Prev by Date: Re: Re: Eliminating (-1)^2
  • Next by Date: Re: Matrix Manipulation
  • Previous by thread: Re: differentiation of cross products
  • Next by thread: Re: differentiation of cross products