16
$\begingroup$

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?

$\endgroup$
12
  • 9
    $\begingroup$ 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). $\endgroup$ Jul 24, 2015 at 20:52
  • $\begingroup$ 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! $\endgroup$ Jul 24, 2015 at 21:09
  • 2
    $\begingroup$ @Calchas I just checked it and you are right. Weird... $\endgroup$
    – Cristopher
    Jul 25, 2015 at 3:18
  • 7
    $\begingroup$ Interestingly, Limit[(n - Sqrt[10 n + n^2 + Sin[x]])^2, n -> ∞, Assumptions -> -1 <= Sin[x] <= 1] quickly produces 25 $\endgroup$
    – m_goldberg
    Jul 26, 2015 at 5:21
  • 2
    $\begingroup$ @ 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. $\endgroup$ Aug 7, 2015 at 8:17

3 Answers 3

16
$\begingroup$

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 *)
$\endgroup$
2
  • $\begingroup$ Always very informative and interesting; +1 $\endgroup$
    – Sektor
    Aug 7, 2015 at 7:45
  • $\begingroup$ I agree with Sektor. A very instructive answer! Thank you. $\endgroup$
    – Cristopher
    Aug 7, 2015 at 18:47
12
$\begingroup$

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*)
$\endgroup$
3
  • 2
    $\begingroup$ Like in Limit[n - Sqrt[10 n + n^2 + a], n -> \[Infinity], Assumptions -> -1 < a < 1] $\endgroup$ Jul 24, 2015 at 21:12
  • 1
    $\begingroup$ 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... $\endgroup$
    – Cristopher
    Jul 24, 2015 at 22:14
  • $\begingroup$ Should be reported as a bug $\endgroup$
    – Calchas
    Jul 25, 2015 at 11:45
5
$\begingroup$

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
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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