Very recently I have been tasked with ploting a derivative using Python and matplotlib. This is my code:
x=np.linspace(-100,100,num=50)
funcion=(56*(x**3))-(38.999*(x**2))+(4.196*x-0.15)
plt.plot(x, funcion)
The resulting plot is this: Plot generated in Python
At first sight, the graph looks okay, but is not correct, given that the graph is suposed to look like this: Correct plot
How can I fix this? I have tried changing the linespace a bunch of times, and the results are the same.
I've tried to plot a derivate in matplotlib and the graph is incorrect.