1. The idea (chain rule in reverse)
\[
\frac{d}{dx}\,F(g(x)) = F'(g(x))\cdot g'(x)
\]
If your integrand looks like a product of a function of something and the derivative of that “something”, then you can set
\(u=g(x)\) and replace \(g'(x)\,dx\) by \(du\).
\[
\int F'(g(x))\,g'(x)\,dx = \int F'(u)\,du = F(u)+C = F(g(x))+C
\]
In practice you rarely see the integrand in a perfect “chain-rule” form, but often it matches up to a constant.
2. Standard steps
- Choose \(u=g(x)\), usually an inner expression (inside a power, root, trig, log, etc.).
- Differentiate: \(du=g'(x)\,dx\).
- Solve for \(dx\) (or match \(g'(x)\,dx\) directly), then rewrite the integrand entirely in \(u\) and \(du\).
- Integrate in \(u\).
- Back-substitute \(u=g(x)\).
Tip: choose \(u\) so that after substitution there is no \(x\) left.
3. Worked example (indefinite)
Compute \(\displaystyle \int x\sqrt{x^2+1}\,dx\).
\[
\int x\sqrt{x^2+1}\,dx
\]
Step 1. Pick the inner expression:
\[
u=x^2+1
\]
Step 2. Differentiate:
\[
\frac{du}{dx}=2x\quad\Rightarrow\quad du=2x\,dx
\]
The integrand has \(x\,dx\), which is half of \(2x\,dx\). So \(x\,dx=\frac12\,du\).
Step 3. Rewrite everything in \(u\):
\[
\int x\sqrt{x^2+1}\,dx
= \int \sqrt{u}\cdot\frac12\,du
= \frac12\int u^{1/2}\,du
\]
Step 4. Integrate in \(u\):
\[
\frac12\int u^{1/2}\,du
= \frac12\cdot \frac{u^{3/2}}{3/2} + C
= \frac13\,u^{3/2}+C
\]
Step 5. Back-substitute \(u=x^2+1\):
\[
\boxed{\int x\sqrt{x^2+1}\,dx = \frac13\,(x^2+1)^{3/2} + C}
\]
4. Definite integrals and bound conversion
For definite integrals, you can avoid back-substituting by converting the bounds.
\[
\int_{a}^{b} f(x)\,dx,\qquad u=g(x),\qquad du=g'(x)\,dx
\]
Convert the bounds:
\[
x=a\Rightarrow u=g(a),\quad x=b\Rightarrow u=g(b)
\]
and rewrite:
\[
\int_{a}^{b} f(x)\,dx
= \int_{g(a)}^{g(b)} f(x(u))\,\frac{dx}{du}\,du
\]
In the common chain-rule setup \(f(x)=F'(g(x))g'(x)\), this simplifies to:
\[
\int_{a}^{b} F'(g(x))g'(x)\,dx
= \int_{g(a)}^{g(b)} F'(u)\,du
= F(u)\bigg|_{g(a)}^{g(b)}
\]
Practical benefit: you do not need to rewrite the final answer back to \(x\) if you evaluate in \(u\).
5. How to pick a good \(u\)
- Inside powers/roots: if you see \((x^2+1)^{5}\) or \(\sqrt{x^2+1}\), try \(u=x^2+1\).
- Inside trig/log/exp: for \(\cos(3x)\) or \(e^{x^2}\), try \(u=3x\) or \(u=x^2\).
- Denominators: for \(\frac{2x}{x^2+1}\), try \(u=x^2+1\) (because its derivative is \(2x\)).
- “One unit short” patterns: \(1+\tan^2x\) pairs with \(\tan x\); \(\sec^2x\) pairs with \(\tan x\).
If your substitution leaves \(x\) behind, it is usually a sign the chosen \(u\) is not the right one.
6. Common “ready-to-use” templates
These are just the chain rule backwards. Memorizing a few helps you recognize substitutions quickly.
7. More advanced extensions (what comes next)
This calculator focuses on standard \(u\)-substitution, but the same philosophy extends to harder cases:
- Trig substitution: use \(x=a\tan\theta\), \(x=a\sin\theta\), etc. for \(\sqrt{a^2-x^2}\), \(\sqrt{x^2-a^2}\).
- Weierstrass substitution: \(t=\tan(x/2)\) for rational expressions in \(\sin x\) and \(\cos x\).
- Improper integrals: bound conversion still works, but you must handle limits carefully.
If you want, I can add a “University mode” toggle that lists trig-sub and Weierstrass presets and explains when to use them.