# Find the polynomial $p(x)$ such that $p(p(x)) = xp(x)+x^2$

Find the polynomial $$p(x)$$ such that $$p(p(x)) = xp(x)+x^2$$.

First, we let $$p(x) = a_0 x^n + a_1 x^{n - 1} + a_2 x^{n - 2} + \cdots + a_n x^0$$. Then, on the left side of the given equation we get the term $$a_0^2 x^{n^2} + a_n$$ and some other terms that aren't so important. Because the right side is divisible by $$x$$, the left side must also be divisible by $$x$$. Because all terms in $$p(p(x))$$ except for $$a_n$$ are divisible by $$x$$, we know that $$a_n$$ must be $$0$$. That is, $$p(x)$$ has no constant term.

Next, we look at the degree of $$p(x)$$. We get that $$n^2 = \max(n + 1, 2)$$. None of these choices give integer solutions.

However, the degree of $$xp(x) + x^2$$ can also be less than $$\max(n + 1, 2)$$. One example is $$p(x) = -x$$. So, we need the degree of $$p(p(x))$$ to be less than $$\max(n + 1, 2)$$. If $$p(p(x)) = n^2$$ is less than $$n + 1$$, then $$n^2 - n - 1 < 0$$. So, $$\frac{1 - \sqrt{5}}{2} < n < \frac{1 + \sqrt{5}}{2}$$. This means that $$n$$ can only be $$1$$ or $$0$$.

If $$n = 0$$, then the left hand side is a constant, while the right hand side is a quadratic. This cannot satisfy the problem statement, so we move on to the next case.

If $$n = 1$$, then $$p(x)$$ must be in the form $$kx$$ for some constant $$k$$ because $$p(x)$$ has no constant term. Plugging $$p(x) = kx$$ into the given equation, $$k^2x = kx^2 + x^2$$. Cancelling $$x$$ out gives $$k^2 = (k + 1)x$$. Because the left hand side is a constant, the right hand side must also be a constant. So, $$k + 1 = 0$$ and $$k = -1$$. However, this means that $$1 = 0$$ which is obviously false.

I conclude that there are no solutions, but the problem says that there has to be exactly one solution.

• There is a degree one polynomial satisfying the identity, $p(x)=1-x.$ Commented Jun 11, 2023 at 14:51
• You made a mistake with the constant term of $p$. You wrote "because $p(x)$ has no constant term". This is false. Commented Jun 11, 2023 at 14:54
• Why is the first part wrong where it showed that it has no constant term? Commented Jun 11, 2023 at 14:58
• $\deg(p+q)\le\max\{\deg p,\,\deg q\}$; you can't in general change the $\le$ to $=$ as the leading terms of $p,\,q$ may cancel if $\deg p=\deg q$.
– J.G.
Commented Jun 11, 2023 at 15:22
• What you have given is mostly Correct , except that you (wrongly) assumed $kx+0$ , where you should check whether $kx+c$ gives a Solution. (A) It may eventually imply $c=0$ , then you have shown that your unproven assumption was right. (B) It may instead give you the Solution !!
– Prem
Commented Jun 11, 2023 at 15:32

If $$n = 1$$, then $$p(x)$$ must be in the form $$kx$$ for some constant $$k$$ because $$p(x)$$ has no constant term.

It is not sufficient to claim this. It is true that the RHS $$xp(x)+x^2$$ has no constant term. But for LHS, if we take the general form $$p(x)=kx+b$$, we get

$$p(p(x))=k(kx+b)+b=k^2x+kb+b$$

So it is still possible for LHS has no constant term. For example, if $$kb+b=0$$, equivalently, either $$b=0$$ or $$k=-1$$. What you have done is to exclude $$b=0$$. But it is still possible for $$k=-1\land b\neq 0$$. You still need to discuss this case and get the final conclusion.

Find a polynomial $$p(x)$$ which satisfies $$p^2(x)=xp(x)+x^2.$$

\begin{align} & \text{let } \deg(p)=n. \\ \Rightarrow \; & \deg(LHS)=n^2, \deg(RHS)\leq\max\{n+1, 2\}. \\ \therefore\; & n^2\leq\max\{n+1, 2\}. \\ \Rightarrow \; & n^2 \leq 2 \text{ or } n^2\leq n+1. \\ \Rightarrow \; & n \leq 1. \\ \ \\ \text{Case 1. } & n=1: \\ & \text{let } p(x)=ax+b. \\ \Rightarrow \; & a(ax+b)+b=x(ax+b)+x^2. \\ \therefore \; & (-a-1)x^2+(a^2-b)x+b(a+1)=0. \\ \Rightarrow\; & a=-1, b=1 \Rightarrow p(x)=1-x. \\ \ \\ \text{Case 2. } & n=0: \\ & c=cx+x^2, \text{Contradiction.} \\ \ \\ \therefore \; & \boxed{p(x)=1-x \text{ is the only solution.}} \end{align}

If $$\deg p=1$$ then $$\deg (p\circ p)=1.$$ Thus $$p$$ must be of the form $$p(x)=a-x$$ in order to eliminate $$x^2$$ on RHS. Then we get $$p(p(x))=x$$ and $$xp(x)+x^2 =ax.$$ Hence $$a=1.$$ Thus $$p(x)=1-x$$ is the only solution, mentioned in the first comment to OP.