MathGroup Archive 2007

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

Search the Archive

Re: question


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]

It is not very hard to prove directly by hand but for a fixed value  
of a, e.g. a=4 one can give quite convincing numerical verification  
with Mathematica:

ls = RandomComplex[{-10 - 10 I, 10 + 10 I}, 10^5];

Max[Abs[Map[Function[{x}, Sqrt[16 - x^2] - Sqrt[4 - x] Sqrt[x + 4]],  
ls]]] // Chop

0

Andrzej Kozlowski




  • Prev by Date: Re: Reproducible crash in version 6
  • Next by Date: Re: NDSolve with (compiled) numerical functions
  • Previous by thread: question
  • Next by thread: Re: question