# How to find this limit correctly?

How to find the limit

Limit[n*Sin[2*Pi*Exp*n!], n -> Infinity]    ?


Mathematica 10 outputs

 Interval[{-\[Infinity], \[Infinity]}]


which is not correct since the one equals $2\pi$, being a known limit.

• Hm.. The output makes sense to me. At least it wouldn't make sense that the limit was 2 Pi. – Jacob Akkerboom Sep 1 '14 at 21:00
• @ Jacob Akkerboom: Could you base your ungrounded words? – user64494 Sep 1 '14 at 21:01
• @MarkMcClure Yes, you may assume you're on your iPhone :) – Dr. belisarius Sep 1 '14 at 22:31
• The domain of n must be given, otherwiese the Problem is not well defined. Simply consider Limit[Sin[2 pi n],n->oo]. – Dr. Wolfgang Hintze Sep 1 '14 at 22:42
• @ user64494: it's just a simplified example showing the importance of the Domain in which die Limit is to be considered. – Dr. Wolfgang Hintze Sep 1 '14 at 22:51

The limit is definitely computed correctly. Keep in mind that Limit assumes the variable (n, in this case) is continuous. Thus, this is a specific example of the general fact that $f(x)\sin(g(x))$ oscillates back and forth over the whole real line, whenever $f(x)$ and $g(x)$ both increase to $\infty$ with $x$. A plot verifies this is correct.

Plot[n*Sin[2*Pi*Exp*n!], {n, 0, 10},
PlotPoints -> 400] Again, n represents a continuous variable (since that's how Plot works) and $n!$ is computed via the continuous analog of the factorial, namely using the Gamma function.

Now, the discrete limit

$$\lim _{n\to \infty }n \sin (2\pi e n!)=2\pi$$

is a separate issue. Proving this is a bit tricky but can be done as follows. First, it's a pretty basic fact of calculus that

$$\frac{\sin (a x)}{x}\to a$$

as $x\to 0$. It's not too much more work to show that

$$\frac{\sin \left(a x+O\left(x^2\right)\right)}{x}\to a,$$

where $O\left(x^2\right)$ represents an expression that is bounded by a constant times $x^2$. So, now, let's examine the argument $2\pi n! e$ of the sine in the original question. This all hinges on the standard expression of $e$ in terms of an infinite series:

$$e = \sum_{k=0}^{\infty} \frac{1}{k!}.$$

Thus,

\begin{align} 2\pi n!e &= 2\pi n! \sum _ {k=0}^{\infty } \frac{1}{k!}=2\pi \left(\sum _ {k=0}^n \frac{n!}{k!}+\frac{1}{n+1}+\sum _ {k=n+2}^{\infty } \frac{n!}{k!}\right) \\ &= 2\pi\left(M+\frac{1}{n}+O\left(\frac{1}{n^2}\right)\right)=\frac{2\pi }{n}+O\left(\frac{1}{n^2}\right)\mod 2\pi \end{align}

Taking $x=1/n$, we get the desired result.

Of course, this can be tested numerically using beli's plot, though I'd prefer ListPlot to ListLinePlot, since this is truly a discrete phenomenon.

ListPlot[Block[{\$MaxExtraPrecision = 1000},
Table[N[n*Sin[2*Pi*E*n!], 100], {n, 0, 400}]],
Epilog -> {Dashed, Line[{{0, 2 Pi}, {400, 2 Pi}}]}] • Limit does not handle integer assumptions (as in discrete variables). – Daniel Lichtblau Sep 2 '14 at 1:15
• @DanielLichtblau That is what I thought. But, then, how do I explain the fact that Limit[n^2 Sin[2*n*Pi], n->Infinity, Assumptions->Element[n, Integers]]==0? – Mark McClure Sep 2 '14 at 1:23
• I suppose that Assumptions in Limit might simply be applied to simplify the expression ahead of the computation. That would explain the difference in the results and be dismissed as designed. A genuine domain restriction would be more properly dealt with as a third argument. – Mark McClure Sep 2 '14 at 10:40
• Right on all counts. I should have stated that Limit does not do anything beyond what Simplify or Refine1 might do in terms of handling integrality assumptions. – Daniel Lichtblau Sep 2 '14 at 14:52