TITLE: Appearance of Formal Derivative in Algebra
QUESTION [50 upvotes]: When studying polynomials, I know it is useful to introduce the concept of a formal derivative. For example, over a field, a polynomial has no repeated roots iff it and its formal derivative are coprime. My question is, should we be surprised to see the formal derivative here? 
Is there some way we can make sense of the appearance of the derivative (which to me is an analytic object) in algebra? I suspect it might have something to do with the fact that the derivative is linear and satisfies the product rule, which makes it a useful object to consider. It would also be interesting to hear an explanation which explains this in the context of algebraic geometry.
Thanks!

REPLY [2 votes]: Formal derivatives appear naturally when trying to rewrite a polynomial in $ x $ ( over a characteristic $ 0 $ field ) as a polynomial in $ (x-c) $ :
Let $ f(x) = a_n x^n + \ldots + a_1 x + a_0 \in K[x] $ ( with $ a_n \neq 0 $ ). Given any $ c \in K $, we can expand $ f(x) $ as a polynomial in $ (x-c) $ to get
$ \displaystyle f(x) = \sum_{j=0}^{n} a_j x^j = \sum_{j=0}^{n} a_j (x-c+c)^j $ $ \displaystyle = \sum_{j=0}^{n} a_j \bigg( \sum_{r = 0}^{j} \binom{j}{r} (x-c)^{r} c^{j-r} \bigg) $ $ \displaystyle = \sum_{0 \leq r \leq j \leq n} (x-c)^{r} a_j \binom{j}{r}c^{j-r} $ $ \displaystyle = \sum_{r=0}^{n} (x-c)^{r} \bigg( \sum_{j=r}^{n} a_j \binom{j}{r}c^{j-r} \bigg) $
$ \big[ $ Here "$ \binom{j}{r} $" should be understood as $ 1 + \ldots + 1 $ with $ \frac{j(j-1)..(j-(r-1))}{r!} $ many $ 1$s $ \big] $
Now assuming $ \text{char}(K) = 0 $ we can write $ \binom{j}{r} = (r!)^{-1} ( j(j-1)..(j-r+1) )$ [ where again each term "$ n $" should be understood as $ 1 + \ldots + 1 $ with $n$ many $1$s ], giving us
$ f(x) \displaystyle = \sum_{r=0}^{n} \frac{(x-c)^{r}}{r!} \bigg( \sum_{j=r}^{n} a_j \: j(j-1)\ldots(j-(r-1)) \: c^{j-r} \bigg) $.
But $ \displaystyle \sum_{j=r}^{n} a_j \: j(j-1)\ldots(j-(r-1)) \: c^{j-r} $ is just $ (D^{r} f)(c) $, where $ D : K[x] \rightarrow K[x] $ is a map sending $ c_0 + c_1 x + c_2 x^2 + \ldots + c_n x^n $ $ \mapsto c_1 + 2 c_2 x + \ldots + n c_n x^{n-1} $.
To summarise : Let $ f(x) = a_0 + \ldots + a_n x^n \in K[x] $, $ c \in K $, and $ \text{char}(K) = 0 $. Then $ f(x) = f(c) + (Df)(c) \: (x-c) $ $ + \frac{(D^2 f)(c)}{2!} \: (x-c)^2 + \ldots + \frac{(D^n f)(c)}{n!} \: (x-c)^n $, where $ D : K[x] \rightarrow K[x] $ sends $ c_0 + c_1 x + \ldots + c_n x^n $ $ \mapsto c_1 + 2 c_2 x + \ldots + n c_n x^{n-1} $ [ especially if $ \alpha \in K $ is a root of $ f $, it's multiplicity is the least $ j $ for which $ (D^j f)( \alpha ) \neq 0 $ ].

Edit: [This should work in general characteristic]
For every $f \in K[x]$ there is a unique $\psi _f \in K[x,y]$ such that $f(y) - f(x) = (y-x) \psi _f (x,y).$

Explicitly, taking $f(x) = \sum _{0} ^{n} a _i x ^i,$ we get $f(y) - f(x)$ ${= \sum _{0} ^{n} a _i (y ^i - x ^i)}$ ${= (y-x) \left( \sum _{1} ^{n} a _i (y ^{i-1} + y ^{i-2} x + \ldots + x ^{i-2} y + x ^{i-1}) \right).}$

Now $K[x] \longrightarrow K[x,y]$ sending $f(x) \mapsto \psi _f (x,y)$ is linear.

$f(y) - f(x) = (y-x) \psi _f,$ and $g(y) - g(x) = (y-x) \psi _g.$ Taking ${\alpha \cdot (\text{eq}1) + \beta \cdot (\text{eq}2)}$ gives $\psi _{\alpha f + \beta g} = \alpha \psi _f + \beta \psi _g.$

Also $\psi _{fg} = \psi _f g + f \psi _g + (y-x) \psi _f \psi _g$.

$(fg)(y)$ ${= (f(x) + (y-x) \psi _f)(g(x) + (y-x) \psi _g)}$ ${ = (fg)(x) + (y-x)(\psi _f  g+ f \psi _g + (y-x) \psi _f \psi _g)}$

So the map $K[x] \overset{D}{\longrightarrow} K[x]$ sending $f(x) \mapsto \psi _f (x,x)$ is linear, with "Leibnitz rule" $D(fg) = (Df)g + f(Dg).$ From the expression for $\psi _f$ we get the explicit description $D\left( \sum a _i x ^i \right) = \left(\sum i a _{i} x ^{i-1} \right).$