>>> exp(5*x).xreplace({exp(x): sin(x)})
>>> exp(5*x) # I would expect sin(x)**5 here
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/4be0109e-a665-4c89-8774-0300163250f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
>>> sin(exp(x)).some_replace_func({exp: x})
>>> sin(x)
>>> exp(5*x).some_replace_func({exp(x): sin(x)})
>>> exp(5*x)
In [9]: sin(exp(a*x)).some_replace_func({exp(x): x})Out[9]: sin(x**a)
I am also Interested in getting the solution for this.AMiT Kumar
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/f4f3b7a4-00ec-4d0c-85bd-86e6b4731c64%40googlegroups.com.
Hi,
Thanks for the workaround, but
subs doesn't work here:
>>> sin(exp(a*x)).subs({exp(x): x})
>>> sin(exp(a*x))To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/1a705f97-779d-4b7b-b5e2-ea14ee4ca967%40googlegroups.com.