如何在 Maxima 中将某些变量定义为不可交换
例如,我想将 x 和 y 定义为不可交换的,将 a 和 b 定义为可交换的(像往常一样)。换句话说,
x y ≠ y x, a x = x a, a b = b a .
进一步,
(x + ay) (x - ay) = x^2 + a (yx - xy) - a^2 y^2
。
定义 x 和 y 的代码以及乘法符号(例如 *
和 .
)是什么?
For example, I'd like to define x and y as non-commutative, and a and b as commutative (as usual). In other words,
x y ≠ y x, a x = x a, a b = b a .
Further,
(x + a y) (x - a y) = x^2 + a (y x - x y) - a^2 y^2
.
What is a code for defining x and y, and a symbol for multiplication (such as *
and .
) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以按照您想要的方式使用 Maxima 的可交换
*
和非可交换.
产品,只需执行以下两个步骤即可:声明符号
a
和b
作为标量:declare([a, b], scalar)$
启用
dotscrules
:dotscrules: true$
这将涉及标量的非交换积简化为交换积(即,
ax
变为a*x
)。现在你准备好了。例如,
返回
(请注意,
^^
是非交换指数运算符)。You can work with Maxima's commutative
*
and non-commutative.
products in the way that you want by following the next two steps:Declare the symbols
a
andb
as scalars:declare([a, b], scalar)$
Enable
dotscrules
:dotscrules: true$
This simplifies non-commutative products involving scalars to commutative products (i.e.,
a.x
becomesa*x
).Now you are ready. For example,
returns
(note that
^^
is the non-commutative exponentiation operator).