Re: How to separate imaginary unit inside an arbitrary function?
- To: mathgroup at smc.vnet.net
- Subject: [mg32457] Re: How to separate imaginary unit inside an arbitrary function?
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 22 Jan 2002 03:19:20 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <a2gi3d$ks$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, 5*I is a single complex number ! and not Times[5,Complex[0,1]] it is Complex[0,5]. Regards Jens Kostya wrote: > > 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