So I'd like to write a function like this using factorials:
f(x) = (x-1)(x-2)
so that when I plug in x = 2 I get f(x) = 0.
I tried this:
f(x) = (x-1)!/(x-3)! which as I understand evaulates to (x-1)(x-2).
But plugging in x = 2 to that equation gives 1!/(-1!) which doesn't exist really.
What's the issue here? Is it with the conversion from f(x) = (x-1)!/(x-3)! to (x-1)(x-2)?
What I'd really like to do in the big picture is write a series that will put out (x-1) for the first term, (x-1)(x-2) for the second term, (x-1)(x-2)(x-3) for the third, and so on. Is there another way to accomplish this?
The problem is that (at least originally speaking), the factorial is only defined for nonnegative integers - so the manipulation you've used is only valid if $x \in \{3, 4, \dots\}$. One can regard the Gamma function as an extension of the factorial function to real (or even complex) values, and this computation can be formalized (using the fact that $\Gamma(z) = (z - 1)!$) as
$$\frac{\Gamma(z)}{\Gamma(z - 2)}$$
Now the fact that $\Gamma(z - 2)$ has poles at $z = 1$ and $z = 2$ is why we have zeros at $1$ and $2$ in the factored expression.
As a remark, note that the poles of $\Gamma(z)$ at the negative integers will offset the poles of $\Gamma(z - 2)$ except at the particular points $z = 1, 2$. So by analytic continuation, we really can regard the expressions as equal for all complex numbers, by suitable definition at the poles of $\Gamma(z - 2)$.