What is the relation between the slope of a function and the derivative of that function? I was introduced to the idea of derivatives, which is basically the the concept of rise and run, the increase in value of the function in y axis over the increase of value on x axis. But it's the same for slopes as well right? So can I say that the derivative of a function at a point is basically the slope of the function itself?
Relation between slope of a function and its derivative
derivatives
Related Solutions
Judging from the captions of the pictures, I think we should still talk about real derivatives for a bit.
Brief answer
Neither of functions depicted in your graphs are going to be differentiable at the discontinuities depicted. After you fill in a removable discontinuity of a function like the one on the left, it could be either differentiable or nondifferentiable at the point. Jump discontinuities of functions on the real line are always nondifferentiable, but they might have one-sided derivatives that are well-defined.
Longer anwer
First of all, remember that the derivative at a point is, intuitively, a "limit of slopes as calculated from the left and from the right." From the left you take a limit of $\frac{f(x)-f(x-h)}{h}$ over very small positive values of $h$, and on the right the same happens with $\frac{f(x+h)-f(x)}{h}$. (It can be the case that both of these can be defined, but they don't match and in that case, the derivative isn't defined at that point.)
Notice also that it is critical for $f(x)$ to be defined to carry out these computations, and so you won't get anywhere at all without settling on a value for $f(x)$. If you insist that there's no value for $f(x)$, then the slope is formally undefined. If you are willing to fill in removable discontinuities, though, you can proceed. The derivative may or may not exist after the point is filled in (consider $f(x)=|x|$ with the $x=0$ point removed/replaced.)
That leaves the case of the jump discontinuity, which you've depicted in the right hand picture. Jump discontinuities always make one of the slope limits on the right or on the left jump to infinity. Here's what I mean. Suppose $f(x)$ is anywhere exept filling in the lower circle in your right hand picture. Then as you shrink $h$ in $\frac{f(x+h)-f(x)}{h}$, the associated picture is that of a line which always lies on $(x,f(x))$ and $(x+h,f(x+h)$, which lies on the branch on the right. You see as $h$ shrinks, $x+h$ approaches $x$ from the right. Since $f(x)$ is not on that lower empty circle, this line tips ever more steeply as $h$ shrinks. Thus its slope goes to either $+\infty$ or $-\infty$, and the slope there is undefined.
If $f(x)$ happened to land on that empty lower right circle, then you are guaranteed it wouldn't land on the upper left circle, so you would then deduce that the slope estimate from the left would go off to infinity, and the derivative at the point would again not exist.
There are a few hints you can use, some are general and some are specific to polynomials (or other functions whose derivative is known).
1) When a function has a min, max, or saddle, its derivative will have a root.
2) When a function has an inflection point, its second derivative will have a root, so its derivative will have a min, max, or saddle.
3) The derivative of a cubic polynomial is a quadratic polynomial.
4) The derivative of a positive polynomial is positive, and similarly with negatives.
Using these four tips, we can tell that the derivative must be a positive quadratic polynomial with roots at 0 and 2, and a min at 1.
To determine the value at the minimum, we can estimate the slope at the inflection point. To do this, draw a tangent line through the inflection point, intersecting the x- and y- axes. If you divide the y-intercept by the negative of the x-intercept, you will get the slope. Based on my sketch, it seems like the y-intercept is about 2 1/3 = 7/3, while the x-intercept is about 1 4/5 = 9/5. Thus, the slope should be about -35/27, which is approximately -1.3, a reasonably close estimate to the min of figure C.
Best Answer
The derivative can be a lot. It has a direction in which we measure a change, a location at which we do it, and what makes the derivative a local quantity, a function of which we measure a change, and finally a slope which is the change. So it depends on what we put focus on. My personal favorite of looking at it is by the Weierstraß formula: $$ f(x_0+v)=f(x_0)+ D_{x_0}(f)\cdot v + r(v) $$ where $x_0$ is the location, $f$ the (differentiable) function, $v$ the direction, $f'(x_0)=D_{x_0}(f)$ the derivative, i.e. the linear approximation at $f,$ the tangent, and $r(v)$ the error we make by such an approximation. The remainder may not have a linear term for otherwise this would add to the already given linear term $D_{x_0}(f)\cdot v.$ This condition reads thus $$ \lim_{v \to 0}\dfrac{r(v)}{\|v\|}=0 $$ I like that definition because it contains all relevant quantities, and their relevant properties, especially the linearity of $D_{x_0}(f),$ and allows generalizations in all directions, e.g. tangent bundles.
In that setup, we get the derivative $D_{x_0}(f)$ as a function of location $x_0,$ or as an operator $D_{x_0}$ on the function, and last but not least $D_{x_0}(f)\cdot v$ as the slope in direction $v.$
It is a good exercise to show that Weierstraß's formula is equivalent to the common definition via limits (a sequence of secants that converge to a tangent), and to check those quantities at an easy example like $f(x)=x^3+x.$ The crucial point is, that we need all these perspectives in physics and all are usually called just a derivative.