MathGroup Archive 2001

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

Search the Archive

Re: problem of evaluating SQRT

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28019] Re: problem of evaluating SQRT
  • From: "John Doty" <jpd at w-d.org>
  • Date: Wed, 28 Mar 2001 02:40:49 -0500 (EST)
  • Organization: Wampler-Doty Family
  • References: <99pd51$leb@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <99pd51$leb at smc.vnet.net>, "Pek" <phsoh at alum.mit.edu> wrote:

> 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

It's only zero for some values of x (try x->-1 if you don't believe me).
Therefore Mathematica cannot reduce it automatically. To get it to do
what you want, you can use either PowerExpand[] or Simplify[] with some
appropriate assumption (like x>0).

-- 
| John Doty		"You can't confuse me, that's my job."
| Home: jpd at w-d.org
| Work: jpd at space.mit.edu


  • Prev by Date: Re: How to change bit-depth level for exported .gif files?
  • Next by Date: Re: seeking Wagner's Mathematica book
  • Previous by thread: Re: problem of evaluating SQRT
  • Next by thread: RE: problem of evaluating SQRT