Chain Rule
Theorem 1. If $f(u)$ is differentiable at the point $u = g(x)$ and $g(x)$ is differentiable at $x$, then the composite function $(f \circ g)(x) = f(g(x))$ is differentiable at $x$, and $$(f \circ g)'(x) = f'(g(x)) \cdot g'(x).$$ In Leibniz's notation, if $y = f(u)$ and $u = g(x)$, then $$\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx},$$ where $dy / du$ is evaluated at $u = g(x)$.
Proof. Let $\Delta x$ be an increment in $x$ and let $\Delta u$ and $\Delta y$ be the corresponding increments in $u$ and $y$. Then by error in differential approximation, we have these two equations $$\Delta u = g'(x) \Delta x + \varepsilon_1 \Delta x = (g'(x) + \varepsilon_1) \Delta x$$ where $\varepsilon_1 \rightarrow 0$ as $\Delta x \rightarrow 0$, and $$\Delta y = f'(u) \Delta u + \varepsilon_2 \Delta u = (f'(u) + \varepsilon_2) \Delta u$$ where $\varepsilon_2 \rightarrow 0$ as $\Delta u \rightarrow 0$. Then we obatin $$\Delta y = (f'(u) + \varepsilon_2)(g'(x) + \epsilon_1) \Delta x \\ \Longrightarrow \frac{\Delta y}{\Delta x} = f'(u)g'(x) + g'(x) \varepsilon_2 + f'(u) \varepsilon_1 + \varepsilon_2 \varepsilon_1.$$ Since $\Delta u \rightarrow 0$ as $\Delta x \rightarrow 0$, $\varepsilon_1, \varepsilon_2 \rightarrow 0$ as $\Delta x \rightarrow 0$. Thus $$\frac{dy}{dx} = \lim_{\Delta x \rightarrow 0} \frac{\Delta y}{\Delta x} = f'(u)g'(x) = f'(g(x)) \cdot g'(x). \blacksquare$$
Substitution Rule
Theorem 2. If $u = g(x)$ is a differentiable function whose range is an interval $I$, and $f$ is continuous on $I$, then $$\int f(g(x)) \cdot g'(x) dx = \int f(u) du.$$
Proof. Let $F$ be an antiderivative of $f$. Then by the Chain Rule, we have $$\int f(g(x)) \cdot g'(x) dx = \int \{ F(g(x)) \}' dx = F(g(x)) + C = F(u) + C \\ = \int F'(u) + du = \int f(u) du. \blacksquare$$
Substitution in Definite Integrals
Theorem 3. If $g'$ is continuous on the interval $[a, b]$ and $f$ is continuous on the range of $g(x) = u$, then $$\int_a^b f(g(x)) \cdot g'(x) dx = \int_{g(a)}^{g(b)} f(u) du.$$
Proof. Let $F$ denote any antiderivative of $f$. Then by the Chain Rule and Fundamental Theorem of Calculus, we have $$\int_a^b f(g(x)) \cdot g'(x) dx = \int_a^b \frac{d}{dx} \{F(g(x))\} dx = F(g(b)) - F(g(a)) = \int_{g(a)}^{g(b)} f(u) du. \blacksquare$$