_Posted on September 27, 2024_ > [!theorem] **Theorem:** _If $g$ is [[Linearity of Differentiation|differentiable]] at $x$ and $f$ is differentiable at $g(x)$, then the compossite function $f \circ g$ is differentiable at $x$ and we have $(f \circ g)'(x) = f'(g(x)) \cdot g'(x)$._ Proof: By the definition of derivative, we have $\large (f\circ g)'(x) = \lim_{t \rightarrow x} \frac{f(g(t))-f(g(x))}{t-x} = \lim_{t \rightarrow x} \bigg[\frac{f(g(t))-f(g(x))}{g(t)-g(x)} \cdot \frac{g(t)-g(x)}{t-x}\bigg]$ only when $g(t) \neq g(x)$. To work around this, we introduce the function $Q$:$ \large Q(y) = \begin{cases} \frac{f(y) - f(g(x))}{y - g(x)} & \text{if } y \neq g(x) \\ f'(g(x)) & \text{if } y = g(x) \end{cases} $ **First**, we need to show that the difference quotient for $f \circ g$ is always equal to $\large Q(g(t))\cdot \frac{g(t) - g(x)}{t-x}.$ There are two cases: 1. For $g(t) \neq g(x)$, the $g(t)-g(x)$ terms cancel, so we have $\large Q(g(t))\cdot \frac{g(t))-g(x)}{t-x} = \frac{f(g(t))-f(g(x))}{g(t)-g(x)}\cdot \frac{g(t)-g(x)}{t-x}=$$\large \frac{f(g(t))-f(g(x))}{t-x},$which is the difference quotient for $f\circ g$. 2. For $g(t) = g(x)$, we have $\large \frac{f(g(t))-f(g(x))}{t-x} = 0= Q(g(t)) \cdot \frac{g(t)-g(x)}{t-x}$ which is the desired result. **Next**, we need to show that $\large \lim_{t\rightarrow x} [Q(g(t)) \cdot \frac{g(t)-g(x)}{t-x}]$ converges to $f'(g(x)) \cdot g'(x)$. By the [[Multiplicativity of Limits]], we can seperate the limit into two factors $\large \lim_{t\rightarrow x} [Q(g(t))] \cdot \lim_{t\rightarrow x}[\frac{g(t)-g(x)}{t-x}].$ we need to show that both factors converge: 1. First, we recognize that the factor $\large\lim_{t\rightarrow x}[\frac{g(t)-g(x)}{t-x}]$ is $g'(x)$, and since $g$ is differentiable at $x$, the limit converges by definition. 2. For $\large \lim_{t\rightarrow x} Q(g(t))$, there are two cases to consider: 1. When $g(t)\neq g(x)$, we have $Q(g(t)) = \large \frac{f(g(t))-f(g(x))}{g(t)-g(x)},$ which is the difference quotient for $f$ at $g(t)$. Thus we have $\large\lim_{t\rightarrow x} Q(g(t)) = f'(g(x))$. 2. When $g(t) = g(x)$, we have directly $Q(g(t)) = f'(g(x)),$ so that $\large\lim_{t\rightarrow x} Q(g(t)) = f'(g))$ trivially. In both cases, we have $\large \lim_{t\rightarrow x} Q(g(t)) = f'(g(x))$. Since $f$ is differentiable at $g(x)$, the limit exists by definition. Since both limits converge, we have $\large \lim_{t\rightarrow x}\bigg[Q(g(t))\cdot \frac{g(t)-g(x)}{t-x}\bigg] = f'(g(x)\cdot g'(x).$This implies that $\large(f\circ g)'(x) = f'(g(x)\cdot g'(x). \quad \blacksquare$ --- This proof was adapted from https://en.wikipedia.org/wiki/Chain_rule