title: Derivative in function
body: <p>I'd like to write a Mathematica function that takes an expression as argument, takes the derivative of that expression, and then does something to the expression. So (as a toy example) I'd like to write</p>
  
  <pre><code>F[f_] = D[f, x] * 2
  </code></pre>
  
  <p>so that</p>
  
  <pre><code>F[x^2] = 4x
  </code></pre>
  
  <p>Instead, I get</p>
  
  <pre><code>F[x^2] = 0
  </code></pre>
  
  <p>Can someone point me to the relevant docs? I spent some time poking around the Mathematica reference, but didn't find anything helpful.</p>