# 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?

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.

• The first one is correct , for the second attempt you would need to show convergence for every sequence, not just for $x_n=n^2$. Edit: If you mention the sandwich you should also give a lower bound e.g. \begin{align} 1-\frac{1}{2\sqrt{x}} \leq 1 + \frac{\cos(x)}{2\sqrt{x}} \leq 1+\frac{1}{2\sqrt{x}} \end{align} – k1next Apr 25 '13 at 17:49
• @Euler: For a conventional sandwich, we need two pieces of bread. – André Nicolas Apr 25 '13 at 18:00
• I made an edited attempt above. – user4167 Apr 25 '13 at 18:56

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.

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.

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$

• How do you show that $1-\frac{1}{2\sqrt{x}} \leq 1 + \frac{\cos x}{2\sqrt{x}}$? – user4167 Apr 25 '13 at 18:49
• @euler: lower bound on $\cos x$? – Alex Apr 25 '13 at 18:56
• If we all agree that |cosx|<=1 than by Comparison can't we just conclude that the limit of the Squareroot term is zero and so the final limit is 1 ? Why the above is all correct, why the excessive hoopla? – imranfat Apr 25 '13 at 18:58
• @imranfat Hi, I am merely stating what I want to do, explain my attempt, and ask if my attempt is correct. Once I received feedback that I got something wrong, I made another attempt to fix that. I am sorry if this seems excessive to you. Any suggestions to structure my questions in a better way? – user4167 Apr 25 '13 at 19:10
• I think your approach is very well taken. But I just wondered if it was needed if the sole objective was to find the answer to the limit. Your question certainly qualifies to practice the Squeeze Theorem. – imranfat Apr 26 '13 at 19:44