Integration of looped sin function 
At infinity,
i took limits to be L. so L= sin (x+L)
then after integration i am left withL= 2 cosL.
how to get value of L
 A: Hint:
Assuming $\lim\limits_{n\to\infty}f_n(x)=f(x)$ the functional equation for $f(x)$ reads:
$$
f(x)=\sin(x+f(x)).\tag1
$$
Instead of trying to resolve the equation (1) wrt $f$ one can easily resolve it (taking into account multivaluedness of $\arcsin$ function) wrt $x$:
$$
x=\begin{cases}
X_1(f)\equiv\arcsin(f)-f,& 0\le x\le\frac\pi2-1\\
X_2(f)\equiv\pi-\arcsin(f)-f,& \frac\pi2-1\le x\le\pi
\end{cases}.\tag2
$$
and compute the integral in question as
$$
\int_0^\pi f(x)dx=\int_0^1[X_2(f)-X_1(f)] df=\int_0^1[\pi-2\arcsin(f)] df=\color{red}2.
$$


Extended hint:
To justify the equation $(2)$ it is necessary that the function $f(x)$ consists of exactly two monotonic branches: one increasing from $0$ to $1$ followed by the other decreasing from $1$ to $0$. The properties of $f(x)$ follow immediately from the equation $(1)$, provided that $g(x)\equiv x+f(x)$ is a monotonic function mapping $[0,\pi]\mapsto[0,\pi]$, and this is
  easy to demonstrate rewriting the equation $(1)$ as:
  $$g(x)=x+\sin(g(x)).$$
Indeed, $g(0)=0$ and $g(\pi)=\pi$ are the only possible solutions of
$$g(0)=\sin(g(0)),\quad\text{and}\quad g(\pi)=\pi+\sin(g(\pi)),$$
  respectively, and
  $$
g'(x)=1+\cos(g(x))g'(x)\Rightarrow g'(x)=\frac1{1-\cos(g(x))}>0.
$$

