The Chain Rule

In words: differentiate the outside function, leave the inside alone, and multiply by the derivative of the inside. Rates multiply: if uu changes 33 times as fast as xx and yy changes 22 times as fast as uu, then yy changes 66 times as fast as xx.
The proof starts by splitting the difference quotient. When g(x+h)≠g(x)g(x + h) \ne g(x),
f(g(x+h))−f(g(x))h=f(g(x+h))−f(g(x))g(x+h)−g(x)⋅g(x+h)−g(x)h.\begin{aligned} &\frac{f(g(x + h)) - f(g(x))}{h} \\ &\qquad = \frac{f(g(x + h)) - f(g(x))}{g(x + h) - g(x)} \\ &\qquad\qquad \cdot \frac{g(x + h) - g(x)}{h}. \end{aligned}
As h→0h \to 0, g(x+h)→g(x)g(x + h) \to g(x), because gg is differentiable, and so continuous, at xx. So the first factor approaches f′(g(x))f'(g(x)) and the second approaches g′(x)g'(x). The split doesn't work when g(x+h)=g(x)g(x + h) = g(x) for values of hh arbitrarily close to 00. A slightly longer argument covers that case, and the rule still holds.
y = sin x: slope 1 at the origin.
y = sin 2x runs through the same heights twice as fast. Its slope at x is 2cos 2x, twice the slope of sin x at the matching point 2x: slope 2 at the origin.
The picture is the chain rule with inside function 2x2x. The derivative of sin⁡2x\sin 2x is cos⁡(2x)⋅2\cos(2x) \cdot 2.

The common forms

Other bases, and the log of an absolute value

The first and last follow from the chain rule. Since ax=exln⁡aa^x = e^{x\ln a}, its derivative is exln⁡a⋅ln⁡a=axln⁡ae^{x\ln a} \cdot \ln a = a^x \ln a. The middle one is a constant multiple: since log⁡ax=ln⁡xln⁡a\log_a x = \frac{\ln x}{\ln a} and ln⁡a\ln a is a constant, its derivative is 1xln⁡a\frac{1}{x \ln a}. For x<0x < 0, ln⁡∣x∣=ln⁡(−x)\ln|x| = \ln(-x), whose derivative is −1−x=1x\frac{-1}{-x} = \frac{1}{x}.

Tangent lines