Max frequency of a signal? Having 
$$ f(x) = \cos(x) + \sin(10x)$$
How Can I know which is the max frequency of this signal?
I need it to set the right Nyquist frequency ($2\cdot\max\text{frequency}$)
I can use Matlab if it's needed
 A: The $\sin(10x)$ term has a frequency of $\frac {10}{2\pi }$ because $x$ must increase be $\frac {2\pi }{10}$ to make a full cycle.
A: In the more complicated case you can apply Fourier series. In this case the signal is already in the desired form and we have to pick the term with the last nonzero coefficient. In general the signal might not have any last term in which case you have to lowpass filter it first. There is also a mathematical form to the operation and it is convolution defined by
\begin{equation}
(f*g)(x) = \int_{-\infty}^\infty f(t) g(x-t) dt \ .
\end{equation}
In the case of $T$-periodic functions its expression can be reduced somewhat. It is useful to take a look at the operation in $k$-space. For series coefficients we have
\begin{equation}
c_k(f*g) = T \cdot c_k(f)c_k(g) \ ,
\end{equation}
where $T$ is the period. Hence by choosing a suitable impulse response $g$, that has $c_k(g)=0$ for every $k \geq N$ the filtered signal $f*g$ has also coefficients
\begin{equation}
c_k(f*g) = T \cdot c_k(f)c_k(g) = T \cdot c_k(f) \cdot 0 = 0
\end{equation}
for $n \geq N$. Hence there is a maximum frequency $f_N = \frac{N}{2\pi}$ and you may set sampling frequency to $N/\pi$. Here we have assumed that the Fourier series is of the form
\begin{equation}
f(x) = \sum_{k=-N}^N c_k e^{ikx} \ , \ \ k = 2\pi f_k \ .
\end{equation}
For the signal in the question $N = 10$ and the sampling frequency equals to $10/\pi$.
