Canonical stresses for an octahedron
> with(linalg):
> V:=(x1+x2)*(x3+x4)*(x5+x6);
> W:=expand((x1+x2+2)*(x3+x4+2)*(x5+x6+2));
> b3:=V;
> b2:=multiply([1,1,1,1,1,1],grad(b3,[x1,x2,x3,x4,x5,x6]));
> b1:=multiply([1,1,1,1,1,1],grad(b2,[x1,x2,x3,x4,x5,x6]));
> b0:=multiply([1,1,1,1,1,1],grad(b1,[x1,x2,x3,x4,x5,x6]));
>