Bug in solve?

50 views
Skip to first unread message

Florian Buerzle

unread,
Nov 7, 2022, 5:07:10 AM11/7/22
to sage-devel
Sage version: 9.8beta3 (built on WSL Ubuntu)
Operating system: Windows 11

I tried to solve a logarithmic equation with solve, using algorithm='sympy':

var("x")
eq = log(x^2) == log(2*x,10)
solve(eq,x,algorithm='sympy')

The result was:

\displaystyle \verb|Complement(ConditionSet(x,|\verb| |\verb|Eq(x**2|\verb| |\verb|-|\verb| |\verb|(2*x)**(1/log(10)),|\verb| |\verb|0),|\verb| |\verb|Complexes),|\verb| |\verb|ConditionSet(x,|\verb| |\verb|Eq(x**(1/log(10)),|\verb| |\verb|0),|\verb| |\verb|Complexes))|


However, using sympy.solve directly

import sympy
var("x")
eq = log(x^2) == log(2*x,10)
sympy.solve(eq,x)

it returns the correct solution 

\displaystyle \left[\verb|2**(-1/(1|\verb| |\verb|-|\verb| |\verb|log(100)))|\right]

Is this a conversion bug into sympy input?

Best 
Florian







Reply all
Reply to author
Forward
0 new messages