While working on composition of functions with itself that I have noticed a periodic behavior for f(x).
$$f(x)=x^2-1$$ $$f(0)=-1$$
$$f(f(x))=f^2(x)=(x^2-1)^2-1=x^4-2x^2=x^2(x^2-2)$$
$$f^2(0)=0$$
$$f(f(f(x)))=f^3(x)=(x^2-1)^2((x^2-1)^2-2)=(x^2-1)^2(x^4-2x^2-1)$$
$$f^3(0)=-1$$
$$f(f(f(f(x))))=f^4(x)=x^4(x^2-2)^2[(x^2-1)^4-2(x^2-1)^2-1]$$
$$f^4(0)=0$$
I calculated that $f^5(0)=-1$
I could not proceed more because it became very complex.
I suggest that
If n is odd then $f^n(0)=-1$
If n is even then $f^n(0)=0$
Can you please help me how I can prove it or disprove the statement above?
Thanks
EDIT:
I have used induction as Stefan mentioned in his answer as hint
I proved the statement
Proof:
$$f^{n+2}(x)=f^{n}(f^{2}(x))$$
$$f^{n+2}(x)=f^{n}(x^2(x^2-2))$$
We got for $x=0$
$$f^{n+2}(0)=f^{n}(0)$$
We know $$f(0)=-1$$
$$f^{3}(0)=f(0)=-1$$
$$f^{5}(0)=f^3(0)=-1$$
Thus If n is odd then $f^n(0)=-1$
We know $$f^2(0)=0$$
$$f^{4}(0)=f^2(0)=0$$
$$f^{6}(0)=f^4(0)=0$$
Thus If n is even then $f^n(0)=0$
Thanks to Stefan for hint
Hint: Use induction in $n$. $ $