<s>[INST] Finding original function from composition of function If $f(f(x)) = x^2 + 2$, then find $f(11)$? Given that if $a>b$ then $f(a)>f(b)$
I got this question from a study group of which I am part of.
There the question was described as Let $x,f(x),a,b$ be positive integers and if $a>b$ then $f(a)>f(b)$ and $f(f(x)) = x^2 + 2$ then what is $f(11)$?
I tried by substituting $x= 1$ and $3$ and got $f(f(1)) = 3$ and $f(f(3))=11$ but don't know how to proceed further.
 [/INST] So the function has to be defined for positive integers. Then, we must have $f(x)>x$, because $f(x)<x$ would imply $f(f(x)<f(x)<x$, but $x^2+2>x$, and $f(x)=x$ is equally impossible. Replacing $x$ by $f(x)$ shows that $f(f(f(x))=f(x)^2+2=f(x^2+2)$. Since $x<f(x)<f(f(x))=x^2+2$, we must have $1<f(1)<1^2+2=3$, i.e. $f(1)=2$. Then, $f(2)=f(f(1))=1^2+2=3$, $f(3)=f(f(2))=2^2+2=6$ and $f(11)=f(3^2+2)=f(3)^2+2=38$.
</s>