Carsten Knoll
unread,Jul 18, 2015, 7:12:37 AM7/18/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sy...@googlegroups.com
Hi,
due to various substitutions I have a bulky expression of the following
structure
A + exp(B*log(C) + D)
I want sympy to simplify this to
A + C**B*exp(D)
I think it boils down to the simplification of
exp(B*log(C))
which I also can't perform:
from sympy import exp, log, expand_power_exp
from sympy.abc import B, C
term = exp(B*log(C))
print term.simplify()
print term.expand()
print expand_power_exp(term)
# results
exp(B*log(C))
exp(B*log(C))
exp(B*log(C))
I think a possible way would be the following:
exp(B*log(C) + D) = exp(B*log(C))*exp(D) = exp(log(C))**B*exp(D)
= C**B*exp(D)
But how can I tell sympy to "see" that?
Carsten