Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9579
| From | Yi Wang <tririverwangyi@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Replace each f in f^n to different variables |
| Date | 2012-04-12 08:41 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jm64ff$6kn$1@smc.vnet.net> (permalink) |
Hi, all,
I want to replace *each* f in f^n to a different variable, say
f^n -> var1 * var2 * ... * varn
Naively, if I try
f^n /. f:>Unique[],
Mathematica simply returns (a unique variable)^n, instead of the above behaviour.
Is there a simple way to get the f's into different variables?
Thanks!
Yi
PS:
(1) I know there are ways to transform Power to a list by hand, and then do something in it. For example,
Times[((f^3)[[1]]*Table[1, {(f^3)[[2]]}]) /. f :> Unique[]]
However, eventually I will be dealing with a large expression, with all kinds of terms, instead of a single term. This method quickly becomes very complicated.
(2) I want to do such "strange" things, because a product of functions in position space f(x)^n becomes F(k1)F(k2)...F(k_{n-1})F(-k1-k2...) in momentum space.
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Replace each f in f^n to different variables Yi Wang <tririverwangyi@gmail.com> - 2012-04-12 08:41 +0000 Re: Replace each f in f^n to different variables Ray Koopman <koopman@sfu.ca> - 2012-04-13 08:57 +0000
csiph-web