Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Limit problem

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

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 /
> XP
> In[1]:=
> Clear[f,h,x]
> In[2]:=
> f[x_]:=Sin[12*x^2]/(3*x^2)
> In[3]:= Limit[(f[0.4 + h] - f[0.4])/h, h -> 0]
> Out[3]=
> -&#8734;
> In[4]:=
> f'[0.4]
> Out[4]=
> -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:

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

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

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



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

Andrzej Kozlowski
Chiba, Japan

  • 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