How to find functional square root of $\sin(x)$. Maybe I am overlooking something, but is there some easy way to find a function $x\to f(x)$ so that
$$(f\circ f)(x) = f(f(x)) = \sin(x)$$
on some interval, say $x\in [-\pi,\pi]\subset \mathbb R$ of real line? (Analytically or otherwise).
 A: Sebapi's idea is fine, but he has miscalculations. The coefficients of $f$ can be computed recursively with elementary finite computations. We start with
$$\sin x=x-{1\over3!}x^3+{1\over5!}x^5-{1\over7!} x^7+{1\over9!}x^9+{1\over11!}x^{11}\ldots\tag{1}$$and make the Ansatz
$$f(x):=\sum_{k=1}^\infty a_k x^k\ .$$
Putting the subsequent coefficients of $f\bigl(f(x)\bigr)-\sin x$ to zero we first have to solve $a_1^2=1$. I choose $a_1=1$ (and leave $a_1=-1$ to you). It then becomes quickly apparent that all $a_{2j}=0$, so that it seems reasonable to replace the above Ansatz by
$$f(x):=\sum_{j=1}^\infty a_{2j-1} x^{2j-1}\ .$$
I did the computations with Mathematica, and obtained
$$f(x)=x-{1\over12}x^3-{1\over160}x^5-{53\over40\,320}x^7-{23\over71\,680}x^9-{92\,713\over1\,277\,337\,600}x^{11}+\ \ldots\ .\tag{2}$$
Computing $f\bigl(f(x)\bigr)$ up to the $x^{11}$ term using $(2)$ gives exactly $(1)$. The numerators appearing in $(2)$ are listed at OEIS under A098932, where reference is made to the problem at hand.
A: We will be solving  Abel functional equation,
$$  \alpha( \sin z) = \alpha(z) + 1.$$
Given a specific $x$ with $x_1 = \sin x$ and $ x_{n+1} = \sin x_n$ it is a result of Jean Ecalle at Orsay that we may take
$$ \alpha(x) = \lim_{n \rightarrow \infty} \; \; \; \frac{3}{x_n^2}  \; + \; \frac{6 \log x_n}{5}  \; + \; \frac{79  x_n^2}{1050}   \; + \; \frac{29  x_n^4}{2625}  \; - \; n.$$
In particular 
$$ f_{1/2} (x)  = \alpha^{-1} \left( \frac{1}{2} + \alpha(x)   \right) $$
A: In the paper Finding a Compositional Square Root of Sine, available (but presently paywalled) in The American Mathematical Monthly, 129:9, 816-830, Tongtong Chen and Edward Scheinerman offer the example
$$
f(x) = \min (-\sin(x), -\arcsin(\sin(x)), \qquad x \in \mathbb{R},
$$
which satisfies $f(f(x)) = \sin(x)$ for all $x \in \mathbb{R}$.
Here is a piece of the graph of $f$:

As suggested by the graph, this example $f$ is continuous, $2\pi$-periodic, and satisfies
$$
f(x) = \begin{cases} -\sin(x), & -\pi \leq x \leq 0, \\ 
-x, & 0 \leq x \leq \frac{\pi}{2}, \\ x - \pi, & \frac{\pi}{2} \leq x \leq \pi, \end{cases}$$
a piecewise representation that is useful for verifying $f(f(x))=\sin(x)$ via case analysis.
The paper also discusses more general problems of finding compositional square roots.
A: As $f \circ f$ has a series development near 0, we can try to find a function with a similar property. For instance for the function square root of $exp(-x)$:
$$
\exp(x) = x - \frac{1}{2} x^2 + \frac{1}{6} x^3 + \ldots
$$
and identify the coefficient of the series of $f$:
$$
f(x) = x - \frac{1}{4} x^2 + \frac{1}{48} x^3 + \ldots
$$
Intuitively, this constructive method would identify $f$. But one would need to further check out the coefficients recursion to prove that the series converges, and therefrom get existence and uniqueness.
EDIT:
as pointed out by Deepak in comments below, used the expansion of $\exp(-x)$ instead of $\sin(x)$. Christian Blatter above used the proper expansion.
