在 Maple 中使用 fsolve 的正解

Positive solutions with fsolve in Maple

我在 Maple 中使用

solve(abs(-5.58 * L^(-1.88)) = 3, L);

我得到了结果

L = 1.39 or L = -1.39

但如果我使用

fsolve(abs(-5.58 * L^(-1.88)) = 3, L);

我只得到结果

L = -1.39

如何确保使用 fsolve 得到阳性结果?

https://www.maplesoft.com/support/help/maple/view.aspx?path=fsolve : "For a general equation or system of equations, the fsolve command computes a single real root. "

https://www.maplesoft.com/support/help/maple/view.aspx?path=fsolve%2fdetails : "Using the avoid option to find additional solutions"

S1:=fsolve(abs(-5.58 * L^(-1.88)) = 3, L );
S2:=fsolve(abs(-5.58 * L^(-1.88)) = 3, L, avoid = { S1 });

等等

我会避免避免选项。您可以指定您希望解决方案落入的范围,如下所示:

fsolve(abs(-5.58 * L^(-1.88)) = 3, L= 0..infinity);

您可以告诉 Maple 假定表达式中的变量为正或任何其他类型的类似假设。这是一种方法。

eq:=abs(-5.58*L^(-1.88)) assuming L>0;

然后让Maple通过fsolve求解,它会自动只寻找正解。

fsolve(eq = 3, L)

我从 Maple (2019) 收到了这个结果。

1.391098714