Ask Your Question
0

A Simple Exponential Equation

asked 2020-12-22 18:22:04 -0600

Kapcak gravatar image

Sage can solve the equation $8^t =37$ for $t$:

solve( (8)^t ==37, t )

But strangely, cannot solve $\left(\frac 89\right)^t =37$

solve( (8/9)^t ==37, t )

Any ideas?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-12-23 01:36:52 -0600

Emmanuel Charpentier gravatar image

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,

edit flag offensive delete link more

Comments

It seems so. Thanks for the reply.

Kapcak gravatar imageKapcak ( 2020-12-24 10:20:15 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-12-22 18:22:04 -0600

Seen: 60 times

Last updated: Dec 23 '20