Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: 2 Assumptions for one parameter?
Posted:
Sep 12, 2012 3:29 AM
|
|
On 9/11/12 at 2:32 AM, =?ISO-8859-1?Q?Andreas_Talmon_l=27Arm=E9e?=@smc.vnet.net wrote:
>What is the right typing to make two assumptions for one parameter? >Something like this:
>$Assumptions={a>0&&Element[a,Reals]}
either what you have or:
$Assumpitions={a>0, Element[a,Reals]}
but note, by default Mathematica makes a variable as general as possible. So, since a>0 isn't meaningful for complex a, it follows:
$Assumptions={a>0&&Element[a,Reals]} $Assumptions={a>0, Element[a,Reals]} $Assumptions={a>0}
all achieve exactly the same thing.
>And is there a way to to control my assumptions made for the >parameters I use something like
>?a
It is unclear to me what you are trying to do here. Setting the value of $Assumptions impacts those functions that look at the value of $Assumptions when you use them but has no effect on the value of other symbols such as a. That is you can do:
In[6]:= Clear[a]; $Assumptions = {a > 0}; Simplify@Element[Sqrt[a], Reals]
Out[7]= True
then assign a value to a that contradicts your assumptions and work with it
In[8]:= a = -2; Element[Sqrt[a], Reals]
Out[9]= False
but this definitely causes problems for functions that look at the value of $Assumptions since now
In[10]:= Simplify@Element[Sqrt[a], Reals]
Out[10]= True
and generates an warning stating one or more assumptions evaluated to False
|
|
|
|