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