![]() | 1 | initial version |
something like this ?
sage: F = algebras.Free(SR,list('AB'))
sage: A, B = F.gens()
sage: (sin(x)*A+B)**2
sin(x)^2*A^2 + sin(x)*A*B + sin(x)*B*A + B^2
![]() | 2 | No.2 Revision |
something like this ?
sage: F = algebras.Free(SR,list('AB'))
sage: A, B = F.gens()
sage: (sin(x)*A+B)**2
sin(x)^2*A^2 + sin(x)*A*B + sin(x)*B*A + B^2
or
sage: Rx = PolynomialRing(QQ,'x')
sage: x = Rx.gen()
sage: F = algebras.Free(Rx,list('AB'))
sage: A, B = F.gens()
sage: x*A+(1/x)*B*A
x*A + 1/x*B*A
maybe ?