Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #11719
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: 2 Assumptions for one parameter? |
| Date | 2012-09-12 07:29 +0000 |
| Message-ID | <k2pdl5$9g3$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: 2 Assumptions for one parameter? Bill Rowe <readnews@sbcglobal.net> - 2012-09-12 07:29 +0000
csiph-web