I know that the real function of sine
$$ f(x) : \mathbb{R} \longrightarrow \mathbb{R} \\ \qquad \qquad \qquad \qquad \, x \mapsto f(x) = \sin(x) $$
has a period of $2\pi$. I've tried to derivate it this way but I get a contradiction.
So a function $f$ is periodic if it verifies $$ f(x) = f(x+T) $$
for some period $T$. So setting the equation
$$ \sin(x) = \sin(x+T) $$
And since it is true for all $x \in \mathbb{R}$ then it must hold for $x = 0$ so:
$$ 0 = \sin(T) \implies T = n\pi , n = 0,1,2,... $$
What's wrong with this?