Re: "Assuming"

*To*: mathgroup at smc.vnet.net*Subject*: [mg85607] Re: "Assuming"*From*: "Mariano Suárez-Alvarez" <mariano.suarezalvarez at gmail.com>*Date*: Thu, 14 Feb 2008 18:51:31 -0500 (EST)*References*: <fp0m11$5u7$1@smc.vnet.net> <fp192b$gju$1@smc.vnet.net>

On Feb 14, 9:35 am, dh <d... at metrohm.ch> wrote: > 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 I've always guessed that Simplify[e] is always an expression with the same value as e, for valuations of the variables appearing in e for which e is defined. Hence Simplify[(1 - a^2)/(1 - a)] evaluates to 1 + a, which has the same value as (1 - a^2)/(1 - a) for all values of a for which the last expression is defined. I do not recall having seen an explicit specification of what Simplify does. A more extreme case of the OP's situation is simply Assuming[a == 1, Simplify[(1 - a^2)/(1 - a)]] which evaluates to 2. According to the docs, Simplify tries to use Refine to acheve simplifications, but clearly it does not take into account the information that Refine produces: for example, Assuming[a == 1, Refine[(1 - a^2)/(1 - a)]] tells me Power::infy: Infinite expression 1/0 encountered. Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered. Out[1]= Indeterminate -- m