Re: Converting an expression to a list of terms?
- To: mathgroup at smc.vnet.net
- Subject: [mg71475] Re: Converting an expression to a list of terms?
- From: Peter Pein <petsie at dordos.net>
- Date: Mon, 20 Nov 2006 06:17:08 -0500 (EST)
- Organization: 1&1 Internet AG
- References: <ejrmpc$96l$1@smc.vnet.net>
AES schrieb: > How to convert an expression consisting of a sum of terms in an Output > cell: > > A + B - C + . . . > > (where A, B, C are themselves product expressions) to a list > > {A, B, -C, . . . } > > in some easier fashion than doing it by hand using Find and Replace? > Hello, do you mean In[1]:= sumofterms = Expand[(x - y)^3]; In[2]:= listofterms = List @@ sumofterms Out[2]= {x^3, -3*x^2*y, 3*x*y^2, -y^3} ?