kill(all)$
load(lrats)$
load(vect)$

appendix : triple 'crossproduct', version 1.0
peter.vlasschaert@gmail.com,25/09/2018.

How declare vector
================

declare([r,v,h],nonscalar)$

r;

express(r);

v;

express(v);

cross product :   h = r x v
=====================

p1:h=r~v;

p1a:express(rhs(p1));

cross product :  h x r
==================

p2:(rhs(p1))~r;

p3:ev(vectorsimp(p2),expandall);

simplification :  * =>   . ' between two vectors'
-------------------------------------------------------------------

p4:let(r.r,r^2);

p5:letsimp(p3);

scalar : multiplication
==================

p6:expand(p5/r^3);

components : after scalar multiplication
------------------------------------------------------------

p7:express(p6);

p7a:ev(p7,expandplus);

p7b:radcan(p7a);

p7c:ev(vectorsimp(p7),expandplus);

p7d:fullratsimp(p7);

p8e:xthru(p7d);

depends([r],t);

rem : needed to differentation.  ' depends', otherwise zero .

p10:express(p6);

p11:subst([v=diff(r,t)],p6);

p11a:express(p11);

p11b:radcan(p11a);

p11c:p11=p11b;

p12:express(r)/r;
p12a:'diff(p12,t) =diff(p12,t) ;
p12a1:ratsimp(p12a);

identity : ?  is()  can't be used to show below result

p12a3:rhs(p11c)=rhs(p12a1);

simplify : components
===================

p13:subst([r=express(r)],p11);

p13a:ev(vectorsimp(p13),expandall);

how to use , solve 'with vector'
==========================

declare vector : w
---------------------------

declare([w],nonscalar)$

p14:rhs(p12a) = 1/r^2*w;

p14a:solve(p14,w);

p14b:p14a[1];

analysis : 'vectors'
--------------

p14c:part(rhs(p14b),1,1);
p14c1:part(rhs(p14b),1,2);
p14c11:part(rhs(p14b),1,2,1);
p14c12:part(rhs(p14b),1,2,2);
p14c13:part(rhs(p14b),1,2,3);

p14c2:part(rhs(p14b),2,1);
p14c3:part(rhs(p14b),2,2);
p14c31:part(rhs(p14b),2,2,1);
p14c32:part(rhs(p14b),2,2,2);
p14c33:part(rhs(p14b),2,2,3);

---------------------------------------------------------------------------------------------------------------------------------