Ultimately, I want to replace every Exp[(const) w[i,j]] to T[i,j] and Exp[-(const) w[i,j]] to 1/T[i,j] in the following expression
(-1 + (E^(w[1, 0] - 1.55432 w[1, 1]) -
E^(-w[1, 0] + 1.55432 w[1, 1]))^2/(E^(w[1, 0] - 1.55432 w[1, 1]) +
E^(-w[1, 0] + 1.55432 w[1, 1]))^2)
However, when I use the replacement rule
/. (E^(x[i_, j_] w[i_, j_] + x[m_, l_] w[m_, l_]))-> (E^(x[i, j] w[i, j]) E^(x[m, l] w[m, l]))
as an intermediate step, the replacement does not do anything on the expression. Any suggestion?
Thanks, SJS
Exp[a] Exp[b]
toExp[a + b]
. You if you make an intermediate step where you replaceE
byexp
(lowercase is important!), then do your replacement (or something like it) withexp
in place ofE
, it should work. Alternatively, you could wrap the expression withInactivate
or something. See my answer here for one possibility. $\endgroup$