$f(x)$ and $g(x)$ are linear functions such that $\forall x$, $f(g(x))$ and $g(f(x))$ are identity functions. If $f(0)=4$ and $g(5)=17$, compute $f(2006)$
My attempt is as follows:-
If $f(g(x))$ is the identity function then $g(x)$ needs to be identity function because otherwise if $g(x)$ is not defined for any $x$, then $f(g(x))$ will also not be defined for that $x$.
Same logic goes with $g(f(x))$, hence $f(x)$ and $g(x)$ are identity functions.
Let $f(x)=ax+b, g(x)=cx+d$
$$f(0)=4$$ $$b=4$$
$$g(5)=17$$ $$5c+d=17\tag{1}$$
$$f(g(x))=f(cx+d)$$ $$f(g(x))=a(cx+d)+b$$ $$f(g(x))=acx+ad+b\tag{2}$$
$$g(f(x))=g(ax+b)$$ $$g(f(x))=c(ax+b)+d$$ $$g(f(x))=acx+bc+d\tag{3}$$
Putting $x=5$ in equation $(2)$
$$f(g(5))=5ac+ad+4$$ $$f(17)=5ac+ad+4\tag{4}$$
Putting $x=0$ in the equation $(3)$ $$g(f(0))=4c+d$$ $$g(4)=17-c$$
I am stuck here, not getting any clue. Please help me in this.
$$f(x)=ax+b \qquad g = f^{-1}$$
If $f(x)=y$ then $g(y)=g(f(x)) = x$. Hence $g$ is the (left) inverse of $f$. Similarly, if $g(x)=y$, then f(y)= f(g(x)) = x$.
\begin{align} f(0) &= 4 \\ b &= 4 \\ \hline g(5) &= 17 \\ f(17) &= 5 \\ 17a + 4 &= 5 \\ a &= \dfrac{1}{17} \\ \hline f(x) &= \dfrac{1}{17}x + 4 \\ f(2006) &= \dfrac{2006}{17} + 4 \\ f(2006) &= 122 \end{align}