Vis*_*iya 2 wolfram-mathematica
给定一个大表达式,我如何在Mathematica中收集变量的各种功能?
例如:
p = (1 + a + x)^4;
Expand[p]
Out: 1 + 4 a + 6 a^2 + 4 a^3 + a^4 + 4 x + 12 a x + 12 a^2 x +
4 a^3 x + 6 x^2 + 12 a x^2 + 6 a^2 x^2 + 4 x^3 + 4 a x^3 + x^4
Run Code Online (Sandbox Code Playgroud)
使用Collect[expression,variable].从帮助文档:
In[1]:=Collect[(1 + a + x)^4, x]
Out[1]=(1 + a)^4 + 4 (1 + a)^3 x + 6 (1 + a)^2 x^2 + 4 (1 + a) x^3 + x^4
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
796 次 |
| 最近记录: |