A subtle limit question: $\lim _{n \to \infty}\sin(\pi\sqrt {n^2+0.5n+1})$ Evaluate
$$
\lim _{n \to \infty}\sin(\pi\sqrt {n^2+0.5n+1}),
$$
where $n\in \mathbf{N}$.
This is how I solved:
$$
\begin{align}
&\lim _{n \to \infty}\sin(n\pi\sqrt {1+0.5/n+1/n^2})\\
&= \sin(n\pi)\,\,\,\,\,\,\,\small\color{grey}[{since \sqrt {1+0.5/n+1/n^2} = 1 , as\,\,n\to\infty]}\\
&=0
\end{align}
$$
But the actual answer is $\frac{1}{\sqrt2}$ or $\frac{-1}{\sqrt2}$ depending on whether n is even or odd . 
 A: Doing almost what you did $$\sqrt{n^2+\frac{n}{2}+1}=n \sqrt{1+\frac{1}{2 n}+\frac{1}{n^2}}$$ Now, using Taylor expansion or generalized binomial theorem $$\sqrt{1+\frac{1}{2 n}+\frac{1}{n^2}}=1+\frac{1}{4 n}+O\left(\frac{1}{n^2}\right)$$ which makes $$\sin \left(\pi  \sqrt{n^2+\frac{n}{2}+1}\right)\sim \sin(n\pi+\frac \pi 4)$$ from which you can conclude.
A: The situation is more delicate than you think. For example, $1+1/\sqrt n \to 1,$ yet $\sin(n\pi((1+1/\sqrt n))$ has no limit. In fact this sequence is dense in $[-1,1].$
Hint: $\sqrt {1+u} = 1 + u/2 + o(u)$ as $u\to 0.$
A: Alternatively:
The function $$\sqrt{x^2+\frac x2+1}\sim x$$ has an oblique asymptote and
$$\lim_{x\to\infty}\sqrt{x^2+\frac x2+1}-x=\lim_{x\to\infty}\frac{\frac x2+1}{\sqrt{x^2+\frac x2+1}+x}=\frac14$$ so that the asymptote is
$$y=x+\frac14$$ and $$\lim_{x\to\infty}\sqrt{x^2+\frac x2+1}-\left(x+\frac14\right)=0.$$
So the given function converges to a sinusoid with a phase of $\dfrac\pi4$. This is enough to conclude.

A: The general reasoning problem
The problem with your reasoning is that you've assumed that the limit exists. Under this assumption, all your steps are valid. But since the assumption is incorrect, the conclusion may or may not be true. And the fact that the conclusion is not true implies that the assumption was not valid.
All the rules about limits and operations ($\lim (f \cdot g) = (\lim f) \cdot (\lim g)$, that kind of thing) are valid if all the limits exists. If the limits don't exist, you need to be more careful.
In fact, those rules are more precise than that: you can use them to prove that a limit exists, but only in one direction. For example, if $f$ and $g$ both have a limit, then their product also has a limit, and the limit of the product is the product of the limit. In mathematical notation, if $\lim f$ exists and $\lim g$ exists then $\lim (f \cdot g)$ exists and $\lim (f \cdot g) = (\lim f) \cdot (\lim g)$. The converse is not true: it's possible for $\lim (f \cdot g)$ to exists but not $\lim f$ and $\lim g$. (Trivial example: if $f=0$ then $\lim (0 \cdot g)$ exists for any $g$, whether $\lim g$ exists or not.)
If you don't know yet whether a limit exists, you can often prove its existence and calculate its value at the same time, but you need to be careful. It's common to write
$$\begin{align}
  \lim(f) &= \textsf{something} \\
          &= \textsf{something else} \\
\end{align}$$
Strictly speaking, this should mean “$\lim(f)$ exists, and its value is equal to $\textsf{something}$, which is equal to $\textsf{something}$”. There is a common abuse of notation that makes it mean “$\lim(f)$ exists and has the value $\textsf{something}$ if $\textsf{something}$ is well-defined, and $\textsf{something}$ is well-defined and equal to $\textsf{something else}$ if $\textsf{something else}$ is well-defined”. That's perfectly fine, the logic works out, as long as you remember that when you go from one line to the next, you can only apply rules such that if the next step is well-defined then the previous step is also well-defined. You can't apply rules that assume that the previous step is well-defined.
The specific reasoning problem
In this case, the rule that you applied to show that $\lim_{n \to \infty} \sin(n\pi\sqrt {1+0.5/n+1/n^2}) = \lim_{n \to \infty} \sin(n\pi)$ really only says that the left-hand side exists if the right-hand side exists, so you need to show that the right-hand side exists. Let's look at this step more closely:


*

*$\lim_{n\to\infty} \sqrt {1+0.5/n+1/n^2} = 1$

*$\lim_{n\to\infty} n \pi = +\infty$

*Let $h(n) = n \pi \sqrt {1+0.5/n+1/n^2}$. By applying the limit-of-a-product rule to (1.) and (2.), we get get $\lim_{n\to\infty} h(n) = +\infty$

*Now we'd like to go from $\lim_{n\to\infty} h(n) = \lim_{n\to\infty} n \pi$ to $\lim_{n\to\infty} \sin (h(n)) = \lim_{n\to\infty} \sin (n \pi)$. This would be true by the composition rule if $\sin$ had a limit at $+\infty$, but this is not the case, so we're stuck. Note that $\sin$ is a function from real numbers to real numbers. There is a limit if you restrict the domain to values of the form $n\pi$ for $n\in\mathbb{N}$, but that fact does not extend to values of the form $h(n)$.


The fact that the limit does not exists shows that step 4 is a genuine problem and not just a difficulty in justifying the reasoning. We're stuck because we're trying to prove something that is false.
The mathematical theory to understand this function
The sequence you're looking at does not have a limit. It has two limit points $1/\sqrt{2}$ and $-1/\sqrt{2}$. Similarly, for the function $\sin$ at $+\infty$, all the real numbers in the range $[-1,1]$ are limit points.
Intuitively speaking, a limit point is a limit of a “part” of the sequence or function. A limit means that the values get arbitrarily close to the target, no matter how you approach the target. A limit point means that the values get arbitrarily close to the target, but only for a particular way of approaching the target.
If there's a limit, then it's a limit point, and it's the only one. If there's more than one limit point, there can't be a limit. If there's a single limit point, in general this doesn't imply that there's a limit (this is true in compact spaces, but not in general — in fact, for metric spaces, that property characterizes compact spaces).
A: For large $n$,
$$\sqrt{n^2+\frac n2+1}=n\sqrt{1+\frac1{2n}+\frac1{n^2}}\approx n\left(1+\frac1{4n}\right)=n+\frac14.$$ to the first order.
Then the expression tends to $\pm\dfrac1{\sqrt2}$ depending on the parity of $n$ so that the limit cannot exist.
