1 equals 3 (among others)
- To: mathgroup at smc.vnet.net
- Subject: [mg32180] 1 equals 3 (among others)
- From: Stegemann at physikDONOT.SPAMtu-berlin.de (Grischa Stegemann)
- Date: Fri, 4 Jan 2002 05:03:55 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Dear group
Can anyone explain to me what is going on here? Look at this:
In[1]:=f[x_] = (4 - x + Sqrt[-4*(3 - x) + (x - 4)^2])/2;
In[2]:=Simplify[-4*(3 - x) + (x - 4)^2]
Out[2]=(-2 + x)^2
Well, right now we can be pretty sure that f[x]=1 for all x. But
Mathematica (4.0.2.0X) seems to know better:
In[3]:=Map[f[#1]&, {0, 0.1, 1.7, 2, 2.5, 3}]
Out[3]={3, 2.9, 1.3, 1, 1., 1}
It took me hours to find this error in my rather complex setting...;-(
Bye, Grischa
--
-------------------------------------------------------------------------
Grischa Stegemann Technische Universität Berlin --