What we did with limits, understanding what it means to approach something even if you can’t get there, starts to pay off here. The fundamental problem that opens up the next chapter of mathematics is the tangent line problem. How can you determine the slope of the line that is tangent to a curve? This hurdle was collectively worked on so much that multiple people solved it at nearly the same exact time in different parts of the world. If you’re curious about that history, this is a good place to start: Leibniz–Newton calculus controversy
As for the tangent line problem itself, you can approximate the tangent line with a secant line by just having the distance between the points really small. We’ll call that distance $\Delta x$ and then our two points will be
\[(c,f(c)) \quad\text{and}\quad (c+\Delta x, f(c+\Delta x))\]Desmos has an interactive version on this concept here.
Now we can use our slope formula to come up with the slope of that secant line.
\[\begin{align*} m &= \frac{y_2-y_1}{x_2-x_1} \\[1em] m_{sec} &= \frac{f(c+\Delta x) - f(c)}{(c+\Delta x) - c}\\[1em] m_{sec} &= \frac{f(c+\Delta x) - f(c)}{\Delta x} \end{align*}\]This leads us to our definition of a tangent line. Since we want those two points to be as close as possible
\[\lim_{\Delta x \to 0} \frac{f(c+\Delta x) - f(c)}{\Delta x}\]Let’s apply that to something we couldn’t normally get the slope of, a quadratic: $f(x)=x^2+1$ at the point $(-1,2)$.
\[\begin{align*} \lim_{\Delta x \to 0} \frac{f(-1+\Delta x) - f(-1)}{\Delta x} &= \lim_{\Delta x \to 0} \frac{(1-2\Delta x+\Delta x^2) + 1 - 2}{\Delta x} \\[1em] &= \lim_{\Delta x \to 0} \frac{-2\Delta x+\Delta x^2}{\Delta x} \\[1em] &= \lim_{\Delta x \to 0} -2 + \Delta x \\[1em] &= -2 \end{align*}\]In fact, you could do this in general for any point in the function.
\[\begin{align*} \lim_{\Delta x \to 0} \frac{f(c+\Delta x) - f(c)}{\Delta x} &= \lim_{\Delta x \to 0} \frac{(c^2+2c\Delta x+\Delta x^2) + 1 - (c^2+1)}{\Delta x} \\[1em] &= \lim_{\Delta x \to 0} \frac{2c\Delta x+\Delta x^2}{\Delta x} \\[1em] &= \lim_{\Delta x \to 0} 2c + \Delta x \\[1em] &= 2c \end{align*}\]This tangent line leads us to one of two operations you’ll learn in calculus: differentiation. Differentiation produces derivatives, which the latter is defined as
\[f'(x) = \lim_{\Delta x \to 0} \frac{f(x+\Delta x) - f(x)}{\Delta x}\]Not that the derivative of a function is itself a function of $x$, and it’s named $f’$. This new function, like we saw above with the quadratic, can be used to find the slope of the tangent line at $x$. To put it another way, the derivative can be used to find the instantaneous rate of change of one variable with respect to another.
There is other notation that will be used—mostly because two different people came up the idea of calculus at the same time—but each has its uses. The former $f’$ is read as “$f$ prime” and is handy shorthand for a derivative.
The other common one is $\frac{dy}{dx}$ and behaves like a fraction, but technically isn’t.
\[\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{f(x+\Delta x) - f(x)}{\Delta x}\]This one is read as “the derivative of $y$ with respect to $x$”. It appears to be the more cumbersome of the two, but its uses as a notation will become clearer as we make our way through the material.
There is an alternative definition of a derivative that can be handy depending on the situation.
\[f'(x) = \lim_{x\to c} \frac{f(x)-f(x)}{x-c}\]Notice that it’s still slope, but instead of looking at what happens when the distance between the points is 0, we look at what happens when the points are the same.
This definition also leads to an important proof: differentiability implies continuity. Just keep in mind that the reverse is not necessarily true. The book has the proof, but a better annotated version is here.