Question about Spivak's proof of how to use u-substitution when the derivative of the inner function does not appear in the integral
Solution 1:
Note that \begin{align} \int f(g(x))\cdot g'(x) \dfrac{1}{g'(x)}\ dx &= \int \underbrace{f(g(x))\cdot\dfrac{1}{(g' \circ g^{-1})(g(x))}}_{h(g(x))}\ \underbrace{g'(x)\ dx}_{du} \\ \end{align} where I defined $h(t):= f(t) \cdot \dfrac{1}{(g' \circ g^{-1})(t)}$. So, now of course, you can apply the substitution rule in the first form Spivak presented, simply by putting $u = g(x)$ and $du = g'(x)\ dx$.
Anyway, let me just add a few comments about how (a few years back), after reading Spivak's chapter, I really convinced myself that the substitution rule is actually true as a consequence of the chain rule, rather than some symbolic manipulation (I mean of course I knew it was true, but not how the computations aligned with the formalism).
I would recommend reading this previous answer of mine, where I pretty much (re)explain what I understood from reading this section in Spivak. Anyway, the gist is the following. Given any continuous $f$, when we write down the symbol $\int f(x)\, dx$, what we really mean is a differentiable function (or if you wish an equivalence class of differentiable functions), $F$, such that $F' = f$. So, I shall refer to this primitive function $F$ (or rather its equivalence class) by the symbol $\text{prim}(f)$. Then, the common subsitution rule \begin{align} \int f(g(x)) \cdot g'(x) \, dx &= \int f(u)\, du \quad \text{where $u = g(x)$} \end{align} can be written (I'd say more correctly from a technical perspective) as \begin{align} \text{prim}((f \circ g) \cdot g') &= \text{prim}(f) \circ g. \end{align} (by the way $\text{prim}(f) \circ g$ of course means $[\text{prim}(f)] \circ g$). All this equation is saying is that if you differentiate both sides, you get the same function, namely $(f \circ g) \cdot g'$. On the LHS, that is trivially true, by definition of $\text{prim}(\cdot)$, while on the RHS, it is because of the chain rule. Now, if $g$ is invertible, we can "solve" this equation to get \begin{align} \text{prim}(f) &= \text{prim}((f \circ g) \cdot g') \circ g^{-1} \end{align} This equation is true for EVERY continuous $f$, and every continuously differentiable $g$, which is invertible. Just for the sake of avoiding confusion later on, I'll write this as \begin{align} \text{prim}(\phi) &= \text{prim}((\phi \circ \psi) \cdot \psi') \circ \psi^{-1} \end{align} Now, the equation you're looking for is obtained by plugging in $\phi = f \circ g$ and $\psi = g^{-1}$. Then, this immediately reduces to \begin{align} \text{prim}(f \circ g) &= \text{prim}\left(f \cdot (g^{-1})'\right) \circ g \\ &= \text{prim}\left(f \cdot \dfrac{1}{g' \circ g^{-1}} \right) \circ g, \end{align} where in the last line, I used the inverse function theorem for the formula of derivative of inverses. Of course, if you write this out in the classical notation, it says that if we put $u = g(x)$, then \begin{align} \int f(g(x))\, dx &= \int f(u) \cdot (g^{-1})'(u)\, du \\ &= \int f(u) \cdot \dfrac{1}{g'(g^{-1}(u))}\, du \end{align}
In the previous answer of mine, I explain in slightly more detail, how to translate back and forth between the two notations.
Also, one final remark which I feel compelled to add: no one ever uses this $\text{prim}(\cdot)$ notation, and for good reason, because in actual hands-on computations, it doesn't serve us too well, so of course, you should get comfortable with all the tricks of integration being applied in the classical notation as well. The only thing which this notation offers is a temporary way of writing things, in order to clarify for oneself what exactly is going on when applying the substitution rule (as I'm sure several people have atleast once thought about why it's true considering we're taught derivatives are not fractions, but yet in this one circumstance, we treat it as a fraction).
Solution 2:
Believe it or not, $$ \int f(g(x)) \, dx $$ is still of the correct form to admit substitution, provided that $g$ is invertible. To begin with, consider what we are aiming for: we know that any integral of the form $$ \int \phi'(\mu(x))\mu'(x) \, dx $$ is equal to $\phi(\mu(x))+C$, and making the substitution $u=\mu(x)$ works out just the same (hence why integration by substitution is valid in the first place). This means that if $f(g(x))$ can be written as $\phi'(\mu(x))\mu'(x)$ for some functions $\phi'$ and $\mu$, then substitution is applicable. First, rewrite the integral as $$ \int \frac{f(g(x))}{g'(x)}g'(x) \, dx $$ Now, the derivative of the inner function $g$ appears elsewhere, which is what we wanted. From here, it is simply a matter of rearrangement: \begin{align} \int \frac{f(g(x))}{g'(x)}g'(x) \, dx &= \int \frac{f(g(x))}{g'(g^{-1}(g(x)))}g'(x) \, dx \\ &= \int \phi'(g(x))g'(x) \, dx \end{align} where $\phi'$ is the function defined by $$ \phi'(x) = \frac{f(x)}{g'(g^{-1}(x))} \, . $$ (It should now be clear why it is necessary that $g$ is invertible.) We find that the integral is equal to $$ \int f(g(x)) \, dx = \int \phi'(g(x))g'(x) \, dx = \phi(g(x)) + C $$ Compare this method with how we usually make substitutions. When we set $u=g(x)$ so that $x = g^{-1}(u)$ and $dx = (g^{-1})'(u) \, du$, it may seem that we are doing something completely different to the method shown above. However, if we realise that $$ (g^{-1})'(u) = \frac{1}{g'(g^{-1}(u))} $$ then it becomes clear that the two methods are virtually the same: \begin{align} \int f(g(x)) \, dx &= \int f(u) (g^{-1})'(u) \, du \\ &= \int \frac{f(u)}{(g'(g^{-1}(u))} \, du \\ &= \int \phi'(u) \, du \\ &= \phi(u) + C \\ &= \phi(g(x)) + C \, . \end{align}