# Function to take discrete sample of a continuous sinusoid function?

Say I have continuous sinusoid function such as: $$x(t) = \cos(2\pi f_0 t)$$

where $f_0$ is the frequency and $t$ is some time in the function.

I want to take samples of this function at some sample rate using a function of this form: $$x(n) = \cos(2\pi f_0 nt_s)$$

where $t_s$ is the constant time between samples.

Let's say I want a sampling frequency of $f_s = 2f_0$ samples, the minimum acceptable number of samples per cycle.

I know that $f_s = 1/t_s$. But how do I use that to construct the correct function?

Part of my confusion stems from my uncertainty about whether this relationship is correct: $$f_0 = f_s = 1/t_s$$

If it's NOT true then there is some fundamental relationship between $f_0$ and $f_s$ that I'm not understanding. I guess my biggest concern is that if $f_0 = f_s$ then there is a chance that $f_0$ and $t_s$ could cancel each other out and just become 1.

-

From your earlier equation, $f_s=2f_0,$ you have $f_s=2f_0=\frac{1}{t_s}$ so you need at least two samples per cycle.