Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Two workarounds :

sage: ((8/9)^t==37).log().log_expand().solve(t)
[t == -log(37)/(2*log(3) - 3*log(2))]
sage: solve((8/9)^t==37, t, algorithm="sympy")
[t == -log(37)/(2*log(3) - 3*log(2))]

Curiously :

sage: solve((8/9)^t==37, t, to_poly_solve="force")
[]

Worse :

sage: solve((8/9)^t==37,t, to_poly_solve=True)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-26-811d238787f4> in <module>
----> 1 solve((Integer(8)/Integer(9))**t==Integer(37),t, to_poly_solve=True)

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/symbolic/relation.py in solve(f, *args, **kwds)
   1041 
   1042     if is_Expression(f): # f is a single expression
-> 1043         return _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
   1044 
   1045     if not isinstance(f, (list, tuple)):

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/symbolic/relation.py in _solve_expression(f, x, explicit_solutions, multiplicities, to_poly_solve, solution_dict, algorithm, domain)
   1340                 s = m.to_poly_solve(x, options='algexact:true')
   1341                 T = string_to_list_of_solutions(repr(s))
-> 1342                 X.extend([t[0] for t in T])
   1343             except TypeError as mess:
   1344                 if ignore_exceptions:

/usr/local/sage-9/local/lib/python3.9/site-packages/sage/symbolic/relation.py in <listcomp>(.0)
   1340                 s = m.to_poly_solve(x, options='algexact:true')
   1341                 T = string_to_list_of_solutions(repr(s))
-> 1342                 X.extend([t[0] for t in T])
   1343             except TypeError as mess:
   1344                 if ignore_exceptions:

TypeError: 'sage.symbolic.expression.Expression' object is not subscriptable

This might be a bug...

HTH,