Question: Replacing specific symbol with exponent with new expression

I'm stuck on trying to convert something like xi^p to H(p)*xi^p. p is an integer.

The variable I am using is xi and I want to just insert an H(p) term based on the order of xi (p). I want to do it for any occurence of xi. I don't want to convert other variables/symbols.

It would seem applyrule should work, except it goes into an endless loop.

I've tried other combinations but just don't seem to be able to figure out the right one.

It seems to me that I could try some sort of subsindet where the transformer checks the variable name, but that seems inefficient.

I'm going to guess there is a simple solution!


Please Wait...