Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16783

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

From "Brambilla Roberto Luigi (RSE)" <Roberto.Brambilla@rse-web.it>
Newsgroups comp.soft-sys.math.mathematica
Subject R: checking the sign of all terms in a long expression
Date 2014-04-12 09:15 +0000
Message-ID <lib07k$i60$1@smc.vnet.net> (permalink)
References <20140411061009.8DE2B6A30@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


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-----
Da: dantimatter [mailto:google@dantimatter.com] 
Inviato: venerd=EC 11 aprile 2014 08:10
A: mathgroup@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.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar


Thread

R: checking the sign of all terms in a long expression "Brambilla Roberto Luigi (RSE)" <Roberto.Brambilla@rse-web.it> - 2014-04-12 09:15 +0000

csiph-web