Re: Converting an expression to a list of terms?

• To: mathgroup at smc.vnet.net
• Subject: [mg71478] Re: Converting an expression to a list of terms?
• From: "gkruger" <gkruger at nwz.uni-muenster.de>
• Date: Mon, 20 Nov 2006 06:17:11 -0500 (EST)
• References: <ejrmpc\$96l\$1@smc.vnet.net>

```You can try

Apply[List, expr ]

Look at TreeForm[expr] to see where to apply list to the head of the
expression.

Or

Level[expr , 1]

this works for me too.

Example:
In : expr = A*B + B*C - C*A

In : Level[expr, 1]

Out : {A B, -A C, B C}

In : Apply[List, expr]

Out : {A B, -A C, B C}

Greetings

Guido

On 20 Nov., 08:51, AES <sieg... at stanford.edu> wrote:
> 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?

```

• Prev by Date: Re: Converting an expression to a list of terms?
• Next by Date: Re: Converting an expression to a list of terms?
• Previous by thread: Re: Converting an expression to a list of terms?
• Next by thread: Re: Converting an expression to a list of terms?