R: checking the sign of all terms in a long expression

• To: mathgroup at smc.vnet.net
• Subject: [mg132563] R: checking the sign of all terms in a long expression
• From: "Brambilla Roberto Luigi (RSE)" <Roberto.Brambilla at rse-web.it>
• Date: Sat, 12 Apr 2014 05:14:59 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• Delivered-to: l-mathgroup@wolfram.com
• Delivered-to: mathgroup-outx@smc.vnet.net
• Delivered-to: mathgroup-newsendx@smc.vnet.net
• References: <20140411061009.8DE2B6A30@smc.vnet.net>

```ceck= a + a b - a b c + a c - b + b c - d

a - b + a b + a c + b c - a b c - d  (*NB rearranged order*)

pp = MonomialList[ceck] /. {a -> 1, b -> 1, c -> 1, d -> 1}

{-1, 1, 1, 1, 1, -1, -1}

Position[pp, -1]

{{1}, {6}, {7}}

-----Messaggio originale-----
Inviato: venerd=EC 11 aprile 2014 08:10
A: mathgroup at smc.vnet.net
Oggetto: checking the sign of all terms in a long expression

hello all
is there to check the signs of all terms in a symbolic expression, like

toCheck = a + a b + a b c + a c - b + bc + d ....

in this case, with the assumption that the a, b, c etc are all positive, only one term is negative (b by itself) and the rest are positive.  I have expressions like this that have a hundred or more terms and i'm worried i might not be catching all those that are of a different sign.

thanks

RSE SpA ha adottato il Modello Organizzativo ai sensi del D.Lgs.231/2001, inforza del quale l'assunzione di obbligazioni da parte della Societ=E0 avviene con firma di un procuratore, munito di idonei poteri.
RSE adopts a Compliance Programme under the Italian Law (D.Lgs.231/2001). According to this RSE Compliance Programme, any commitment of RSE is taken by the signature of one Representative granted by a proper Power of Attorney.  Le informazioni contenute in questo messaggio di posta elettronica sono riservate e confidenziali e ne e' vietata la diffusione in qualsiasi modo o forma. Qualora Lei non fosse la persona destinataria del presente messaggio, Lainvitiamo a non diffonderlo e ad eliminarlo, dandone gentilmente comunicazione al mittente. The information included in this e-mail and any attachments are confidential and may also be privileged. If you are not the correct recipient, you are kindly requested to notify the sender immediately, to cancel it and not to disclose the contents to any other person.

```

• Prev by Date: List vs. array in Mathematica
• Next by Date: Variable section and hollow Tubes for economic 3D printing
• Previous by thread: checking the sign of all terms in a long expression
• Next by thread: Re: checking the sign of all terms in a long expression