User:LucasVB/Iterated trigonometric functions

Iterated trigonometric functions are functions built by using trigonometric functions recursively. The first useful one I stumbled upon was the iterated sine function, which I defined as follows:


 * $$\sin_0 x = x$$
 * $$\sin_1 x = \sin(x)$$
 * $$\sin_i x = \sin(\sin_{i-1}(x))$$

This function is interesting in that it arbitrarily approaches a continuous and smooth square wave, without any ringing artifacts, if you append to it a normalization factor as i tends to infinity (this is important otherwise it'll converge to zero).

I was wondering if I could approach other primitive waveforms (such as triangle and sawtooth waves) with a similar method. I found that $$\tan(\sin(x))$$ is close to a smooth triangle wave, but I couldn't manage to make it arbitrarily close. $$\sin(\tan(x))$$ looks like a sawtooth wave, but it gets nasty as the tangent goes to infinity.

Interestingly, iterating $$\tan(\sin(x))$$ 7 times gets pretty close of the square sine function, but it still doesn't get arbitrarily close to it.

On the other hand, iterating cosine and tangent alone gave uninteresting results.