Finding $\lim_{x \to +\infty} \left(1+\frac{\cos x}{2\sqrt{x}}\right)$ Let $f(x)=x+\sin(\sqrt{x})$. I want to find $\lim_{x \to +\infty} f'(x)$.
Attempt 1
We have $$f'(x)=1+\frac{\cos x}{2\sqrt{x}} \leq 1 + \left|\frac{\cos x}{2\sqrt{x}}\right| \leq 1 + \frac{1}{2\sqrt{x}}.$$ As $x \rightarrow \infty$, $\sqrt{x} \rightarrow \infty$, hence $\frac{1}{2\sqrt{x}} \rightarrow 0$. Then $1 + \frac{1}{2\sqrt{x}} \rightarrow 1$. Therefore by the Sandwich Theorem $f'(x) \rightarrow 1$.

Lemma
$\lim_{x \to \infty} g(x)=l$ if and only if $\lim_{n \to \infty} g(x_{n})=l$ for all sequences $(x_{n}) \subset E$ with $\lim_{n \to \infty} x_{n} = \infty$, where $E$ is the domain of $g$.
Attempt 2
$f'(x)=1+\frac{\cos x}{2\sqrt{x}}$. Now let $g(x)=f'(x)$ and $x_{n}=n^2$. Then $\lim_{n \to \infty} (x_{n})=\infty$. We have $g(x_{n})=1+\frac{\cos(n)}{2n}$. Then as $n \rightarrow \infty$, $g(x_{n}) \rightarrow 1.$ Therefore by the Lemma above, $\lim_{x \to +\infty} g(x)=1$.
Question
Are the attempts above correct?
Thank you for your time.

Edited Attempt 1
We have $$f'(x)=1+\frac{\cos x}{2\sqrt{x}} \leq 1 + \left|\frac{\cos x}{2\sqrt{x}}\right| \leq 1 + \frac{1}{2\sqrt{x}}.$$ For all $x \geq 0$, $1+\frac{\cos x}{2\sqrt{x}} \geq 0$. So $$0 \leq 1+\frac{\cos x}{2\sqrt{x}} \leq 1+\frac{1}{2\sqrt{x}}.$$ As $x \rightarrow \infty$, $\sqrt{x} \rightarrow \infty$, hence $\frac{1}{2\sqrt{x}} \rightarrow 0$. Then $1 + \frac{1}{2\sqrt{x}} \rightarrow 1$. Therefore by the Sandwich Theorem $f'(x) \rightarrow 1$.
Question
Is this correct? Also, I would like to know if it is necessary to show that $$1-\frac{1}{2\sqrt{x}} \leq 1 + \frac{\cos x}{2\sqrt{x}} \leq 1+\frac{1}{2\sqrt{x}} \tag{1}$$
instead of $$0 \leq 1+\frac{\cos x}{2\sqrt{x}} \leq 1+\frac{1}{2\sqrt{x}}. \tag{2}$$
In my attempt to show inequality $(1)$, I got as far as $$1-\left|\frac{\cos x}{2\sqrt{x}}\right| \le \left|1 -\left(-\frac{\cos x}{2\sqrt{x}}\right)\right| \leq 1 + \left|\frac{\cos x}{2\sqrt{x}}\right| \leq 1 + \frac{1}{2\sqrt{x}}.$$ Could you please help me show that $$1-\frac{1}{2\sqrt{x}} \leq 1 + \frac{\cos x}{2\sqrt{x}}.$$
Thank you.
 A: The first is almost correct, I guess you intend to do the right thing.
You should rather show 
$$|f'(x)-1|\le \frac1{2\sqrt x}.$$
(What you write does not exclude that $f'(x)$ might become awfully negative).
In your second attempt you use only one special sequence instead of all sequences (i.e. you should use an arbitrary sequence). Therefore, unless you know that the limit exists (but you merely don't know the value), this attempt is not complete.
A: For the first attempt, I suppose to use the sandwich theorem or squeeze theorem, you want to find suitable functions $L(x)$ and $U(x)$ such that for all $x$, $$L(x) \leq f(x) \leq U(x)$$ and $$1 = \lim_{x \to \infty} L(x) \leq \lim_{x \to \infty} f(x) \leq \lim_{x \to \infty} U(x) = 1.$$ Right now I only see an upper bound $U(x)$ with limiting value $1$, but no lower bound $L(x)$.
For the second attempt, you want to prove that for all sequences $(x_n)$, the limit is $1$, and not just for one particular choice. So using this lemma in a useful way is not so easy, and if I were you I'd try to make the first attempt work.
A: I might be wrong here, but why not just use the squeeze lemma by using upper and lower bounds on $\cos x$? Obviously 
$$
1= \lim_{x \to \infty} (1-\frac{1}{2 \sqrt{x}}) \leq L \leq \lim_{x \to \infty} (1 + \frac{1}{2 \sqrt{x}}) = 1
$$
Hence $L=1$
