# Prove that $f(x) = \cos(1/x)$ is not periodic without using calculus

Given a function $$f(x)=\cos\frac{1}{x}$$ Prove that it is not periodic.

I've started with assuming that $f(x)$ is periodic and hence $f(x) = f(x+2\pi)$ since $\cos$ hat period $T = 2\pi$. This gives:

$$\cos\frac{1}{x} = \cos\frac{1}{x+2\pi}$$

Given the above we may take some value x and check whether the equation holds for that value. Let's say $x=\frac{\pi}{2}$, then $$\cos\frac{2}{\pi} = \cos\frac{2}{5\pi}$$ which is not true. Hence $f(x) = \cos\frac{1}{x}$ is not periodic. I've found similar questions here and here but they use derivatives for the proof.

Can I somehow prove the above in a general way without taking any exact value for $x$ and without using calculus?

• How do you prove whether a function is periodic or not, using derivatives? Jun 28, 2018 at 16:23
• There's quite a few ways. One would be by showing that $\lim_{x\to\infty} cos\frac 1 x$ exists Jun 28, 2018 at 16:29
• @Batominovski if a function is continuous and periodic then its derivative is also periodic, isn't that true? Jun 28, 2018 at 16:31
• But the periodicity of the derivative does not imply the periodicity of the original function. Jun 28, 2018 at 16:31
• @Batominovski I've just found this proof Jun 28, 2018 at 16:39

Assume $$\cos\frac1x=\cos\frac1{x+T}.$$

Then we must have

$$\frac1x=\pm\frac1{x+T}+2k\pi,$$

$$k=\frac{\dfrac1x\mp\dfrac1{x+T}}{2\pi}.$$

But the RHS cannot be an integer for all $x$, a contradiction.

• that is beautiful Jun 28, 2018 at 16:55
• Can you please explain why "the RHS cannot be an integer for all $x$."? Jun 28, 2018 at 17:09
• @yakobyd It's a continuous function of $x$. This arguably uses "calculus", but it's also intuitively obvious. Alternatively, it's a non integer for sufficiently large $x$ since the numerator tends to $0$. For example, plug in $x=10^{100}$. Jun 28, 2018 at 18:27
• Ohh, now I can see what I have missed. I thought that it says that for every $x$, $k$ is not an integer (what a rookie mistake in logic). Thank you for your explanation @JackM. Jun 28, 2018 at 18:54
• @JackM: indeed, for $x>1/\pi$, $0<k<1$ !
– user65203
Jun 28, 2018 at 20:25

The zeros of $f$ are at the points $x$ such that $$\frac{1}{x}=\frac{\pi}{2}+k\pi$$ for $k$ a positive integer. Then they are of the form $$x=\frac{2}{(2k+1)\pi}<\frac{2}{\pi}$$ Since the set of zeros is nonempty and bounded, the function cannot be periodic, because if $T>0$ is a period and $x_0$ is a zero, then also $x_0+nT$ would be a zero, for every positive integer $n$.

Let us proove the following theorem

Theorem: Assume $$f:\mathbb{R}\to\mathbb{R}$$ has a minimal period $$T\in\mathbb{R}$$, that is, for all $$x\in \mathbb{R} : f(x+T) = f(x)$$. Then $$\lim_{x\to\infty}f(x)$$ does not exist.

Proof: $$T$$ is minimal, thus, there is some $$x_0\in\mathbb{R}$$ such that $$f(x_0) \ne f(x_0 + \frac12T)$$. Choose the sequence $$t_n = x_0 + \frac12nT$$. We have that

$$f(t_n) = \begin{cases} f(x_0) & \text{if } n \text{ is even} \\ f(x_0+\frac12 T) & \text{if } n \text{ is odd} \end{cases}$$

and since $$f(x_0) \ne f(x_0 + \frac12T)$$ we get that the sequence $$f(t_n)$$ diverges when $$n\to\infty$$. From here we conclude that the limit $$\lim_{x\to\infty}f(x)$$ does not exist.

Now, regarding your question we have that $$\lim_{x\to\infty} \cos\left(\frac1x\right) = \lim_{x\to0} \cos(x) = 1$$ (by continuity of $$\cos(x)$$ at $$x=0$$), that is, the limit exists. Thus by the theorem above we conclude that $$\cos\left(\frac1x \right)$$ has no minimal period.

This can mean two things: either it has no period or it has infinitly many periods with no minimum. If it is the former case we are done. Hence, assume the latter. Continuous functions that have infinitely many periods with no minimum are constatnt (a nice exercise). Our function is continuous and is not constant and thus we reached a contradiction.

In total we have shown that $$\cos\left(\frac1x \right)$$ has no period. Perhaps this method is too long for this particular question, but assuming the rigorous background behind it is known, this trick can come pretty handy. (This answer was heavily influenced by @Sudix 's comment).

There is a non-calculus proof of the inequality $\cos(t)\geq 1-\frac{t^2}{2}$ for all $t\in\mathbb{R}$. I am not providing a proof of this inequality.

Suppose on the contrary that $T>0$ is a period of $f$. Choose an integer $n>0$ such that $nT>1$. Then, we have that $0<f(nT)<1$. Let $N>0$ be an integer so large that that $NT> \sqrt{\frac{1}{2\big(1-f(nT)\big)}}$. Then, $f(NT)>f(nT)$, which is a contradiction.

However, surely, there are easier ways.

Your approach does not work: who's to say that $f$ has period $2\pi$, just because cosine does?

You can of course assume $f$ has some unknown period $T>0$, and try to derive a contradiction. You would need $$\cos\frac{1}{x} = \cos\frac{1}{x+nT}$$ for every $x\in\mathbb{R}$ and $n\in \mathbb{Z}$. It's not hard to use elementary properties of cosine to prove this: for example, if assuming that cosine is strictly decreasing between $0$ and $\pi$ does not "count as calculus," try $x=1/\pi$ and $n=1$.

For $x>\frac2\pi$ we have $0 < \frac1x<\frac\pi2$ and hence $f(x)=\cos\frac 1x>0$, whereas $f(\frac1{\pi})=\cos\pi=-1$. If $T>0$ is a period of $f$, pick $n\in\Bbb N$ with $nT>\frac2\pi$ and arrive at the contradiction $-1=f(\frac1\pi)=f(\frac1\pi+nT)>0$.