MathGroup Archive 2007

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

Search the Archive

Re: question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78038] Re: [mg77935] question
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 21 Jun 2007 06:00:29 -0400 (EDT)
  • References: <200706200928.FAA09665@smc.vnet.net> <AC8BB001-4690-4F82-8370-DDD35C4858FF@mimuw.edu.pl>

On 20 Jun 2007, at 20:34, Andrzej Kozlowski wrote:

>
> On 20 Jun 2007, at 18:28, dimitris wrote:
>
>> Hi.
>>
>> Say
>>
>> o=(16-x^2)^(1/2)-(4-x)^(1/2)*(4+x)^(1/2);
>>
>> In another CAS one must use assumptions
>> in order to simplify
>>
>>> o:=sqrt(16-x^2)-sqrt(4-x)*sqrt(4+x);
>>> combine(u) assuming x>-4,x<4 ;
>>> simplify(%);
>>
>>
>>                           2 1/2          1/2        1/2
>>               o := (16 - x )    - (4 - x)    (4 + x)
>>
>>                         2 1/2                    1/2
>>                  (16 - x )    - ((4 - x) (4 + x))
>>
>>
>>                                   0
>>
>>
>> In Mathematica one simply gets
>>
>> In[10]:=
>> Simplify[o]
>>
>> Out[10]=
>> 0
>>
>>
>> I would like to hear your comments on this issue.
>>
>>
>> Dimitris
>>
>>
>
> "Bad performance" by "the other CAS" ;-)
>
> Note that Mathematica gives, generally:
>
> Simplify[Sqrt[a - x]*Sqrt[a + x], a > 0]
> Sqrt[a^2 - x^2]

Actually, this is also true for a==0 (of course all the time with the  
convention that we use take "the principal" root as the square root).

Simplify[Sqrt[-x]*Sqrt[x]]
  Sqrt[-x^2]

It is, of course, not true for  negative a (just take a=-1 and x=0).

It is just possible that "the other CAS" does not use the "principal  
value" for the square root by default, which would be surprising but  
could be an excuse for its "bad performance".

Andrzej Kozlowski




  • References:
    • question
      • From: dimitris <dimmechan@yahoo.com>
  • Prev by Date: Solving a Integral
  • Next by Date: Re: Simple ODE with time-dep BC
  • Previous by thread: Re: question
  • Next by thread: Re: Segregating the elements of a list based on given lower and