Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: sqrt(x^2) = x

  • To: mathgroup at
  • Subject: [mg61189] Re: sqrt(x^2) = x
  • From: "Francisco Javier" <pacoga at>
  • Date: Wed, 12 Oct 2005 01:42:23 -0400 (EDT)
  • References: <difreg$fg6$>
  • Sender: owner-wri-mathgroup at

Francisco Javier a formulé ce martes :
> 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

Dear F.Jaccard and Ruth for your answers, but what I really mean has 
not a such simple solution.

I want to "teach" to Mathematica that in next calculations Sqrt[x^2] is 
equivalent to x,

I have tried

Sqrt[(x_)^2] := x;

This seems works fine then with calculations like


but it fails with

Sqrt[x^2 y^4]

or even with

Sqrt[x^2 y^4]

Any ideas?

Francisco Javier García Capitán

  • Prev by Date: Imposing a value for LeafCount
  • Next by Date: Solving Diophantine Equations
  • Previous by thread: Re: sqrt(x^2) = x
  • Next by thread: Re: Re: sqrt(x^2) = x