MathGroup Archive 2005

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

Search the Archive

Re: sqrt(x^2) = x

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61193] Re: [mg61154] sqrt(x^2) = x
  • From: curtis <gardyloo at mail.wsu.edu>
  • Date: Wed, 12 Oct 2005 01:42:38 -0400 (EDT)
  • References: <200510110722.DAA15137@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

This *might* work for "simple" x -- I haven't tested it thoroughly.
Probably the gurus on the site will tell you about Hold on the sqrt
function. Anyway, on your output, try

   output/.{Sqrt[a_^2]->a}

  As far as I can tell, this will just pattern-match without regard as
to the positiveness or even realness of the argument a.

      Cheers,
        C.O.

Francisco Javier wrote:

>Dear all, I am new in this group
>
>How can I tell Mathematica that I want to simplify all expressions like 
>Sqrt[x^2] as x, whithout taking into account that x is or not a 
>positive real number?
>
>Thank you very much
>
>  
>

-- 
|=====
|  Curtis Osterhoudt              
|  gardyloo at mail.wsu.edu                   
|  PGP Key ID: 0x235FDED1                               
|  Please avoid sending me Word or PowerPoint attachments. 
|  http://www.gnu.org/philosophy/no-word-attachments.html 
|=====


  • References:
  • Prev by Date: Element test
  • Next by Date: Re: view only every second bar lable on x-axes
  • Previous by thread: Re: sqrt(x^2) = x
  • Next by thread: Re: sqrt(x^2) = x