MathGroup Archive 2012

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

Search the Archive

Re: How to get the corresponding coefficients?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125845] Re: How to get the corresponding coefficients?
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Thu, 5 Apr 2012 05:45:22 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201204040833.EAA00068@smc.vnet.net>

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?