解决对数方程问题 [SageMath]

计算科学 Python 智者
2021-12-08 04:28:56

输入

var('x')
solve((log((x**2 - x), 6) - log((6*x - 10), 6) == 0), x)

输出

[log(x^2 - x) == log(6*x - 10)]

但真正的根是 5 和 2。我做错了什么?

1个回答

您需要使用to_poly_solve=True具有以下语义的选项:

to_poly_solve - bool (default: False); use Maxima's to_poly_solver package to search for more possible solutions, but possibly encounter approximate solutions. This keyword is incompatible withmultiplicities=True``。

所以,

solve(..., x, to_poly_solve=True)

应该做。