Force a variable to commute over the non-commutative operator dot
Subject: Force a variable to commute over the non-commutative operator dot
From: Stavros Macrakis
Date: Sun, 28 Feb 2010 18:32:10 -0500
Set the global variable:
dotscrules:true$
and declare your scalars:
declare(t,scalar)
(%i1) display2d:false;
(%o1) false
(%i2) dotscrules:true$
(%i3) declare(t,scalar)$
(%i4) (t*(x-y)).(t*(x+y));
(%o4) t^2*(x-y) . (y+x)
(%i5) expand(%);
(%o5) -t^2*y . x-t^2*y^^2+t^2*x . y+t^2*x^^2
Compare:
(%i6) dotscrules:false$
(%i7) expand(%i4);
(%o7) -(t*y) . (t*x)-(t*y)^^2+(t*x) . (t*y)+(t*x)^^2
Hope this helps.
-s
On Sun, Feb 28, 2010 at 6:27 PM, pantelis isaiah
<pantelis.isaiah at gmail.com>wrote:
> Hi,
>
> I started using Maxima this morning and I would really appreciate it if
> someone could help me out with the question I describe below. For the time
> being it is even hard for me to choose the right keywords to google my
> question, so please bear with me if my question is already answered
> somewhere else or if it is too trivial.
>
> Here we go:
>
> I need to do some calculations that involve non-commutative multiplication
> - nothing fancy, just tedious - but I need to have a variable that commutes
> over the operator "."
>
> For example I want to multiply
>
> (t*(x-y)).(t*(x+y))
>
> and get a t^2 factor in front. How do I get this?
>
> Thanks a lot,
>
> Pantelis
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>