expr=2^(4(s-3)+1/2-s/2)
2^(4*(s - 3) - s/2 + 1/2)
Just use Simplify
expr//Simplify
2^((1/2)*(7*s - 23))
If you want to use a replacement rule, you need to use RuleDelayed (:>) and make the base a pattern as well
expr/.x_^n_:>x^Simplify[n]
2^((1/2)*(7*s - 23))
expr=A^(s+2(s/2+4))
A^(2*(s/2 + 4) + s)
expr//Simplify
A^(2*(s + 4))
expr/.x_^n_:>x^Simplify[n]
A^(2*(s + 4))
Bob Hanlon
---- "wandering.the.cosmos at gmail.com" <wandering.the.cosmos at gmail.com> wrote:
> My computations in Mathematica yields some exponents that do not seem
> to get simplified automatically, e.g. 2^{4(s-3)+1/2-s/2}
> A^{s+2(s/2+4)}. I even tried to do x^n_ -> x^Simplify[n] but it doesn't
> work very well. Why is this so and how do I make sure my exponents are
> simplified?
>
> Thanks!
>