You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a further simplification that should be done when simplifying expressions in cases involving logarithmic powers. When attempting to simplify expressions like $(b^x)^\frac{\log(a)} {\log(b)}$, the expected result should be $a^x$.
Code Snippet:
>>> from sympy import symbols, log, simplify, pprint
>>> a, b, x = symbols("a b x")
>>> expr = (b**x)**(log(a,b))
>>> pprint(simplify(expr), use_unicode=False)
log(a)
------
log(b)
/ x\
\b /
The text was updated successfully, but these errors were encountered:
In [53]: a, b=symbols('a, b', positive=True)
In [54]: x=symbols('x', real=True)
In [55]: e= (b**x)**(log(a,b))
In [56]: eOut[56]:
x⋅log(a)
ℯIn [57]: simplify(e)
Out[57]:
xa
(This is still not valid for b=1.)
Otherwise you can have:
In [58]: N(expr.subs({a:2, x:2, b:-2}))
Out[58]: 1.02142647003754-0.306662540131076⋅ⅈ
Problem Description:
There is a further simplification that should be done when simplifying expressions in cases involving logarithmic powers. When attempting to simplify expressions like$(b^x)^\frac{\log(a)} {\log(b)}$ , the expected result should be $a^x$ .
Code Snippet:
The text was updated successfully, but these errors were encountered: