1
$\begingroup$

Suppose we have an expression like $b^m-2 b^{1+m}+4 b^{-2+2m}$. Now is it possible to expand the powers to get $b^m-2b b^m+4 b^{-2} b^{2m}$? Indeed, I want to replace $b^m$ with another expression, and Mathematica cannot recognize it in e.g. $b^{1+m}$.

More generally, is there a way to replace $b^{f(m)}$ with $b^{f(1)}$ where $f(m)$ is an arbitrary function of $m$?

$\endgroup$
1
$\begingroup$

Does this help you?

ex = b^m - 2 b^(1 + m) + 4*b^(-2 + 2*m)
Simplify@ex
Simplify@ex /. Power[b, x_] :> a[x] /. b -> a[1]

enter image description here

$\endgroup$
1
  • $\begingroup$ Yes, thank you! Indeed ":>" helped me! $\endgroup$
    – MEDVIS
    Apr 16 '17 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.