On the limit of $f(n)$, specifically having to do with integration of an iterated $\arctan$ Assume we are given that $A_n(x)$ denotes $n$ iterations of $\arctan(x)$, for example $A_2(x)=\arctan (\arctan(x))$
If $$f(n)=\int_{0}^n A_n(x)\space \text{d}x$$
I am looking for a rigorous proof that $\lim_{n\to\infty}f(n)$ diverges
I have worked on this problem for a while actually, and all I have gotten was a proof that $\forall x\in\Bbb{R},\lim_{x\to\infty}A_n(x)=0$
Beyond that information though, I am stuck. Thanks for any help.

Step 1. Applying the mean value theorem to the function $x \mapsto x - \arctan x$, for some $\xi \in [0, A_{k-1}]$ we have
$$ A_{k-1} - A_k
= (A_{k-1} - \arctan A_{k-1})
= A_{k-1} \cdot \frac{\xi^2}{1 + \xi^2}
\leq \frac{A_{k-1}^3}{1 + A_{k-1}^2}.$$
This shows that
$$ A_{k-1} - A_k \leq A_{k-1}^3 \qquad \text{and} \qquad \frac{A_{k-1}}{1+A_{k-1}^2} \leq A_k \leq A_{k-1}. \tag{*} $$
Step 2. From $\text{(*)}$, for $n \geq 2$ we have
\begin{align*}
\frac{1}{A_n^2}
&= \frac{1}{A_1^2} + \sum_{k=2}^{n} \left( \frac{1}{A_k^2} - \frac{1}{A_{k-1}^2} \right) \\
&= \frac{1}{A_1^2} + \sum_{k=2}^{n} \frac{(A_{k-1} + A_k)(A_{k-1} - A_k)}{A_k^2 A_{k-1}^2} \\
&\leq \frac{1}{A_1^2} + \sum_{k=2}^{n} \frac{(1+A_{k-1}^2)^2}{A_{k-1}^2} \frac{(2A_{k-1})(A_{k-1}^3)}{A_{k-1}^2} \\
&= \frac{1}{A_1^2} + \sum_{k=2}^{n} 2(1+A_{k-1}^2)^2 \\
&\leq \frac{1}{A_1^2} + Cn
\end{align*}
for some absolute constant $C > 0$, where the last inequality follows from the fact that $A_i \leq \pi/2$ for $i \geq 1$. (Here, we may choose $C = 2(1+\frac{1}{4}\pi^2)^2$ though this particular value is not important.) This shows that
$$ \frac{\arctan x}{\sqrt{1 + Cn\arctan^2 x}} \leq A_n (x) $$
and in particular,
$$ A_n(x) \geq \frac{c}{\sqrt{1+C'n}} \quad \text{for } x \geq 1 $$
for some absolute constant $c, C > 0$. (Here, we may choose $c = \arctan 1$ and $C' = \frac{1}{2}\pi C$.) This gives
$$ \int_{0}^{n} A_n(x) \, dx \geq \int_{1}^{n} \frac{c}{\sqrt{1+C'n}} \, dx = \frac{c(n-1)}{\sqrt{1+C'n}}. $$
Therefore, as $n \to \infty$, the integral diverges to infinity.
