Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Why is the input Limit[IntegerPart[Sin[x]/x], x -> 0] not being evaluated?

Mathematica session

share|improve this question
3  
No idea. Limit[IntegerPart[Sinc[x]], x -> 0] works, though. –  J. M. May 16 '12 at 17:07
2  
In general finding IntegerPart requires infinite precision, which may be a little much to ask :-). Nevertheless MMA should be able to figure this one out from the series, and in fact it quickly gets the correct answer with, say, Limit[IntegerPart[Series[Sin[z]/z, {z, 0, 4}]], z -> 0]. But this is a snare: replacing the 4 with 1 gets a wrong answer. It does not seem to realize that $1+O[z]^2$ can be less than $1$! –  whuber May 16 '12 at 19:43
1  
Limit[IntegerPart[Sin[x]/x], x -> 10^-80] returns 0, so it must be a precision thing. –  Guillochon May 16 '12 at 22:25
1  
@J.M. I get 0 for Limit[IntegerPart[Sinc[x]], x -> 0]. Which version are you running? I'm using v8.0.4, but it does the same on v7. –  rcollyer May 17 '12 at 1:45
1  
In[1]:= Limit[IntegerPart[Sin[x]/x], x -> 0] Out[1]= 0 (Coming in version 9.) –  Daniel Lichtblau Jun 12 '12 at 15:38
show 8 more comments

1 Answer 1

up vote 6 down vote accepted

A closely related problem was treated in this question I asked some time ago that received a beautiful answer from @acl.

The documentation for IntegerPart[] says:

Mathematical function, suitable for both symbolic and numerical manipulation.

Nevertheless, the symbolic part of the assertion has been proved false in the aforementioned question. Just take a look at what Mma thinks of its derivative:

enter image description here

So, What does Limit[] do when a non-symbolically treatable function is given as an argument? Let's try it:

f[x_?NumericQ] := Sin[x];
Limit[f[x], x -> 8]
(*
  Limit[f[x], x -> 8]
*)

Ha! it does nothing!

That doesn't mean that Mma can't calculate limits for analytic non-symbolically treatable functions. It can:

f[x_?NumericQ] := Sin[x];
Limit[f[x], x -> 8, Analytic -> True]
(*
Sin[8]
*)

Of course this is useless in your case since IntegerPart[] is not analytic.

So, there is a deadlock: Mma does not know how to treat IntegerPart[] symbolically, and also doesn't know to calculate limits of functions that are only numerically valued and not analytical.

Sorry :)

Edit

This is a cheater using PiecewiseExpand:

f[x_] := Assuming[ FindMaxValue[Sin[x]/x, x] <= Sin[x]/x <= FindMinValue[Sin[x]/x, x],
                   PiecewiseExpand@IntegerPart[Sin[x]/x]];

Off[FindMaximum::lstol]
Limit[f[x], x -> 0]
On[FindMaximum::lstol]

End Edit

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.