# How to show that this real function is not periodic?

How can one prove that $$\cos\left(\frac{\pi}{2} t \right)+\cos\left(t \right)$$ is not periodic?

This question is motivated by the harmonic spectral representation of time series. Indeed, it is easy to show that a path of a time series given by $$\cos(\lambda_1 t) + \cos(\lambda_2 t)$$ is periodic if $\frac{\lambda_1}{\lambda_2} \in \mathbb{Q}$. In the above example this is not the case since $\frac{\lambda_1}{\lambda_2} = \pi/2.$

So the case above could serve as an example for the statement: if $\frac{\lambda_1}{\lambda_2} \not\in \mathbb{Q}$ then the path of a harmonic time series is in general not periodic.

-

## 2 Answers

The general case solves similarly.

Suppose that $f(t) = \cos(\lambda_1 t) + \cos(\lambda_2 t)$ is periodic = $f(t + T)$

Then $f(0) = cos(0) + cos(0) = 2 = \cos(\lambda_1 T) + \cos(\lambda_2 T)$

So, $\lambda_1 T = 2\pi n$ and $\lambda_2 T = 2\pi m$ for integers n and m

Therefore $\frac{\lambda_1}{\lambda_2} = n/m$ i.e. $\frac{\lambda_1}{\lambda_2} \in \mathbb{Q}$

(assuming $\lambda_2, T$ are not zero).

A more general case is $f(t) = c_1\cos(\lambda_1 t) + c_2\cos(\lambda_2 t)$

Assume firstly that $c_1$ and $c_2$ are the same sign. Then similar to the above $f(0) = c_1 cos(0) + c_2 cos(0) = c_1 + c_2 = c_1 \cos(\lambda_1 T) + c_2 \cos(\lambda_2 T)$ Since $c_1$ and $c_2$ are the same sign this still requries that $\lambda_1 T = 2\pi n$ and $\lambda_2 T = 2\pi m$ for integers n and m and the result follows.

If they are different signs, then my answer posted earlier was wrong,

And, an even more general case is $f(t) = c_1\cos(\lambda_1 t +\alpha_1) + c_2\cos(\lambda_2 t + \alpha_2)$

Here, use the expansion of $cos (a + b) = cos(a)cos(b) + sin(a) sin(b)$. The function $f$ is now of the form $f(t) = d_1\cos(\lambda_1 t) + d_2\cos(\lambda_2 t) + d_3\sin(\lambda_1 t) + d_4\sin(\lambda_2 t)$ .

My earlier conclusion of this part of the proof was wrong, so this is part of the question is still open.

-
+1 for the general case –  Avitus Mar 31 '14 at 11:27
Well, this isn't too general; more interesting would be to argue that $t\mapsto c_1\cos(\lambda_1t+\alpha_1)+c_2\cos(\lambda_2t+\alpha_2)$ with $c_1,c_2,\lambda_1,\lambda_2\neq0$ cannot be periodic if $\lambda_1/\lambda_2$ is irrational. –  Marc van Leeuwen Mar 31 '14 at 11:31
I don't follow, from the point on where you consider $c_1,c_2$ of opposite sign. This spoils the property that there is a single value (previously $c_1+c_2$) for which you can easily show that it only arises as $f(0)$; with opposite signs $f(0)=c_1+c_2$ is no longer maximal. I just don't see which argument you bring to replace it. –  Marc van Leeuwen Mar 31 '14 at 14:33
Yes, but $f(0)=c_2-a_2$ is no longer an absolute extremum of your function (not even a relative extremum), and I thought your whole argument was based on that. Put differently, $a_1\cos(\lambda_1 t + \pi) + c_2\cos(\lambda_2 t)=a_1+c_2$ is not satisfied for $t=0$, so if $T$ is the period, it will not be satified for $t=T$ either. You cannot deduce $\lambda_1 T +\pi = 2\pi n$ and $\lambda_2 T = 2\pi m$. –  Marc van Leeuwen Mar 31 '14 at 14:40
Thanks Marc, I see my error (would have replied earlier but my browser went haywire). How about you post an answer, or put the general problem up as a question ? –  Tom Collinge Apr 1 '14 at 8:04

The function $$f(t)=\cos\left(\frac{\pi}{2} t \right)+\cos\left(t \right)$$

is even; so $f(t+T)=f(t) \Leftrightarrow f(t-T)=f(t),~~ \forall t$.

Adding the equations $$f(t+T)=f(t),$$ $$f(t-T)=f(t),$$

we arrive at

$$\cos t \cos T + \cos\left(\frac{\pi}{2} t \right)\cos\left(\frac{\pi}{2} T \right)= \cos t+ \cos\left(\frac{\pi}{2} t \right),~~ \forall t.$$

Then, for $t=0$ we have

$$\cos T + \cos\left(\frac{\pi}{2} T \right)= 2$$

which implies $T=2m\pi$ and $T=4n$, for $n,m\in\mathbb Z$. In summary, there exists no solution to the periodicity problem ($T=0$ is no period in our conventions).

-
Does it matter that $f$ is even. Just put $f(t) = f(t + T)$ then at $t = 0$ $cos(0) + cos(0) = 2 = cos(\pi T/2) + cos(T)$ this can only be true if $\pi T/2$ and $T$ are both of the form $2n\pi$ Again, no solution except T = 0. –  Tom Collinge Mar 31 '14 at 10:58