MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to get the corresponding coefficients?


exp = x3 Exp[x1 + x2];

exp /. Exp[_] -> 1

x3

exp /. c_ * Exp[_] -> c

x3

Cases[exp, _?(FreeQ[#, E] &)][[1]]

x3

exp /. c_ * Exp[x_] -> x

x1 + x2

Cases[exp, Exp[x_] -> x][[1]]

x1 + x2


Bob Hanlon


On Wed, Apr 4, 2012 at 4:33 AM,  <simplerbysimpler at gmail.com> wrote:
> If    exp:= x3 Exp[x1+x2];
> How can I get the coefficient x3 and the exponential x1+x2 from the exp in a simple way?
>



  • Prev by Date: Re: addRule
  • Next by Date: Re: addRule
  • Previous by thread: How to get the corresponding coefficients?
  • Next by thread: Re: How to get the corresponding coefficients?