TITLE: axiomatic definition of trigonometric functions
QUESTION [9 upvotes]: A friend told me that in addition to the axioms for the real numbers, it can be proved (without appeal to sine and cosine) that a function exists satisfying the following conditions:

$C(a-b)=C(a)C(b)+S(a)S(b)$
$ S(x) \geq 0 ,\forall x \in [0,p]$
$ S(p)=1$

This would allow an alternative definition of sine, cosine and even $\pi$, without using geometry, calculus or non-elementary arguments. See Timothy Gowers blogpost for a discussion of how difficult it can be to define sine.
Now, using the conditions as 'axioms', I managed to show that:

$C(x)$ and $S(x)$ were both periodic with period $4p$
$C^2(x)+S^2(x)=1$
$C(x+p)=-S(x)$
$S(x+p)=C(x)$

And, I found that if I defined $ \alpha_n= S(\frac{p}{2^n})$ and $\epsilon := \frac{p}{2^n}$, then I could show that $ S(x)$ could be defined as a function for countably infinite points $B = \{k \in \mathbb{Z},n \in \mathbb{N}:n\epsilon+kp\} \subset \mathbb{R}$, and simultaneously show that $\alpha_n$ was strictly decreasing. 
However, after this point I got stuck. I didn't manage to show the existence and uniqueness of $ S(x), \forall x \in \mathbb{R}_+\setminus B$. Can this be done without using geometry?
Note: The fact that $S$ is a function is something to be proven. Writing $S(x)$ assumes functionness. So we should really be careful that we don't give circular arguments.

REPLY [2 votes]: First I show that $S$ and $C$ are continuous.
You can easily show that the following hold:

$C(x) = S(p-x)$,
$S(x\pm y) = S(x)C(y) \pm C(x)S(y)$,
$S(-x) = -S(x)$,
$C(x) \ge 0$ if $x \in [-p,p]$,
$S(p/2) = C(p/2) = 2^{-1/2}$.

It follows that, when $x \in [-p,p]$ and $y \in [0,p]$,
$$S(x+y)-S(x-y) = 2C(x)S(y) \ge 0,$$
so that $S$ is increasing on $[-p,p]$. Also, if $x \in [0,p]$, then
$$S(x) = 2S(x/2)C(x/2) = 2S(x/2)S(p-x/2) \le 2S(x/2)S(p/2) = 2^{1/2}S(x/2),$$
so that by induction we get for nonnegative integer $n$
$$S(2^{-n}p) \le 2^{-n/2}.$$
Now we may show $S$ is continuous at $0$: Given any $\epsilon > 0$, choose $n$ large enough so that $2^{-n/2} < \epsilon$, and let $\delta = 2^{-n}p$. Then if $|x| < \delta$, $$|S(x)| = |S(|x|)| \le |S(2^{-n}p)| \le 2^{-n/2} < \epsilon.$$
Now when $x \in [-p,p]$ we have
$$1 - S(x)^2 = C(x)^2 \le C(x) \le 1$$
and the squeeze theorem applies to show that $C$ is continuous at $0$.
Now $S$ is continuous everywhere, because for any $x \in \mathbb{R}$,
$$\lim_{h \to 0} S(x+h) = \lim_{h\to 0} [S(x)C(h)+C(x)S(h)] = S(x).$$
Thus $C$ is also continuous everywhere (since $C(x) = S(p-x)$).

Next I show that $S$ and $C$ are uniquely defined on a dense subset of $\mathbb{R}$.
Note that, if $x \in [0,p]$ then
$$C(x) = C(x/2)^2 - S(x/2)^2 = 2C(x/2)^2 - 1$$
which, together with $C(x/2) \ge 0$, implies
$$C(x/2) = \sqrt{\frac{C(x)+1}{2}}.$$
Now suppose that $S'$ and $C'$ are another pair of functions satisfying the axioms. Then $C'$ satisfies the same equation, so we can show by induction that for integers $n \ge 0$,
$$C(2^{-n}p) = C'(2^{-n}p).$$
Then since $S(x) = \sqrt{1 - C(x)^2}$ for $x \in [0,p]$ we get
$$S(2^{-n}p) = S'(2^{-n}p).$$
Therefore, by the addition formulas we can see that for all $m \in \mathbb{Z}$,
$$S(2^{-n}mp) = S'(2^{-n}mp) \text{ and } C(2^{-n}mp) = C'(2^{-n}mp).$$
Now the set $\{2^{-n}mp \mid m,n \in \mathbb{Z}, n \ge 0\}$ is dense in $\mathbb{R}$, so continuity implies $S = S'$ and $C = C'$.

Finally, the functions $\sin(\pi x/{2p})$ and $\cos(\pi x/{2p})$ satisfy the axioms, so $S(x) = \sin(\pi x/{2p})$ and $C(x) = \cos(\pi x/{2p})$.
Note: This proves that $\sin$ and $\cos$ are continuous (which I had not assumed).

Edit: I suppose I haven't proved existence (except by appealing to the existence of $\sin$ and $\cos$). But I believe this works: I already showed that $S$ and $C$ are uniquely defined on the dense set $A = \{2^{-n}mp \mid m,n \in \mathbb{Z}, n \ge 0\}$. So if we can prove that $S$ is uniformly continuous, then it would extend (uniquely) to a continuous function on all of $\mathbb{R}$. But for all $\epsilon > 0$, choose $n$ large enough so that $2^{-n/2} < \epsilon/2$, and let $\delta = 2^{-n}p$. Then if $|h| < \delta$, then from the proof that $S$ is continuous at $0$ we have $|S(h)| < \epsilon/2$ and $|1-C(h)| \le 1-C(h)^2 = S(h)^2 \le |S(h)| < \epsilon/2$, so
\begin{align}
|S(x + h) - S(x)| &= |S(x)C(h) + C(x)S(h) - S(x)| \\
&\le |S(x)|\,|1-C(h)| + |C(x)|\,|S(h)| \\
&< 1 \cdot \epsilon/2 + 1 \cdot \epsilon/2 = \epsilon.
\end{align}
So $S$ (and therefore $C$) is uniformly continuous.