5
$\begingroup$

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.

$\endgroup$

2 Answers 2

6
$\begingroup$

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.

$\endgroup$
3
$\begingroup$

As the first answer points out, it is feasible that $f_n$ approaches a constant even if $f_n'$ does not approach zero. Honestly, though, I think that rather misses the point since, in this particular situation, it's not to hard to show that $f_n' \to 0$ for most $x$. Indeed, we can apply the recursive definition

$$f_{n}(x)=f_{n-1}(n+\sin(x))$$

to obtain

$$ f_n'(x) = \frac{d}{dx} f_{n-1}(n+\sin(x)) = f_{n-1}'(n+\sin(x))\cos(x). $$

From there, we see that a uniform bound on $f_{n-1}'$ implies a better uniform bound $f_n'$. In particular, $f_n'$ converges to zero uniformly on any closed interval contained in the open interval $0<x<\pi$. That, combined with a standard result in real analysis implies that, if $f_n(x)$ converges for some $x$ in one of those closed intervals, then it must converge for all $x$ in those intervals. But it's easy to see that $f_n'(\pi/2)=0$ for all $n$, since $f_n$ is symmetric about $x=\pi/2$. Thus, we certainly have that $f_n$ converges to a constant function on $$ \{x:0 < x < \pi\}. $$ Symmetry and periodicity then dictates that $f_n$ converges to that same constant on $\mathbb R$, with the possible exceptions of the integer multiples of $\pi$.

Numerical experimentation certainly suggests that $f_n'(0) \to 0$. I don't quite see the proof of that right now, though it's not too hard to show that zero is definitely a cluster point.

$\endgroup$
1
  • 2
    $\begingroup$ You are absolutely right. I made the point because the OP seems to believe that the derivative not stabilizing to zero is a reason to conclude that the limit is not a constant. $\endgroup$
    – GReyes
    Apr 20, 2023 at 0:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .