MathGroup Archive 2001

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

Search the Archive

Re: problem of evaluating SQRT

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28000] Re: problem of evaluating SQRT
  • From: "Paul Lutus" <nospam at nosite.com>
  • Date: Wed, 28 Mar 2001 02:40:28 -0500 (EST)
  • References: <99pd51$leb@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

"Pek" <phsoh at alum.mit.edu> wrote in message news:99pd51$leb at smc.vnet.net...
> Hi,
>
> We have a question of how sqrt can be evaluated.
>
> In[1]:=
> Sqrt[x^2]
>
> Out[1]=
> (This part is just sqrt[X^2])
>
> Below we expect the result to be zero but it isn't. How can we get the
> correct answer in this case?
>
> In[2]:=
> Sqrt[x^2] - x
>
> Out[2]=
> (This part is -x + sqrt[x^2] )

But Mathematica is providing the correct answer. What if x = -1? In this
case, Sqrt[(-1)^2] - -1 = 2.

You are just not accustomed to thinking in symbolic terms. For Mathematica
to process:

Sqrt[x^2] - x

and return "0", this must be true for all possible values of x. It is only
true for positive, real values.

--
Paul Lutus
www.arachnoid.com





  • Prev by Date: Re: problem of evaluating SQRT
  • Next by Date: Re: problem of evaluating SQRT
  • Previous by thread: Re: problem of evaluating SQRT
  • Next by thread: Re: problem of evaluating SQRT