Integration by substitution

Level FundamentalDifficulty ★★★★★Method⌖ Open in the map

What is it?

The chain rule read backwards: ∫f(g(x)) g′(x) dx=∫f(u) du\int f(g(x))\,g'(x)\,\dd x = \int f(u)\,\dd u. In probability it is how densities transform when a random variable is transformed.

Formulas

∫abf(g(x)) g′(x) dx=∫g(a)g(b)f(u) du\int_a^b f\big(g(x)\big)\,g'(x)\,\dd x = \int_{g(a)}^{g(b)} f(u)\,\dd u
Y=g(X)  ⟹  pY(y)=pX(g−1(y))∣dg−1dy∣Y = g(X) \implies p_Y(y) = p_X\big(g^{-1}(y)\big)\left|\frac{\dd g^{-1}}{\dd y}\right|
change of variables for densities

Where it shows up in computing

  • Monte Carlo methods★★★★★frequentScientific computing and algorithms

    Importance sampling and inverse-transform sampling are changes of variable in the integral being estimated.

Where it shows up in AI

  • Generative models★★★★★advancedAI and machine learning

    In 1D, a normalizing flow is exactly the density change-of-variables formula.

Where is it used?

Computing topics reachable from here, through the chain of ideas that leads to them:

What depends on it

This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.

↑ ↓ to navigate · ↵ · Esc