6. We fix a natural number $k \geq 1$. Find all polynomials $P(x)$ that satisfy

$$
P\left(x^{k}\right)-P(k x)=x^{k} P(x)
$$

for all values of $x \in \mathbb{R}$.
Solution. Let's note that a trivial solution is $P(x)=0$ for any value of $k \geq 1$.

To find other solutions, let's first fix $k=1$. In that case, the equation becomes

$$
P(x)-P(x)=x P(x)
$$

so $P(x)=0$, which is the previous solution.

If $k \geq 2$ and $P(x)$ is a constant $c$, we will have $c-c=x^{k} c$ and, therefore, $c x^{k}=0$, which is impossible unless $c=0$, giving us the trivial polynomial $P(x)=0$ again.

Suppose then that $k \geq 2$ and the degree of the polynomial is $n \geq 1$. It is obvious that $P\left(x^{k}\right)$ will have degree $n k$ and $P(2 x)$ will have degree $n$, so the left-hand side of the equation will be a polynomial of degree $n k$ since $k \geq 1$. The right-hand side will be a polynomial of degree $n+k$, so we will have $n k=n+k$, from which $k(n-1)=n$, and therefore,

$$
k=\frac{n}{n-1}=1+\frac{1}{n-1}
$$

Since $k$ is a natural number, we will necessarily have $n=2$ and, therefore, $k=2$. We write then $P(x)=a x^{2}+b x+c$ and, substituting in the equation, we obtain:

$$
a x^{4}+b x^{2}+c-\left(4 a x^{2}+2 b x+c\right)=a x^{4}+b x^{3}+c x^{2}
$$

and simplifying we obtain $(b-4 a) x^{2}=b x^{3}+c x^{2}$, from which we necessarily obtain that $b=0$ and $c=-4 a$. Thus, the polynomials satisfying the property in the statement will be all those of the form $P(x)=a\left(x^{2}-4\right)$ for all $a \in \mathbb{R}$.

In summary, for all $k \geq 1$, a solution is $P(x)=0$. In the case $k=2$, the polynomials of the form $P(x)=a\left(x^{2}-4\right)$ for any $a \in \mathbb{R}$ are also solutions.