Prove this version of Banach differential fixed point Let $I$ a closed interval and $f:I\to \mathbb{R}$ a differentiable function such that:


*

*$f(I)\subseteq I$

*Exists $p\in\mathbb{N}$ and $c\in\mathbb{R}$ such that $g=f\circ f \cdots \circ f=f^p$ satisfy $|g'(x)|\leq c< 1$, $\forall x\in I$.


Prove that:
a. Exists a unique $a\in I$ such that $f(a)=a$.
b. For all $x\in I$,$\lim_{n\to \infty} f^n (x)=a$.
 A: First off, we may apply the fixed point theorem to $g$, since $|g'(x)|\leq c<1$ for all $x$ and $g(I)\subset I$, and we obtain that $g^{n}(x)\to a$ for all $x$, for some $a\in I$ with $g(a)=a$. 
Now  fix $x\in I$, take the sequence $\left\{f^{n}(x)\right\}_{n\in \mathbb{N}}$ and write it as a union of a finite amount of subsequences in the following way
$$\left\{f^{n}(x)\right\}_{n\in \mathbb{N}}=\bigcup_{j=0}^{p-1}\left\{f^{np+j}(x)\right\}_{n\in \mathbb{N}}=\bigcup_{j=0}^{p-1}\left\{g^{n}(f^{j}(x))\right\}_{n\in \mathbb{N}} $$
since the sequences $\left\{g^{n}(f^{j}(x))\right\}_{n\in \mathbb{N}}$ all converge to the same number $a$ for $j=0,\dots, p-1$, then the whole sequence $\left\{f^{n}(x)\right\}$ must converge to $a$.
To see that $f(a)=a$, notice that $g(a)=a$ implies that $f^{np}(a)=a$ for all $n\in \mathbb{N}$. Therefore we have $f^{np+j}(a)=f^{j}(f^{np}(a))=f^{j}(a)$ for all $n\in \mathbb{N}$ and $j\in \left\{0,\dots,p-1\right\}$, i.e. the sequence $\left\{f^{n}(a)\right\}$ is periodic with period $p$. On the other hand we know that $\lim_{n\to +\infty}f^n(a)=a$, and so necessarily $f^{n}(a)=a$ for all $n\in \mathbb{N}$. In particular, $f(a)=a$.
Alternatively,  $$g(f(a))=f^{p}(f(a))=f(f^{p}(a))=f(g(a))=f(a)$$
i.e. $f(a)$ is a fixed point for $g$. But $a$ is the unique fixed point for $g$, thus $f(a)=a$.
