# Finding polynomial $f(x)$ from $f(1)$ and $f(f(1))$

Let $f(x)=a_0+a_1x+a_2x^2+\dots+a_nx^n$, where $a_i\ge0$

Given f(1)=p and f(f(1))=q, we have to find $a_0$, $a_1$, $a_2$, $a_3$, $\dots$, $a_n$, where such $f(x)$ exists. Or we have to confirm if such f(x) exists or if the polynomial is ambiguous e.g. for $p=1$ and $q=2$, no such $f(x)$ exists but for $p=1$ and $q=1$, $f(x)=1$, $f(x)=x^2$ both can be solution.

What should be my procedure?

• Here is a similar problem. (You can try to guess the answer, but if you give up, there are solutions) – Akiva Weinberger Jul 5 '15 at 11:56

$f(f(1))=f(p)=q=a_0+a_1p+a_2p^2+...+a_np^n\\p=a_0+a_1+a_2+..a_n$
$\bullet$ if $a_0=a_1=...a_n=1\\q=1+p+p^2+...+p^n=\frac{1-p^{n+1}}{1-p},p=n+1\\q=\dfrac{(n+1)^{n+1}-1}{n}\implies f(x)=1+x+x^2+...+x^n$
$\bullet$ if $a_0=a_1=...a_n=a\\q=a+ap+ap^2+...+ap^n=a\frac{1-p^{n+1}}{1-p},p=a+1\\q=\dfrac{(a+1)^{n+1}-1}{a}\implies f(x)=a+ax+ax^2+...+ax^n,a\ge0$
• we have found $p,q$ and coefficiens for wich this function exists although more distinct constants are possible ...we have not considered such coefficients...we have looked at trivial cases – Jonas Kgomo Oct 5 '13 at 17:57