For $a \in \mathbb R$, find polynomials $P$ such that $(x^2-ax+18)P(x)-(x^2+3x)P(x-3)=0$ Find all polynomials $P(x)$ with real coefficients such that:-    $(x^2-ax+18)P(x)-(x^2+3x)P(x-3)=0$
This is $a$ creating some big problems for me. I don't know what to do.
I am not able to figure out anything because of that $a$. The best I can figure out is that I will find the roots of $P(x)$ because $a$ is not computable as there is no way of finding out the zeros of $P(x-3)$. If I would have been able to find the roots of $(x^2-ax+18)$ then I would have been able to figure out what to do.
If there would have been no $a$ I would have found of the roots of $P(x)$ like for example $\alpha, \beta$ then I would have written out $P(x)$ in the form of $(x-\alpha)(x-\beta)Q(x)$ for $Q(x)$ being any polynomial. Then I would have tried to calculate the answer.
Any help would be appreciated
 A: At first we have $(x^2-ax+18)P(x)=(x^2+3x)P(x-3)=x(x+3)P(x-3)$. Now since $x \nmid (x^2-ax+18)$, we have $2$ cases:
$(x^2-ax+18)$ divisible by $(x+3)$:
$$(x+3) | (x^2-ax+18) \Rightarrow (x^2-ax+18)=(x+3)(x+6) \Rightarrow$$
$$\Rightarrow (x+6)P(x) = xP(x-3) \Rightarrow$$
$$\Rightarrow \left\{\begin{array}{c} x | P(x) \\ (x+6) | P(x-3) \end{array}\right\}  \Rightarrow \left\{\begin{array}{c} (x-3) | P(x-3) \\ (x+9) | P(x) \end{array}\right\}  \Rightarrow$$
$$\Rightarrow (x+9)Q(x) = (x-3)Q(x-3) \Rightarrow \dots$$
That means $P(x)$ must have infinitely many factor that's not the case!
$(x^2-ax+18)$ not divisible by $(x+3)$:
$$(x+3) \nmid (x^2-ax+18) \Rightarrow \left\{\begin{array}{c} x(x+3) | P(x) \\ (x^2-ax+18) | P(x-3) \end{array}\right\} \Rightarrow$$
$$\Rightarrow \left\{\begin{array}{c} (x-3)x | P(x-3) \\ (x^2+(6-a)x+(27-3a)) | P(x) \end{array}\right\}  \Rightarrow x^2 | P(x) \Rightarrow \dots$$
That means $P(x)$ must have infinitely many $x$ that's not the case!
So there is no $P(x)$ except $P(x)=0$.
A: We have
$$ (x²-ax+18)P(x) = (x²+3x)P(x-3) \ \ \dots  eq.(1)$$
Put $x=-3$,
$$ \rightarrow (27+3a)P(-3) = (9-9)P(-6) $$ $ \ \  \ \ i.e. (27+3a)=0$ $ or $ $ P(-3)=0$

$CASE\ 1:$ If $(27+3a)=0$ $gives \ 
    a=-9$
Then we have: $ from \ \ Equation \ \ \ (1)$ 
$$ P(x)(x+6) \ \ = \ \ xP(x-3)$$
Put $x=0$ $\ \  \rightarrow P(0) \ \ = \ \ 0 $
Put $x=3$ $\ \  \rightarrow P(3) \ \ = \ \ 0 $
Put $x=6$ $\ \  \rightarrow P(6) \ \ = \ \ 0 $
$This\  goes \ on\  and \ on\  till \ infinity,\  implying \ P(x) \ has\ infinite\ roots$ 
$$ \rightarrow P(x) \ \ = \ \ 0$$ 

$CASE\  2:$ If $P(-6)\ \ = \ \ 0$
Put $x=-6$ $\ \  \rightarrow P(-9) \ \ = \ \ 0 $
Put $x=-9$ $\ \  \rightarrow P(-12) \ \ = \ \ 0 $
$$\ \ \ \ \ \ \ \ \    .... \dots$$
Thus both the cases lead to the same conclusion that
$$ P(x) \ \ \ \ = \ \ \ \ 0 $$
A: the function is not a polynomial
$$ (x^2-ax+18)P(x) = (x^2+3x)P(x-3) $$
Put $x=-3$,
$$ (27+3a)P(-3) = (9-9)P(-6) $$ $ (27+3a) \cdot P(-3)=0$, $27+3a=0$, then $a= -9$
$$ (x²-(-9)x+18)P(x) = (x²+3x)P(x-3) $$
$$(x^2+9x+18)P(x) = (x^2+3x)P(x-3) $$
$$(x+3)(x+6)P(x) = x(x+3)P(x-3) $$
$$(x+6)P(x) = xP(x-3)$$
$$(x+6)P'(x)+ xP(x) = xP'(x)+P(x-3)$$
$$(x+6)P'(x)+ xP(x) = xP'(x)+ \frac{(x+6)}{x} P(x)$$
$$6P'(x) = \frac{(x+6)}{x} P(x)-xP(x) $$
$$6P'(x) = ( 1+ \frac{6}{x}-x)P(x) $$
$$ \frac{P'(x)}{P(x)} = \frac{1}{6}+\frac{1}{x}-\frac{x}{6} $$
$$ \int \frac{P'(x)}{P(x)} = \int ( \frac{1}{6}+\frac{1}{x}-\frac{x}{6} ) $$
$$\log(P(x))+c = \frac{x}{6}-\frac{x^2}{12}+\log(x) $$
$$\log(P(x)) = \frac{x}{6}-\frac{x^2}{12}+\log(x)-c $$
$$ P(x) = \exp ( \frac{x}{6}-\frac{x^2}{12}+\log(x)-c ) $$
$$P(x) = x \cdot \exp(  \frac{x}{6}-\frac{x^2}{12}-c) $$
