Integration by Parts (brief)

Single-variable calculus from first principles

When an integral is a product of two unrelated functions, like x·eˣ, substitution usually won't help. The tool for products is integration by parts, the integral counterpart of the product rule.

It comes straight from reversing the product rule. The formula trades one integral for another, hopefully simpler, one:

The art is choosing u and dv. Pick u to be the part that gets simpler when differentiated (so the leftover integral is easier), and let dv be the part you can integrate.

Where this lives in MLIntegration by parts is the technique behind the entropy and cross-entropy integrals that pervade ML. Things like ∫ x ln x dx appear when computing the entropy of continuous distributions. It's also a workhorse in deriving expectations and in the maths behind variational inference, where integrals of products of densities and log-densities show up constantly.
▶ Integration by Parts (brief)
← Substitution (u-sub)Taylor Polynomials →