TITLE: Is this solution mathematically "legal"?
QUESTION [14 upvotes]: I have the sequence
$$
a_n = \frac{n \cos n}{n^2 + 1}
$$
and I'm trying to evaluate the limit of $a_n$ as $n\to\infty$
$$
\begin{align*}
\lim_{n\to\infty}a_n&= \lim_{n\to\infty}\frac{n \cos n}{n^2 + 1}\\ &= \lim_{n\to\infty}\cos n \cdot \lim_{n\to\infty} \frac{n}{n^2 + 1}\\
\end{align*}
$$
Using L’hôpital’s rule twice on $\frac{n}{n^2+1}$
$$
\begin{align*}
\lim_{n\to\infty}a_n&= \lim_{n\to\infty}\cos n \cdot \lim_{n\to\infty} \frac{0}{2} \\ &= 0
\end{align*}
$$
Is there any flaw in this method?

REPLY [4 votes]: It works if you expand your intention.
As others have mentioned, $\cos(x)$ doesn't have a limit as $x \to \infty$.
However any function has a set of limit points, and we can still give meaning to doing arithmetic with them. The set of limit points of $\cos(x)$ as $x \to \infty$ is the interval $[-1,1]$. And suitably interpreted, $[-1,1] \cdot 0 = 0$.
In short, there is something that is correct that resembles what you are trying to do. But what you literally said isn't right, and it's unclear if you had the right idea and didn't know how to express it or if you simply made an outright mistake.