Proof of The Chain Rule I’m self-studying Stewart’s calculus and I went back to review the proof of the chain rule, but I keep getting confused about a particular line.
The proof starts as follows:

*

*$\Delta y = f(x+\Delta x) - f(x)$: this part is clear to me.


*$\displaystyle{\lim_{\Delta x \to 0}} [\Delta y/\Delta x] = f’(a)$: this part is clear to me.


*let $\varepsilon$ be a number such that $\varepsilon = (\Delta y/\Delta x) - f’(a)$: not exactly sure why they decided to go in this direction. How does one go about logically arriving at this step?


*$\Delta y = \varepsilon \Delta x + \varepsilon f’(a)$: this is clear to me.


*If we define $\varepsilon$ to be 0 when $\Delta x = 0$ then $\varepsilon$ becomes a continuous function of $\Delta x$: I’m also confused here. How can we define $\varepsilon$ to be 0 when $\Delta x = 0$? Not sure what that means. Further, if $\Delta x = 0$ then wouldn’t $\varepsilon = 0$ (no change in the difference quotient) $- f’(a) = -f’(a)$?
#3 and #5 are preventing me from proceeding. Can anyone help out?
 A: The definition $\varepsilon = (\Delta y/\Delta x) - f’(a)$ does not make sense when $\Delta x=0$, since you cannot divide by $0$. We need a specific definition of $\varepsilon$ for the case where $\Delta x=0$.
The choice $\varepsilon=0$ when $\Delta x=0$ is a possible choice, with the advantage of making $\varepsilon$ continuous at $\Delta x=0$. Indeed, as you mention in $2.$, $\lim_{\Delta x\to 0}\frac{\Delta y}{\Delta x}=f'(a)$ so $\lim_{\Delta x\to 0}\varepsilon = f'(a)-f'(a)=0$.

As for why the author of the proof decided to define $\varepsilon$ that way, the short answer is "because it works" (to prove what it wants to prove), as the proof probably shows after step $5.$. In more details, if $\varepsilon$ is defined that way, we can write
$$\Delta y=f'(a)\Delta x + \varepsilon \Delta x$$
(note that your step $4.$ is incorrect). Expliciting $\Delta y$ and $\Delta x$, this means that
$$f(x) = f(a) + f'(a)(x-a) + (x-a)\varepsilon$$
Note that $f(a)+f'(a)(x-a)$ is a linear function whose graph is the tangent to the graph of $y=f(x)$ at $P(a,f(a))$, and $\lim_{\Delta x\to 0}(x-a)\epsilon=0$, so when $x$ is close to $0$ (in other words, $\Delta x$ is close to $0$), we can write
$$
f(x) \simeq f(a)+f'(a)(x-a)
$$
This means that the graph of $y=f(x)$ can be approximated by its tangent line near $P$, which is the original intention when defining the tangent line (as the "best approximation" of a curve near a point).
