<s>[INST] What are the $\sin$ and $\cos$ of discrete calculus? I'm getting acquainted with Discrete Calculus, and I really like taking functions that arise in traditional calculus and finding what their counterparts in discrete-land are.
For example, if we define our difference operator
$$\Delta f(n) = f(n + 1) - f(n)$$
(the analogue of the familiar derivative operator $D = \frac{d}{dx}$) then we can ask: what is the $e^x$ of this operator? That is, what is the function $g$ such that $\Delta g(n) = g(n)$? The answer is $2^x$, since:
$$\Delta 2^x = 2^{x+1} - 2^x = 2(2^x) - 2^x = 2^x$$
Likewise, we can ask what the $g(x) = x^n$ of discrete calculus is -- it turns out to be
$$g(x) = \overbrace{x(x - 1)(x - 2) \dots (x - (n - 1))}^{n \text{ factors}}$$
My question is: is there a $\sin$ and $\cos$ of discrete calculus? By which I mean, are there any functions $f$ such that $\Delta^2 f = -f$?
 [/INST] Note that if $f(n)$ is a discrete sinusoid, then
$$
f(n+1)=f(n)+\Delta f(n)
$$
and
$$
\Delta f(n+1) = \Delta f(n) + \Delta^2 f(n) = \Delta f(n) - f(n),
$$
or
$$
\left(\begin{matrix}f(n+1) \\ \Delta f(n+1)\end{matrix}\right)=\left(\begin{matrix}1 & 1 \\ -1 & 1 \end{matrix}\right)\left(\begin{matrix}f(n)\\ \Delta f(n)\end{matrix}\right).
$$
Also,
$$
\left(\begin{matrix}1 & 1 \\ -1 & 1 \end{matrix}\right)^2 = \left(\begin{matrix}1 & 1 \\ -1 & 1 \end{matrix}\right)\left(\begin{matrix}1 & 1 \\ -1 & 1 \end{matrix}\right)=\left(\begin{matrix}0 & 2 \\ -2 & 0 \end{matrix}\right),
$$
$$
\left(\begin{matrix}1 & 1 \\ -1 & 1 \end{matrix}\right)^3 = \left(\begin{matrix}1 & 1 \\ -1 & 1 \end{matrix}\right)\left(\begin{matrix}0 & 2 \\ -2 & 0 \end{matrix}\right)=\left(\begin{matrix}-2 & 2 \\ -2 & -2 \end{matrix}\right),
$$
$$
\left(\begin{matrix}1 & 1 \\ -1 & 1 \end{matrix}\right)^4 = \left(\begin{matrix}1 & 1 \\ -1 & 1 \end{matrix}\right)\left(\begin{matrix}-2 & 2 \\ -2 & -2 \end{matrix}\right)=\left(\begin{matrix}-4 & 0 \\ 0 & -4 \end{matrix}\right)=-4\hat{I}.
$$
So the discrete $\cos$, which starts with $f(0)=1$ and $\Delta f(0)=0$, is
$$
\left( 1, 1, 0, -2, -4, -4, 0, 8, 16, \ldots\right),
$$
and the discrete $\sin$, which starts with $f(0)=0$ and $\Delta f(0)=1$, is
$$
\left(0, 1, 2, 2, 0, -4, -8, -8, 0, \ldots\right).
$$
The fact that these grow as $2^{n/2}$, rather than being periodic, is a consequence of your non-symmetric choice of $\Delta^2$.  If you define $\Delta^2 f(n)=f(n-1) - 2f(n) + f(n+1)$, say, you will find functions closer to what you might have expected.
</s>