# Why doesn't Mathematica evaluate this simple limit?

I want to evaluate $$\displaystyle\lim_{n\to\infty}\left(n-\sqrt{\sin(n)+10n+n^2}\right)^2$$

I used this code

Limit[(n - Sqrt[Sin[n] + 10 n + n^2])^2, n -> \[Infinity]]

It returns unevaluated. This limit is not hard to calculate by hand so I'm a bit surprised. Why doesn't Mathematica evaluate it?

• Limit code is not dealing well with that Sin[n] term. It uses Series which really has no "nice" representation for sine at infinity. Would be good to replace it with Interval[{-1,1}] maybe (I mean in the Limit code, not at the user end). – Daniel Lichtblau Jul 24 '15 at 20:52
• The result from Maple 2015 limit((n-sqrt(sin(n)+10*n+n^2))^2, n = infinity) is 25, but Maple 16 give incorrect result: infinity! – Vaclav Kotesovec Jul 24 '15 at 21:09
• @Calchas I just checked it and you are right. Weird... – Cristopher Jul 25 '15 at 3:18
• Interestingly, Limit[(n - Sqrt[10 n + n^2 + Sin[x]])^2, n -> ∞, Assumptions -> -1 <= Sin[x] <= 1] quickly produces 25 – m_goldberg Jul 26 '15 at 5:21
• @ m_goldberg: 1) very convincing, and probably the least help effort to MMA, and, what's more, a completely justified one. Could even overwrite my recent answer. Sorry for having noticed your comment so late. 2) Unfortunately, it does not work for a general bounded function: Limit[f[n]/n, n -> [Infinity], Assumptions -> -1 <= f[n] <= 1] is returned unevaluated instead of giving 0. – Dr. Wolfgang Hintze Aug 7 '15 at 8:17

On a different occasion (Dirichlet coefficients as limits: wrong) I have shown that the sometimes limited capabilities of the function Limit[] can be improved by using an intermediate Series[].

Following this idea we can write for the limit in question

Limit[Expand[
Normal[Series[(n - n Sqrt[1 + x])^2, {x, 0, 2}]] /.
x -> 10/ n + Sin[n]/n^2], n -> \[Infinity]]

(* 25 *)


In this manner we can even calculate the limit with a symbolic parameter "a"

Limit[Expand[
Normal[Series[(n - n Sqrt[1 + x])^2, {x, 0, 2}]] /. x -> a/ n + Sin[n]/n^2],
n -> \[Infinity]]

(* a^2/4 *)


Also, a general function is permissible (provided Limit[f[n]/n,n -> \[Infinity]] == 0)

Limit[
Expand[Normal[Series[(n - n Sqrt[1 + x])^2, {x, 0, 2}]] /.
x -> a/ n + f[n]/n], n -> \[Infinity]]

(* Limit[a^2/4 + 1/2 a f[n] + f[n]^2/4, n -> \[Infinity]] *)


Where the final Limit can only be assessed once f[n] is given explicitly.

Modification of the OP.

Taking f[n] = Sin[n] (instead of f[n] = Sin[n]/n as in the OP) we find

Limit[Expand[
Normal[Series[(n - n Sqrt[1 + x])^2, {x, 0, 2}]] /. x -> a/ n + Sin[n]/n],
n -> \[Infinity]]

(* Limit[a^2/4 + 1/2 a Sin[n] + Sin[n]^2/4, n -> \[Infinity]] *)


Taking the x-expansion beyond x^2 we get for all higher powers

Limit[Expand[
Normal[Series[(n - n Sqrt[1 + x])^2, {x, 0, 3}]] /. x -> a/ n + Sin[n]/n],
n -> \[Infinity]]

(* 1/4 (a + Interval[{-1, 1}])^2 *)

• Always very informative and interesting; +1 – Sektor Aug 7 '15 at 7:45
• I agree with Sektor. A very instructive answer! Thank you. – Cristopher Aug 7 '15 at 18:47

The problem here is the Sin[n] which has no limit since it is an oscillating function, but it is always bounded by $\pm 1$: if you change you code with the following:

Limit[(n - Sqrt[1 + 10 n + n^2])^2, n -> Infinity]


with 1 in place of Sin (or -1 if you want), you get the result:

(*25*)

• Like in Limit[n - Sqrt[10 n + n^2 + a], n -> \[Infinity], Assumptions -> -1 < a < 1] – Dr. belisarius Jul 24 '15 at 21:12
• Thanks. So it appears Sin[n] is the problem... Changing the code in that way indeed gives the correct answer, but you shouldn't have to do that :/. As a side note and as it's been mentioned in the comments, Maple 2015 evaluates the limit with no problem. Mathematica has some "catching up" to do... – Cristopher Jul 24 '15 at 22:14
• Should be reported as a bug – Calchas Jul 25 '15 at 11:45

Since the functionality of Limit[] has been improved in version 11.2, the limit is now evaluated rather easily:

Limit[(n - Sqrt[Sin[n] + 10 n + n^2])^2, n -> ∞]
25