       Re: Limit problem

• To: mathgroup at smc.vnet.net
• Subject: [mg51130] Re: Limit problem
• From: Paul Abbott <paul at physics.uwa.edu.au>
• Date: Tue, 5 Oct 2004 04:37:29 -0400 (EDT)
• Organization: The University of Western Australia
• References: <cjr9ce\$osq\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```In article <cjr9ce\$osq\$1 at smc.vnet.net>, Mike Zeitzew <pdop at yahoo.com>
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;

I assume that this output is -Infinity under XP?

> In:=
> f'[0.4]
>
> Out=
> -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.

Cheers,
Paul

--
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 physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul

```

• 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[]