Cham

10 Reputation

One Badge

4 years, 190 days

MaplePrimes Activity


These are questions asked by Cham

I'm having a trouble with this trivial code in Maple. The output is, well, ... stupid ! I'm askingMaple to do a vectorial sum and substraction of 5 cross products, and what I get is silly : a sum of vectors, but it doesn't give the total vector ! What the hell !?

with(linalg):
with(DEtools):

ly := 9.4607*10^15:
M0 := 1.99*10^30:

M1 := 2.20*M0:
M2 := 2.00*M0:
M3 := 1.50*M0:
M4 := 3.00*M0:

r1 := [-3, 3, 0]*ly:
r2 := [0, -2, 0]*ly:
r3 := [1, 2, 0]*ly:
r4 := [6, 4, 0]*ly:

v1 := [25, 15, 0]*10^3:
v2 := [20, -20, 0]*10^3:
v3 := [-5, -25, 0]*10^3:
v4 := [15, 0, 0]*10^3:

Mtot := M1 + M2 + M3 + M4:

rcm := (M1*r1 + M2*r2 + M3*r3 + M4*r4)/Mtot:
vcm := (M1*v1 + M2*v2 + M3*v3 + M4*v4)/Mtot:

Ltot := crossprod(r1, M1*v1) + crossprod(r2, M2*v2) + crossprod(r3, M3*v3) + crossprod(r4, M4*v4) - crossprod(rcm, Mtot*vcm);

I have done other codes with vectors like these, using the crossprod command, and they are all working great.  So I don't understand what is going on here.  I'm using Maple 13.

I'm not a strong user of Maple, so I may have done a simple mistake somewhere, but I really don't see what and where. So what is wrong with this Maple code ?

Page 1 of 1