Re: How to use sign for symbolic operations?
- To: mathgroup at smc.vnet.net
- Subject: [mg19526] Re: [mg19513] How to use sign for symbolic operations?
- From: "Andrzej Kozlowski" <andrzej at tuins.ac.jp>
- Date: Sun, 29 Aug 1999 17:21:24 -0400
- Sender: owner-wri-mathgroup at wolfram.com
In mathematica 4.0 you can do this: In:= Simplify[Sign[a*b] > 0, a > 0 && b > 0] Out= True Although this is not quite what you are asking for in practice one can almost certainly easily adapt this to whatever your ultimate purpose is. This does not work in mathematica 3.0 there is another approach which I think does work and which sometimes can be more convenient. Simply tell Mathematica that a and b are negative: In:= a /: Sign[a] = -1; b /: Sign[b] = -1; Now you can do things like: In:= Sign[Pi*a^3*b^2-1] Out= -1 In:= Sign[Pi*a^4*b^2 + 1] Out= 1 (I am doing all this using Mathematica 4.0 but I expect it to work in the same way in v. 3. If it doesn't it is easy to write one's own function sign which does). -- Andrzej Kozlowski Toyama International University JAPAN http://sigma.tuins.ac.jp http://eri2.tuins.ac.jp ---------- >From: LD <doellinger at t-online.de> To: mathgroup at smc.vnet.net >To: mathgroup at smc.vnet.net >Subject: [mg19526] [mg19513] How to use sign for symbolic operations? >Date: Sat, Aug 28, 1999, 8:53 PM > > I use Mathematica 3.0. My question is how to solve the following > problem: > I define a < 0 and b < 0 (to intend that the sign is negative in both > cases). Now I like to > know the sign of the produkt of a*b, it should be positive by the hand. > But how can I express it > within mathematica 3.0? In general: how can I get the sign of an > expression in symbolic form? > In 1: Sign[a*b] ? > Out 1: > 0 or positive. > > Many thanks for your help. > > Lothar Dillinger > > EMail: doellinger at t-online.de > >