Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: How to get sqrt(Year^2)===Year?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75790] Re: How to get sqrt(Year^2)===Year?
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Thu, 10 May 2007 05:24:11 -0400 (EDT)

On 5/9/07 at 4:33 AM, abbot at AugiaDives.hre (Hatto von Aquitanien)
wrote:

>If I have some expression which takes the square root of a square,
>it evaluates leaving the whole square root expression unchanged.

>Year == (Year^2)^(1/2)

>just returns what I entered when evaluated.

The reason this occurs is will not evaluate to True for all
possible values of the variable Year. For example, consider what
happens if Year = -1. The right hand side evaluates to 1 which
is clearly not what you started with.

However, you can use the Mathematica PowerExapnd to cause
(Year^2)^(1/2) to evaluate to Year, i.e.

In[1]:= Year == (Year^2)^(1/2) // PowerExpand

Out[1]= True

Just be aware this transformation will not be valid in general.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Mathematica v6: Slower in the following fields
  • Next by Date: Re: Format->Magnification does not work
  • Previous by thread: Re: How to get sqrt(Year^2)===Year?
  • Next by thread: Re: How to get sqrt(Year^2)===Year?