Consider given the equation,
y=−x3+x
Differentiate with respect to x both sides,
ddxy=ddx(−x3+x)
dydx=−3x2+1