title: How is it possible to define a equation, differentiate and plot it, using Sympy in Jupyter Nootebook?
body: <p>In Jupyter Notebook i would like to define a equation, differentiate and plot the equation.</p>
  <pre><code>import sympy as sp
  from IPython.display import display
  sp.init_printing()
  import matplotlib.pyplot as plt
  import numpy as np
  
  x = sp.symbols('x')
  
  def func(x):
      a= sp.sympify(&quot;4/5&quot;)
      return (x**3+a*x**2)
  display(func(x))
  
  def dfunc(x):
      a = sp.diff(func(x),x)
      return a
  display(dfunc(x))
  
  
  x = np.linspace(-10,10,20)
  
  
  plt.plot(x,func(x))
  plt.plot(x,dfunc(x))      # doesn't work
  </code></pre>
  <p><code>display(dfunc(x))</code> shows the wanted function but <code>plt.plot(x,dfunc(x))</code> returns the error message <code>ValueError: cannot derive by this array</code></p>
  <p>Does anyone know how to get the plot?</p>
  <p>(It also doesn't work with <code>sp.integrate(func(x),x)</code> instead of <code>sp.diff(func(x),x)</code>. Just another error message is returned <code>ValueError: Invalid limits given: ...</code>)</p>
  <p>Many thanks in advance.</p>
  <p>Matthias</p>