The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Topic: How on Earth?
Replies: 6   Last Post: Sep 12, 2012 3:29 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bill Rowe

Posts: 1,647
Registered: 3/14/08
Re: 2 Assumptions for one parameter?
Posted: Sep 12, 2012 3:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 9/11/12 at 2:32 AM,
=?ISO-8859-1?Q?Andreas_Talmon_l=27Arm=E9e? wrote:

>What is the right typing to make two assumptions for one parameter?
>Something like this:


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]}

all achieve exactly the same thing.

>And is there a way to to control my assumptions made for the
>parameters I use something like


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

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.