Let's say I have some function of $x$ and an unknown integer $d$, given by
$f(x) = x^2 + d^2 + dx$
and I want to see if it's divisible by something like $x-d$;as I understand it, we could apply the polynomial remainder theorem and find the remainder, $r = f(d) = 3d^2$. Now, I believe I can then argue that this is zero if $d=0$, which is obviously true. But I also can see that this isn't sufficient alone; for example, if $x-d=1$, then $x-d$ will divide always.
My question is thus, can I say that $x-d$ is a factor of $f(x)$ only when EITHER $d=0$ or $x-d=1$, or are there another situations I'm missing?