Good Representation of an angle between $0$ and $2\pi$? I am currently dealing with a angle vs. time type of graph, where the x-axis is the time instant and the y-axis is the corresponding angle expressed in radian.
I am adopting the $[0, 2\pi]$ convention here, which means the values are guaranteed to be within this range. The problem is that the $0$ and $2\pi$ are essentially the same and should be treated so in my application. 
I am looking for a good mapping $f(\cdot)$ to represent the angle so that it is a one-to-one matching everywhere except at $0$ and $2\pi$, where$$f(0)=f(2\pi)$$
It is clear that a simple trigonometric function such as $sin(\cdot)$ will not do the trick. Although $sin(0)=sin(2\pi)$, $sin(\frac{\pi}{4})=sin(\frac{3\pi}{4})$, which is undesirable.
 A: From the comments I've ascertained that you really want to define a distance between two angles, which you can do easily. Two angles are just two points on the unit circle, so a natural distance is the smallest arclength/angle between them. 
For any two distinct points $\theta_1, \theta_2$ on the circle there are exactly two arcs on the circle joining them. One of these arcs will cross the problematic point $\theta = 0$ and one will not. The one that does not has length $L = |\theta_1 - \theta_2|$, and thus the other has length $2 \pi - L$ (since they together form the full circle). Thus the distance on the circle between $\theta_1,\theta_2$ is just $$
\begin{align}
d(\theta_1,\theta_2) &= \min \{ |\theta_1 - \theta_2|, 2 \pi - |\theta_1 - \theta_2|\}\\
&= \cases{|\theta_1 - \theta_2| & if $|\theta_1 - \theta_2| \le \pi$ \\
2 \pi - |\theta_1 - \theta_2| & otherwise.}
\end{align}$$
This is the most natural metric on the set of angles so it should do the job; and it's also quite cheap to compute.
A: If I correctly understand the challenge, we want $f:[0,2\pi]\to\mathbb R$ such that $f$ is one-to-one on $[0,2\pi)$, and $f(0)=f(2\pi)$.  If we require no further properties, one example is $f(x)=x$ for $0\leq x < 2\pi$, and $f(2\pi)=0$.  If we require that $f$ is continuous, then this is impossible.  
Suppose that $f:[0,2\pi]\to\mathbb R$ is a continuous function such that $f(0)=f(2\pi)$.  By the intermediate value theorem, there exists $x\in(0,\pi)$ such that $f(x)=\dfrac{f(0)+f(\pi)}{2}$, and there exists $y\in(\pi,2\pi)$ such that $f(y)=\dfrac{f(2\pi)+f(\pi)}{2}$.  Thus $x\neq y$, $\{x,y\}\cap\{0,2\pi\}=\varnothing$, and $f(x)=f(y)$.
More generally, continuous one-to-one functions from intervals in $\mathbb R$ to $\mathbb R$ must be strictly increasing or strictly decreasing.
