Problem 4 (~Exercise 1.5.7 in A-W)

[Graphics:HTMLFiles/Ex1.5.7_1.gif]

In[1]:=

a = {ax, ay, az} b = {bx, by, bz} c = {cx, cy, cz}

Out[1]=

{ax, ay, az}

Out[2]=

{bx, by, bz}

Out[3]=

{cx, cy, cz}

In[4]:=

a (bc) + b (ca) + c (ab)

Out[4]=

{0, 0, 0}

The × sign is from the Basic Input Palette.  Notice that there is another sign there, ×, not to be confused.   The cross product is in Mathematica's standard kernel and does not need loading of any packages.

Do the same with cross product defined by user

In[5]:=

mycross[A_, B_] := {A[[2]] B[[3]] - A[[3]] B[[2]], A[[3]] B[[1]] - A[[1]] B[[3]], A[[1]] B[[2]] - A[[2]] B[[1]]}

In[6]:=

a = {ax, ay, az} b = {bx, by, bz} c = {cx, xy, cz}

Out[6]=

{ax, ay, az}

Out[7]=

{bx, by, bz}

Out[8]=

{cx, xy, cz}

In[9]:=

Simplify[mycross[a, mycross[b, c]] + mycross[b, mycross[c, a]] + mycross[c, mycross[a, b]]]

Out[9]=

{0, 0, 0}

Overscript[, Notice the way one refers to the element of the list : A[[i]]]


Created by Mathematica  (September 23, 2003)