How does $u$-substitution work? I'm in an introductory Calculus class and would really like to understand $u$-substitution. So far, I have been able to understand all the concepts but hit a brick wall here. I know that in $u$-substitution, you have $u\cdot\frac{du}{dx}$ and you set whatever $u$ is, well, equal to $u$. However, why is it that you then derive $u$ to get $\frac{du}{dx} = \text{something}$ and must solve for $dx$ and plug in? That's the part that got me lost. I understand what $u$ should be set to, but after that I'm unsure about what actually happens. Could someone guide me (simply) through the process and why $u$-substitution works like this?
 A: 
Theorem 1: Derivative of composite functions (I.e. Chain-Rule):
When $y=f(u)$ is a differentiable function w.r.t $u$ and $u=g(x)$ is a differentiable function w.r.t $x$, then $y=f(g(x))$ is a differentiable function w.r.t $x$ and:
$\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}~~~~$
(note, these are not fractions and do not necessarily follow the same properties of real numbers.  It is by convenient notation and properties of derivatives that this is true.  I.e., you should not have expected that you can cancel the du's on top and bottom.)
Equivalently, by relabling and using different notation you have:
$\frac{d}{dx}[f(g(x))] = f'(g(x))\cdot g'(x)$, or equivalently yet, that for $u=g(x)$ you have
$\frac{d}{dx}[f(u)] = \frac{d}{du}[f(u)]\frac{du}{dx}$

Proof: 
Let $h(x)=f(g(x))$.  We wish to prove then that $h'(c) = f'(g(c))g'(c)$.  Assume for a moment that $g(x)\neq g(c)$ in the neighborhood of $c$ (to avoid division by zero errors).
By the definition of derivatives:
$$\begin{align} h'(c) &= \lim\limits_{x\to c} \frac{h(x)-h(c)}{x-c}\\
 &= \lim\limits_{x\to c} \frac{f(g(x))-f(g(c))}{x-c}\\
&= \lim\limits_{x\to c} \frac{f(g(x))-f(g(c))}{x-c}\cdot\frac{g(x)-g(c)}{g(x)-g(c)}\\
&= \lim\limits_{x\to c} \frac{f(g(x))-f(g(c))}{g(x)-g(c)}\cdot\frac{g(x)-g(c)}{x-c}\\
&= \left[\lim\limits_{x\to c} \frac{f(g(x))-f(g(c))}{g(x)-g(c)}\right] \cdot \left[\lim\limits_{x\to c} \frac{g(x)-g(c)}{x-c}\right]\\
&= f'(g(c))g'(c)
\end{align}
$$
In a more complete proof, we may choose to be a bet more precise for the case where $g(x)=g(c)$ within the neighborhood of $c$.  Either it will be constant in the neighborhood of $c$, or we can always pick a small enough neighborhood such that you avoid the issue entirely (else it will contradict the differentiability of $g$)

Theorem 2: Integration by substitution:
Let $g$ be a function whose range is an interval $I$, and let $f$ be a function continuous on $I$.  If $g$ is differentiable on its domain and $F$ is an antiderivative of $f$ on $I$, then:
$\int f(g(x))g'(x)dx = F(g(x))+C$
By relabling, setting $u=g(x)$, then $du=g'(x)dx$ and:
$\int f(u)du = F(u)+C$

Proof:
Let $y=F(u)$ and $u=g(x)$.  Then by theorem 1 (chain-rule) above we get:
$\frac{d}{dx}[F(g(x))] = F'(g(x))g'(x)$.
By definition of antiderivatives then, $\int F'(g(x))g'(x)dx = F(g(x))+C = F(u)+C$
Since $F$ is an antiderivative of $f$, the result follows.
