Message Boards Message Boards

0
|
4387 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Mathematica Calculus Help - Graphing Vectors

Posted 9 years ago

I cannot get the correct syntax for graphing these vectors Here's what I have.

In[36]:= v = {2, 1, 0}
w = {-1, -3, 1}

Out[36]= {2, 1, 0}

Out[37]= {-1, -3, 1}

In[20]:= {-1, -3, 1}     v.w

Out[20]= {-1, -3, 1}

In[22]:= -5     v\[Cross]w

Out[22]= -5

Out[23]= {1, -2, -5}

In[24]:= Sqrt[v.v]

Out[24]= Sqrt[5]

In[27]:= Sqrt[w.w]


In[28]:= Sqrt[11]  ArcCos[(v.w)/(Norm[v] Norm[w])]


Out[28]= Sqrt[11]

In[30]:= ArcCos[-Sqrt[(5/11)]]

Out[30]= ArcCos[-Sqrt[(5/11)]]

In[40]:= N[ArcCos[(v.w)/(Norm[v] Norm[w])]]/Degree

Out[40]= 132.392

In[65]:= 
v = {1, 1, -2}
w = {-1, -3, 1}

Out[65]= {1, 1, -2}
Out[66]= {-1, -3, 1}

In[58]:= v.w

In[67]:= -6

Out[67]= -6

In[68]:= v\[Cross]w

Out[68]= {-5, 1, -2}

In[69]:= Sqrt[v.v]

Out[69]= Sqrt[6]

In[70]:= Sqrt[w.w]

In[75]:= Sqrt[11]      N[ArcCos[(v.w)/(Norm[v] Norm[w])]]/Degree

Out[75]= Sqrt[11]

Out[76]= 137.608

In[131]:= Show[{vector3d[{0, 0, 0}, v], vector3d[{0, 0, 0}, w], 
  vector3d[{0, 0, 0}, v\[Cross]w, 1]}, Axes -> True, 
 PlotRange -> Automatic, BoxRatios -> Automatic, 
 AxesLabel -> {"x", "y", "z"}, ViewPoint -> {6, 2, 2}]

During evaluation of In[131]:= Show::gcomb: Could not combine the graphics objects in Show[{vector3d[{0,0,0},{1,1,1}],vector3d[{0,0,0},{2,2,2}],vector3d[{0,0,0},{0,0,0},1]},Axes->True,PlotRange->Automatic,BoxRatios->Automatic,AxesLabel->{x,y,z},ViewPoint->{6,2,2}]. >>

Out[131]= Show[{vector3d[{0, 0, 0}, {1, 1, 1}], 
  vector3d[{0, 0, 0}, {2, 2, 2}], vector3d[{0, 0, 0}, {0, 0, 0}, 1]}, 
 Axes -> True, PlotRange -> Automatic, BoxRatios -> Automatic, 
 AxesLabel -> {"x", "y", "z"}, ViewPoint -> {6, 2, 2}]

Also how would I prove this? |v cross w| ^2 = |v|^2 |w|^2 - (v . w)^2 where v,w are arbitrary vectors in space

Attachments:
POSTED BY: Anthony DeCarlo
Show[{vector3d[{0, 0, 0}, v], vector3d[{0, 0, 0}, w], vector3d[{0, 0, 0}, v[Cross]w, 1]}, 
Axes -> True, PlotRange -> Automatic, BoxRatios -> Automatic, AxesLabel -> {"x", "y", "z"}, ViewPoint -> {6, 2, 2}]

The above is wrong. There is no v[Cross]w syntax in Mathematica. Try Cross[v,w]

Show[{vector3d[{0, 0, 0}, v], vector3d[{0, 0, 0}, w], vector3d[{0, 0, 0}, Cross[v,w], 1]}, 
Axes -> True, PlotRange -> Automatic, BoxRatios -> Automatic, AxesLabel -> {"x", "y", "z"}, ViewPoint -> {6, 2, 2}]
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract