Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: "Assuming"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85599] Re: "Assuming"
  • From: dh <dh at metrohm.ch>
  • Date: Thu, 14 Feb 2008 06:30:20 -0500 (EST)
  • References: <fp0m11$5u7$1@smc.vnet.net>


HI Markus,

I think you are fooling yourself.

Consider Simplify[(a^2 - 1)/(a - 1)]

As a^2 - 1)== (a+1)(a-1) this will give (a+1). This is true in general, 

for a==1 understood as limit. Therefore, this has nothing to do with 

assumptions.

On the other hand, (a^2 - 1)/(a - 1) /. a -> 1 can not be calculated as 

it gives 0/0.  Note that "/. and  ->" mean replacement, not limit. If 

you want a limit, you have to say so: Limit[(a^2 - 1)/(a - 1), a -> 1]

hope this helps, Daniel





markusbinder wrote:

> Hi,

> 

> I would appreciate some comments about the Assuming-function. Several examples using Mathematica 6 as follows:

> 

> In[1]:= Assuming[a > 0, Simplify[a == -1]]

> Out[1]= False

> In[2]:= Assuming[a \[Element] Integers, Simplify[a == -1]]

> Out[2]= a == -1

> In[3]:= Assuming[a \[Element] Integers && a > 0 && a < 2, Simplify[a^2< 1.1]]

> Out[3]= True

> In[4]:= Assuming[a \[Element] Reals && a > 0 && a < 2, Simplify[a^2 < 1.1]]

> Out[4]= a < 1.04881

> 

> So far, everything seems pretty reasonable, but

> 

> In[5]:= Assuming[a \[Element] Integers && a > 0 && a < 2, Simplify[(a^2 - 1)/(a - 1)]]

> Out[5]= 1 + a

> 

> whereas

> 

> In[6]:= (a^2 - 1)/(a - 1) /. a -> 1

> Out[6]= Indeterminate

> 

> I consider this as blunder (or bug?); I comprehend working with domains can be pretty tricky and of course I don't expect

> 

> In[7]:= Simplify[(a^2 - 1)/(a - 1)]

> 

> to yield

> 

> Out[7]= "Beware, a != 1 neccessary!"

> 

> instead of

> 

> Out[7]= 1 + a.

> 

> Am I tricked by some personal misconception of how Mathematica deals with Assuming plus fractions as shown above, or is this a mere flaw?

> Thanks in advance for your corrections & suggestions.

> 

> Best regards

> Markus Binder

> 




  • Prev by Date: Re: eliminate all the occurrences of "theta ->" and "lambda ->"
  • Next by Date: Re: eliminate all the occurrences of "theta ->" and "lambda ->"
  • Previous by thread: Re: Find smallest eigenvalues in mathematica
  • Next by thread: Re: "Assuming"