Re: Specifying sign or domain of a variable
- To: mathgroup at smc.vnet.net
- Subject: [mg31486] Re: Specifying sign or domain of a variable
- From: Erk Jensen <Erk.Jensen at cern.ch>
- Date: Thu, 8 Nov 2001 04:54:22 -0500 (EST)
- Organization: CERN http://www.cern.ch
- References: <9sb3hh$5t5$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Andre wrote:
>
> Hi,
>
> I want to determine the sign of a complex expression by specifying
> only the sign or the domains of the basic variables that appear in the
> expression (but not inputting any particular values). Unfortunately I
> have not been able to specify a variable as e.g. belonging to the set
> of positive reals and then using this information for determining the
> sign of an expression involving the variable. Does anybody know how to
> define variables as belonging to a specific set or to a domain and how
> to use these defintions in evaluating expressions composed of the
> basic variables? Thanks a lot for your help.
>
> Andre
I'm not 100 % sure to understand what you want, but have you tried the logical
function
testnumber \[Element] Reals
...in your case:
testnumber \[Element] Reals \[And] testnumber > 0
you can use this as a test or with "/;" as a condition.
(See 2.3.5 in the Book)
Ciao
-erk-