# Logically Predicting $f^7(x)$ based on $f(x)$

Say $$f(x)=\dfrac{3x+1}{2}$$

$$f(f(x))=f^2(x)= \dfrac{3(\frac{3x+1}{2})+1}{2} = \dfrac{9x+5}{4}$$

$$f(f(f(x)))=f^3(x)= \dfrac{27x+19}{8}$$

I want to predict $$f^7(x)$$ without manually calculating $$f^4(x)$$,$$f^5(x)$$,$$f^6(x)$$

I clearly can see that $$f^n(x)= \dfrac{3^n+something}{2^n}$$

How do I find that $$something$$?

• Note: check my edit to your post; you don't need so many dollar signs, just at the start of, and end of, an entire mathematical expression. – Namaste Dec 2 '18 at 20:37
• thank @amWhy . That will save me lot of time :) – Rahul Shah Dec 2 '18 at 20:38
• there is a typo because actually $f^2(x)=\frac{9x+5}{4}$ – René Gy Dec 2 '18 at 20:42
• extremely sorry, corrected.thanks – Rahul Shah Dec 2 '18 at 20:43

## 4 Answers

Hint: $$f^n(x) = \frac{3^nx+something}{2^n}$$

Do you notice any pattern for $$2^n+something$$? Notice that you get

$$f(x) = \frac{3x+1}{2} \implies 1+2 = ?$$

$$f^2(x) = \frac{9x+5}{4} \implies 5+4 = ?$$

Hint.

$$f(x) = \frac{a x+1}{b}\\ f^2(x) = \frac{a^2x + \frac{a^2-b^2}{a-b}}{b^2}\\ \vdots\\ f^n(x) = \frac{a^nx + \frac{a^n-b^n}{a-b}}{b^n}$$

We guess that $$f_n(x)={3^n\cdot x+3^n-2^n\over 2^n}$$to prove that using induction we have $$f_{n+1}(x)={f(f_n(x))}={3f_n(x)+1\over 2}={3^{n+1}\cdot x+3^{n+1}-3\cdot 2^n+2^n\over 2^{n+1} }={3^{n+1}x+3^{n+1}-2^{n+1}\over 2^{n+1}}$$since $$f_1(x)={3x+1\over 2}$$ the proof is complete.

Let's solve $$f(x)=x$$: $$\frac{3x+1}{2}=x$$ $$3x+1=2x$$ $$x=-1$$ So $$f(-1)=-1$$ This means that $$f^2(-1)=f(f(-1))=f(-1)=-1$$ and so on. So based on your conjecture: $$f^n(x)=\frac{3^nx+c(n)}{2^n}$$ Implies that $$\frac{-3^n+c(n)}{2^n}=-1$$ $$-3^n+c(n)=-2^n$$ $$c(n)=3^n-2^n$$ So $$f^n(x)=\frac{3^nx+(3^n-2^n)}{2^n}$$ And why is your conjecture true? Because $$f(x)=\frac{3}{2}x+c_1$$ $$f^2(x)=\frac{3}{2}\left(\frac{3}{2}x+c_1\right)+c_1=\frac{3^2}{2^2}x+c_2$$ $$f^3(x)=\frac{3}{2}\left(\frac{3^2}{2^2}x+c_2\right)+c_1=\frac{3^3}{2^3}x+c_3$$ and so on.