Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

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: [mg125859] Re: How to get the corresponding coefficients?
  • From: Christoph Lhotka <christoph.lhotka at fundp.ac.be>
  • Date: Thu, 5 Apr 2012 05:50:15 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201204040833.EAA00068@smc.vnet.net>

hi,

depending on the complexity of your expression, e.g.

exp := x3 Exp[x1 + x2]

you could implement some simple rule like:

exp /. x3_ Exp[x1_ + x2_] :> {x1, x2, x3}

to get

{x1, x2, x3}

best,

christoph





On 04/04/2012 10: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: Printing Notebooks without Input/Output cells
  • Previous by thread: Re: How to get the corresponding coefficients?
  • Next by thread: Re: How to get the corresponding coefficients?