title: Why does sympy.diff not differentiate sympy polynomials as expected?
body: <p>I am trying to figure out why <code>sympy.diff</code> does not differentiate <code>sympy</code> polynomials as expected. Normally, <code>sympy.diff</code> works just fine if a symbolic variable is defined and the polynomial is NOT defined using <code>sympy.Poly</code>.  However, if the function is defined using <code>sympy.Poly</code>, <code>sympy.diff</code> does not seem to actually compute the derivative.  Below is a code sample that shows what I mean:</p>
  
  <pre><code>import sympy as sy
  
  # define symbolic variables
  x = sy.Symbol('x')
  y = sy.Symbol('y')
  
  # define function WITHOUT using sy.Poly
  f1 = x + 1
  # define function WITH using sy.Poly
  f2 = sy.Poly(x + 1, x, domain='QQ')
  
  # compute derivatives and return results
  df1 = sy.diff(f1,x)
  df2 = sy.diff(f2,x)
  print('f1:  ',f1)
  print('f2:  ',f2)
  print('df1:  ',df1)
  print('df2:  ',df2)
  </code></pre>
  
  <p>This prints the following results:</p>
  
  <pre><code>f1:   x + 1
  f2:   Poly(x + 1, x, domain='QQ')
  df1:   1
  df2:   Derivative(Poly(x + 1, x, domain='QQ'), x)
  </code></pre>
  
  <p>Why does <code>sympy.diff</code> not know how to differentiate the <code>sympy.Poly</code> version of the polynomial?  Is there a way to differentiate the <code>sympy</code> polynomial, or a way to convert the <code>sympy</code> polynomial to the form that allows it to be differentiated?</p>
  
  <p><strong>Note</strong>: I tried with different domains (i.e., <code>domain='RR'</code> instead of <code>domain='QQ'</code>), and the output does not change.</p>