Re: Collect exponents only
- To: mathgroup at smc.vnet.net
- Subject: [mg101425] Re: [mg101385] Collect exponents only
- From: Francisco Rojas Fernández <fjrojas at gmail.com>
- Date: Tue, 7 Jul 2009 05:05:06 -0400 (EDT)
- References: <200907041043.GAA17784@smc.vnet.net>
Thanks guys for all your help. I'm new in Mathematica and it is really a great start to know that you guys are so willing to help. Best to all -Francisco On Sat, Jul 4, 2009 at 4:18 PM, Leonid Shifrin <lshifr at gmail.com> wrote: > Hi Francisco, > > one way is to use pattern-matching to simplify only specific expresions: > > In[1]:= > A Exp[I (x+y)-I x]+A^2 Exp[I (x+y)-I y]/.x:Power[E,_]:> Simplify[x] > > Out[1] = A^2*E^(I*x) + A*E^(I*y) > > Regards, > Leonid > > > > > On Sat, Jul 4, 2009 at 3:43 AM, Francisco Rojas <fjrojas at gmail.com> wrote: > >> Hello, >> >> I was wondering if there's anyway to ask the command Simplify (or >> maybe some other command) to only collect terms in the exponents of a >> long expression (which contains complex exponentials by the way) and >> not perform any other kind of simplification. >> >> For example I have an expression like this: >> >> A Exp[ I (x+y) - I x] + A^2 Exp[ I (x+y) - I y] ( I is the >> the imaginary unit ) >> >> Mathematica does two simplications here: it simplifies the terms in >> the exponents and factors out the A giving: >> >> A (Exp[ I y] + Exp[I x]) >> >> whereas I would like to obtain only the exponents simplification, >> i.e. A^2 Exp[ I y] + A Exp[ I x] >> >> Anybody knows how to do this? >> Thanks in advance, >> Francisco >> >> >
- References:
- Collect exponents only
- From: Francisco Rojas <fjrojas@gmail.com>
- Collect exponents only