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.