I love the divergence theorem, which says that the integral over a region of the divergence of a vector field is equal to the integral, over the boundary of that region, of the component of the vector field normal to the boundary.
This theorem is most famous for its applications to 3D electrostatics, but even the humble 2D version (usually rebranded as Green’s Theorem) can be a big help in evaluating certain gnarly integrals.
Suppose you want to integrate:
acos(1 – 2 t sin(u)^2) log(t)
over the rectangle 0≤t≤1, 0≤u≤π/2. Doing this by brute force is possible, but fairly horrendous. However, if we put:
Q(t,u) = acos(1 – 2 t sin(u)^2) t (log(t) – 1)
P(t,u) = (1 – log(t)) log((√t) cos(u) + √[1 – t sin(u)^2])
then ∂_t Q - ∂_u P = acos(1 – 2 t sin(u)^2) log(t)
Green’s Theorem lets us replace the integral of ∂_t Q - ∂_u P over the rectangle with the integral of (P,Q)·s around the boundary, where s is a unit-length tangent to the boundary.
Along the four sides of the rectangle, we integrate:
P(t,0) = (1 – log(t)) log((√t) + 1)
Q(1,u) = -2u
P(t,½π) = (1 – log(t)) log(√[1 – t])
Q(0,u) = 0
These all have nice results, which sum to 4-π^2/2.
More details at: https://www.gregegan.net/SCIENCE/ThreePointCurvature/ThreePointCurvature.html#APP