I came across this question on Quora. I'm rephrasing the question in the title.
A sequence of functions $\{f_n(x)\}$ is recursively defined such that $f_{n}(x)=f_{n-1}(n+\sin x)$ and $f_0(x)=\sin(x)$. The question is:
Does $\lim\limits_{n\to\infty}{f_n(x)}$ eventually become a constant function?
I intuitively thought that the answer is NO. This was my line of reasoning:
Whatever be the value of $n$, if we take a derivative of $f_n(x)$, we get another function in terms of $x$. But the derivative of a constant function is supposed to be zero, which is contradiction.
However, to my surprise, when I took to Python terminal to code this sequence, I found that the limit converges somewhere around $0.9941666781206763$ irrespective of the value of $x$ (which indicates it's indeed a constant function).
>>> from sys import setrecursionlimit
>>> setrecursionlimit(10**5)
>>> f = lambda n, x: f(n-1, n+sin(x)) if n>0 else sin(x)
>>> from math import sin
>>> f(1500, 10)
0.9941666781206763
>>> for x in range(0, 100):
... print(f(1800, x))
...
I believe $n=1800$ iterations is fairly high i.e, sufficient for computing $n\to\infty$. Can anyone explain what was wrong with my intuition and/or if there's any bug in my code? I am not sure if the latter part of my query is in the scope of this site.
It is perfectly possible for a sequence of functions to approach a constant (point-wise) without the derivative eventually being close to zero. Take for example $f_n(x)=\sin (nx)/n$. Clearly $f_n(x)\to 0$ for every $x$ but $f_n'(x)=\cos nx$ which takes all the values between $-1$ and $1$.
As for the reason why your sequence approaches a constant, think about the following: every time you apply the $\sin(\cdot)$ function, you are shrinking the range of values to which the next $\sin$ will be applied, consequently shrinking the range again (this is because $|\sin'(x)|=|\cos x|\le 1$) The reason why your function is approaching a constant is that the outermost sine function is effectively acting over a very small range of values, thus becoming a constant in the limit.