maple - 从表达式中获取所有立方根

标签 maple

我需要从表达式中提取所有立方根(无需手动选择)。 例如,通过这种方式可以轻松提取所有二次根:

f:=a-sqrt(a^2+b+(a+b^2)^(1/3))+(a-b^(1/3))^(1/3);
indets(f,sqrt);

The result

但我不知道如何直接提取立方根。我是这样做的:

ind:=indets(f,`^`);
{seq(`if`(op(2,ind[k])=1/3,ind[k],NULL),k=1..nops(ind))};

The result

有没有更简单的方法?

最佳答案

您可以使用 indets 命令通过进一步限定指数类型来获取这些值。

例如,

f:=a-sqrt(a^2+b+(a+b^2)^(1/3))+(a-b^(1/3))^(1/3):

indets(f,`^`(anything,1/3));

   {b^(1/3), (a-b^(1/3))^(1/3), (b^2+a)^(1/3)}

indets(f,`^`(anything,1/2));

   {(a^2+b+(b^2+a)^(1/3))^(1/2)}

或者,

indets(f,anything^(1/3));

   {b^(1/3), (a-b^(1/3))^(1/3), (b^2+a)^(1/3)}

indets(f,anything^(1/2));

   {(a^2+b+(b^2+a)^(1/3))^(1/2)}

关于maple - 从表达式中获取所有立方根,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76672006/

相关文章:

maple - 当通过 diff 定义函数时,为什么必须在 maple 中使用 unapply 运算符?

maple - 加入散点图的点并创建一条线

wolfram-mathematica - Mathematica中是否有类似于Maple的 "lhs"和 "rhs"函数?

maple - 当 RAM 已满时停止执行(即避免写入磁盘)

maple - 如何以编程方式截断 Maple 中的 "O"项?

java openmaple 与 eclipse 的连接

maple - 如何将表情导出到图像文件,使其大小自动调整为表情大小?

matlab - Matlab 输入函数的 Maple 等效项