Proof that a certain derivation is well defined I have spent several hours on this, apparently straightforward issue. This is with reference to page 17 in the following notes
http://www.math.lsa.umich.edu/~hochster/615W10/615.pdf
Suppose, $R$ is a commutative ring, $W$ a multiplicatively closed subset in $R$, $M$ an $R$-module. If $D:R\to M$ is a derivation, then $W^{-1}D: W^{-1}R\to W^{-1}M$ is a derivation where $W^{-1}D$ acts on $\frac{r}{w}$ by the quotient rule, i.e. maps $\frac{r}{w}$ to $\frac{wD(r)-rD(w)}{w^2}$.
I have tried several manipulations, but I am unable to show that this map is well defined. I would appreciate if anyone can help me see what I am missing here.
Thanks.
 A: First observe that if some $s$ kills $r$, i.e. $sr=0$, then $s^2$ kills $Dr$.  Indeed, $$s^2Dr=s(sDr)=s(D(sr)-rDs)=-srDs=0.$$
Now lets assume $r/w=r'/w'$, and that $s\in W$ kills $rw'-r'w$.  I claim that $s^2$ kills $$w'^2(rDw-wDr)-w^2(r'Dw'-w'Dr').$$
We have some calculation:$$w'^2(rDw-wDr)-w^2(r'Dw'-w'Dr')$$
$$=w'^2rDw-w'^2wDr-w^2r'Dw'+w^2w'Dr'$$
$$=w'rD(ww')-ww'D(rw')-wr'D(ww')+ww'D(wr')$$
$$=(rw'-r'w)D(ww')-ww'D(rw'-r'w).$$
Since $s^2$ kills both $rw'-r'w$ and $D(rw'-r'w)$, we are done.
A: $\rm\displaystyle\ \frac{r}w \equiv 0\:\ \Rightarrow\:\ s\:r = 0\ \Rightarrow\ s^2 \bigg(\!\!\!\frac{r}w\!\!\bigg)' =\ \frac{s\ ((s\:r)'-s'r)}{w}\: -\:\frac{s^2\:r\:w'}{w^2} =\: 0\:\ \Rightarrow\:\ \bigg(\!\!\!\frac{r}w\!\!\bigg)'\!\equiv\: 0$
Note $\ $ This proof essentially inlines the lemma that $\rm\:(sr/(sw))' = (r/w)'.$ You may find it more conceptual to proceed indirectly using that lemma (which is how I found the above direct proof).
A: [New version. I hadn't noticed the fact that the derivation was module-valued. Sorry. (July 31, 2011, GMT)] 
Let $D:R\to M$ be a derivation and $W\subset R$ a multiplicative system. Claim: there is a unique derivation $W^{-1}D:W^{-1}R\to W^{-1}M$ satisfying 
$$(W^{-1}D)\left(\frac{a}{s}\right)=\frac{sD(a)-aD(s)}{s^2}$$ for all $a$ in $R$ and $s$ in $W$. 
The uniqueness is clear. Let's prove the existence. 
Recall that the relation $\sim$ defined on $R\times W$ by $(a,s)\sim(b,t)$ iff $atu=bsu$ for some $u$ in $W$ is an equivalence relation, and that $W^{-1}R$ is defined as the quotient. 
Define the relation $\heartsuit$ on $R\times W$ by $(a,s)\heartsuit(b,t)$ iff $b=au$ and $t=su$ for some $u$ in $W$. Then $\sim$ is the equivalence relation generated by $\heartsuit$. 
Define $d:R\times W\to W^{-1}M$ by 
$$d(a,s)=\frac{sD(a)-aD(s)}{s^2}\quad.$$ One checks that $(a,s)\heartsuit(b,t)$ implies $(W^{-1}D)(a,s)=(W^{-1}D)(b,t)$. Thus $d$ induces a map $W^{-1}D:W^{-1}R\to W^{-1}M$, which is easily seen to be a derivation. 
