       Re: Limit problem

• To: mathgroup at smc.vnet.net
• Subject: [mg51102] Re: [mg51098] Limit problem
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Tue, 5 Oct 2004 04:36:45 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```On 4 Oct 2004, at 19:18, Mike Zeitzew wrote:

>
> Why is Limit giving me the wrong answer for this simple divided
> difference?   I am using 5.0.1.0 /
> XP
>
> In:=
> Clear[f,h,x]
>
> In:=
> f[x_]:=Sin[12*x^2]/(3*x^2)
>
> In:= Limit[(f[0.4 + h] - f[0.4])/h, h -> 0]
>
> Out=
> -&#8734;
>
> In:=
> f'[0.4]
>
> Out=
> -16.631
>
In Mathemaitca  0.4 is an approximate number with Machine precision. It
is not the same as 2/5.  It is a good idea to avoid as much as possilbe
the use of approximate numbers in symbolic computations since various
algebraic identities, particulalry cancellations of common factors
cannot be performed due to small differences between what ought to be
identical expressions. This is exactly what happens in this case. If
you use exact quantities there is no probem:

In:=
f[x_] := Sin[12*x^2]/(3*x^2)

In:=
Limit[(f[2/5 + h] - f[2/5])/h, h -> 0]

Out=
20*Cos[48/25] - (125/12)*Sin[48/25]

In:=
N[%]

Out=
-16.6309667072401

If you perfomr a Trace on your original input and the above you will
see clearly what I mean.

Andrzej Kozlowski
Chiba, Japan
http://www.akikoz.net/~andrzej/
http://www.mimuw.edu.pl/~akoz/

```

• Prev by Date: Re: A way around the limitations of Re[] and Im[]
• Next by Date: Re: Print with limited precision
• Previous by thread: Re: Limit problem
• Next by thread: Re: Limit problem