# Prove that function $f(n) = \cos(1/n)$ is monotonically decreasing?

Ho can we prove that this function

$$f(n) = \cos(1/n)$$

is monotonically decreasing? I computed derivative of this function and got:

$$f'(n) = \frac{\sin(1/n)}{n^2}$$

and it is positive, but should be negative, because function $f(n) = \cos(1/n)$ is monotonically decreasing.

• $x$ and $n$ are mixed up. Choose one (preferably $x$ to keep up with the conventions). Also, what is the domain? $f$ is actually not monotone on $(0,\infty)$. – Clement C. Jan 1 '16 at 16:32
• as @ClementC. says, if the domain is supposed to be $\Bbb R$, please use $x$. Generally one uses $n$ for natural numbers only – Ant Jan 1 '16 at 16:44
• It isn't decreasing. It's increasing. as $x \rightarrow \infty f(x) \rightarrow 1$. – fleablood Jan 1 '16 at 17:25

Is $n$ supposed to be a positive integer? If so you should probably call $f$ a sequence instead of a function, to prevent confusion.

Assuming that yes you are talking about the sequence $\cos(1/n)$: That sequence is not decreasing, it's increasing.

In detail: The sequence $1/n$ is decreasing. And $0<1/n<\pi$, which means that $\cos$ is also decreasing on the relevant range. A decreasing function of a decreasing sequence is increasing.

Ignoring the derivative which does show $f(x) = \cos(1/x)$ is increasing when $\sin (1/x)/x^2$ is positive (which is the case for all $x > 1/\pi$ [which is the case for all natural numbers n]), "common sense" should indicate $f(x) = \cos(1/x)$ is increasing for significantly large $x$.

As $x \rightarrow \infty$ then $1/x$ decreases to 0 (as a limit, of course). As $v = 1/x$ decreases from $v = \pi$ ($x = 1/\pi$) to 0, $\cos v$ increases from -1 to 1 (as a limit, of course).

So $f(x)$ is monotonically increasing on $[1/\pi, \infty)$.

But $f(x)= \cos(1/x)$ is monotonically decreasing on $(-\infty, - 1/\pi]$. (But then it oscilates innumerably, is undefined at x = 0, oscilates innumerable times between 0 and $1/\pi$ and then increases in value from -1 to a limit of 1.)

The function $x\mapsto\cos(1/x)$ is not decreasing in $(0,\infty)$, because its derivative is $$\frac{\sin(1/x)}{x^2}$$ and obviously this assumes positive and negative values over suitable intervals.

The sequence $n\mapsto\cos(1/n)$ cannot be decreasing, because $$\lim_{n\to\infty}\cos\frac{1}{n}=1$$ and $\cos(1/n)<1$ for all positive integers $n$.

Let's see if it is increasing, that is, $$\cos\frac{1}{n}<\cos\frac{1}{n+1}$$ which is true, because $1/n\in(0,\pi/2)$ for all positive integers $n$ and the cosine function is decreasing in the interval $(0,\pi/2)$.

• @DavidC.Ullrich Removed the spurious minus sign; the other edit was done before I saw your comment. – egreg Jan 1 '16 at 17:13
• "obviously this assumes positive and negative values over suitable intervals." But for x > 1/pi sin(1/x)/x^2 is positive. So it's increasing there.. oh, I see. You are saying it isn't increasing of small x. – fleablood Jan 1 '16 at 17:37
• @fleablood Yes, without more information about the domain of the function, we can say nothing more than this. Of course the derivative is positive for $x>1/\pi$, in particular for $x>1$. – egreg Jan 1 '16 at 18:05
• Yeah, I was taking it for granted the OP meant monotonically decreasing for significantly large x. I shouldn't have as, without specification, in/decreasing should mean everywhere. – fleablood Jan 1 '16 at 18:55

Remember that the derivative of $1/n^2$ is negative.

• Of $1/n$, no? (without the square, for the sake of the question) – Clement C. Jan 1 '16 at 16:37
• ??? I don't see how that has any bearing. Of course you need to note that at one point the OP wrote $f(n)$ where it should have been $f'(n)$... – David C. Ullrich Jan 1 '16 at 16:39
• @DavidC.Ullrich Is your comment referring to mine? (or to marty cohen's answer?) – Clement C. Jan 1 '16 at 16:47
• But you should also take account that the derivative of $\cos(x)$ is $-\sin(x)$. And hence, this sequence is indeed increasing. – user49685 Jan 1 '16 at 17:04
• @ClementC. I was referring to marty cohen's answer. It's simply wrong, isn't it? What does the derivative of $1/nn^2$ have to do with the question? – David C. Ullrich Jan 1 '16 at 17:09