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: [mg51130] Re: Limit problem
  • From: Paul Abbott <paul at>
  • Date: Tue, 5 Oct 2004 04:37:29 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <cjr9ce$osq$>
  • Sender: owner-wri-mathgroup at

In article <cjr9ce$osq$1 at>, Mike Zeitzew <pdop at> 

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

I assume that this output is -Infinity under XP?

> In[4]:=
> f'[0.4]
> Out[4]=
> -16.631

Instead of computing the limit using Limit, have a look at the output of

  (f[0.4 + h] - f[0.4])/h + O[h]

Now compare this with

  (f[a + h] - f[a])/h + O[h]

In the first case you will see that, due to round-off error, the first 
term in the series expansion, involving 1/h, is not identically zero, 
and it is this term that leads to the limit of -Infinity.

Note: adding an order term, O[h], coerces the input to a Maclaurin 
series expansion in h. You can, of course, use Series instead:

  Series[(f[a + h] - f[a])/h, {h, 0, 0}]

In general, I find that using Series is preferable to using Limit.


Paul Abbott                                   Phone: +61 8 6488 2734
School of Physics, M013                         Fax: +61 8 6488 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at 

  • Prev by Date: Re: Re: Root function
  • Next by Date: Conveniently Restarting Notebooks
  • Previous by thread: Re: Limit problem
  • Next by thread: A way around the limitations of Re[] and Im[]