MathGroup Archive 2005

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

Search the Archive

Re: sqrt(x^2) = x


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 
|=====


  • 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