How to separate imaginary unit inside an arbitrary function?
- To: mathgroup at smc.vnet.net
- Subject: [mg32449] How to separate imaginary unit inside an arbitrary function?
- From: "Kostya" <zlo at science.nus.edu>
- Date: Mon, 21 Jan 2002 02:55:02 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Dear all Have a simple problem: have a function, say Name[5*I*a] but want to break it into multiples: Name[5*I*a]->Name[5]*Name[I]*Name[a] The issue is that the standard :> rule does not work properly: Name[5*I*a]//.{Name_[exa_*exb_]:>(Name[exa]*Name[exb]), Name_[exa_*exb_*exc_]:>(Name[exa]*Name[exb]*Name[exc])} yields just: Name[5*I]*Name[a] instead of desired "Name[5]*Name[I]*Name[a]" any suggestions? with regards Kostya