展开为实部与虚部(Expand into real and imaginary parts,complex_expand)
在假定变量为实数的前提下展开表达式。
怎么写
complex_expand(expr)
- expr
- 任意表达式:一个数、一个公式、一个列表或一个矩阵。接受一个表达式。
示例
complex_expand((1 + i)^2)在求解器中,
在求解器中打开complex_expand((1 + i)^2)的结果是2i。
相关函数
- expand
把乘积和乘方展开成和式。
- function_expand
把带平移自变量的特殊函数改写为更简单的函数。
- power_expand
展开乘积与幂的幂和对数。
- cyclotomic
给定阶数的分圆多项式。
- collect
按某个变量的幂次合并表达式中的项。
- degree
多项式关于某个变量的次数。