I would like to make the substitution x^(11*y) -> r in the following equation

x^(11 *y^z) - 1 

to end up with:

r^(y^(z - 1)) - 1

How can I do this in Mathematica?

  • 3
    $\begingroup$ Replace is most suited to structural transformations, not mathematical. So maybe another tool would be more appropriate (but I don't know what to suggest) $\endgroup$ – acl Mar 23 '13 at 18:54
  • 1
    $\begingroup$ It is a little tricky to apply the principles in dupliate question and get what you want: Simplify[x^(11*y^z) - 1 /. x -> r^(1/(11*y)), r > 0 && y > 0] Keep in mind Mathematica treats expressions as Complex by default. $\endgroup$ – Michael E2 Mar 23 '13 at 22:24
  • $\begingroup$ @MichaelE2 thanks. looks good. Trying to test it against the other expressions I have. $\endgroup$ – Blair Azzopardi Mar 23 '13 at 22:43

This gives the desired result:

Simplify[x^(11*y^z) - 1 /. x -> r^(1/(11*y)), r > 0 && y > 0]
(* -1 + r^y^(-1 + z) *)

If one examines the FullForm of the expression, one can see that the pattern x^(11*y) in the original replacement does not occur:

x^(11*y^z) - 1 // FullForm
(* Plus[-1, Power[x, Times[11, Power[y, z]]]] *)

In fact, it seems difficult to get rid of x with any replacement except one of the form x -> ... Luckily one can get x^(11*y) -> r in terms of x.

The princples in the answers to this related question might be tried, but they don't work as is. You have to keep in mind

  1. Mathematica treats expressions as Complex by default.
  2. Simplify only returns an expression that has a lower LeafCount.

These yield the same leaf count (9):

LeafCount[-1 + r^y^(-1 + z)]
LeafCount[x^(11*y^z) - 1]

So the original expression is returned if one tries

Simplify[x^(11*y^z) - 1, x == r^(1/(11*y)) && r > 0 && y > 0]

assuming that Mathematica can even get to the desired expression.

One the other hand, Eliminate works well on polynomials but balks on this one, which has exponential functions in it:

Eliminate[{x^(11*y^z) - 1, x == r^(1/(11*y))}, x]

(* Eliminate::ifun: Inverse functions are being used by Eliminate, so some solutions may not be found; use Reduce for complete solution information. >> *)
|improve this answer|||||

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.