TITLE: Does this curve tend to a square wave?
QUESTION [6 upvotes]: I have put some Mathematica code here:
http://pastebin.com/cY6r7skS
that uses this algorithm:
$$y1 = Sin[x];$$
$$y2 = Sin[y1];$$
$$y3 = Sin[y1 + y2];$$
$$y4 = Sin[y1 + y2 + y3];$$
$$y5 = Sin[y1 + y2 + y3 + y4];$$
$$y6 = Sin[y1 + y2 + y3 + y4 + y5];$$
$$y7 = Sin[y1 + y2 + y3 + y4 + y5 + y6];$$
$$y8 = Sin[y1 + y2 + y3 + y4 + y5 + y6 + y7];$$
$$y9 = Sin[y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8];$$
$$y10 = Sin[y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8 + y9];$$
$$y11 = Sin[y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8 + y9 + y10];$$
$$y12 = Sin[y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8 + y9 + y10 + y11];$$
$$y = y1 + y2 + y3 + y4 + y5 + y6 + y7 + y8 + y9 + y10 + y11 + y12;$$
where $y$ is the purple curve in this image:

The blue curves are $y1$, $y2$, $y3$, $y4$, $y5$, $y6$... and so on.

Does the purple curve $y$ tend to a square wave?

This question builds upon the answer to this previous question.
Edit:
The partial sums:
$$y1$$
$$y1 + y2$$
$$y1 + y2 + y3$$
$$y1 + y2 + y3 + y4$$
$$y1 + y2 + y3 + y4 + y5$$
$$y1 + y2 + y3 + y4 + y5 + y6$$
...
and so on, look like this when plotted:

For more images see: link to question on dsp stackexchange

REPLY [2 votes]: The problem is equivalent to analyzing the convergence of the recursive equation
$$z_{n+1}=z_n + \sin(z_n)$$
It's readily seen that the fixed points are $z = k \, \pi$,  and that these are attractors only for odd $k$. Further, convergence is guaranteed in each interval (eg, if $z_0\in (0,2\pi)$ then $z_{\infty}=\pi$).
Then, the original sequence $x=\sin(z)$ converges pointwise to zero. 
As for its partial sums: the same analysis shows that they are confined to the interval $[0,1]$ in the domain intervals $[0,2 \pi]$, $[4\pi,6 \pi]$,$[8\pi,10 \pi]$ ... , and $[-1,0]$ elsewhere. That's just what gives the dim visual ilussion of a "square wave", if one superposes all partial sums. But it does not converge to a square wave, and each partial sum does not resembles a square wave at all.