MathGroup Archive 2002

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

Search the Archive

Re: 1 equals 3 (among others)


With your definition of f[x]

In[4]:=
f[x]

Out[4]=
(1/2)*(4 + Sqrt[(-2 + x)^2] - x)

You seem to be under the illusion that that last expression is 1 for all 
values of x. I think you should review some  basic school math, in 
particular things like:

In[8]:=
Sqrt[(-2)^2]

Out[8]=
2

and so on...

Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/


On Friday, January 4, 2002, at 07:03  PM, Grischa Stegemann wrote:

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



  • Prev by Date: Re: Length and Drop
  • Next by Date: Re: 1 equals 3 (among others)
  • Previous by thread: Re: 1 equals 3 (among others)
  • Next by thread: Re: 1 equals 3 (among others)