MathGroup Archive 2012

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

Search the Archive

Re: How to get the corresponding coefficients?


On Apr 4, 5:37 am, simplerbysimp... 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?

Hi Titus

    There are 2 ways:

t = x3 Exp[x1 + x2]
(*visualize the structure using*)
TreeForm[t]

(*get itens*)
t[[1, 2]]
t[[2]]

or using pattern
t /. a_ Exp[b_] -> b

Best Regards
Murta



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