Change of variables formula (source code)

= Change of variables formula
{title2=$\int_{T(S)}f(x)\,dx=\int_S f(T(u))|\det DT(u)|\,du$}
{wiki}

= Change of variables
{synonym}

The <change of variables formula> expresses an <integral> in coordinates that make its <integrand> or its region simpler. Three ingredients change together: the region, the <function> being integrated, and the element of <area> or volume. The last change is measured by the absolute <Jacobian determinant>; forgetting it amounts to counting transformed cells as though their sizes had stayed the same.

In one dimension, substitution is the integrated <chain rule>. If $g$ is <continuously differentiable> on $[a,b]$ and $f$ is <continuous> on its image, then
$$
\int_a^b f(g(x))g'(x)\,dx=\int_{g(a)}^{g(b)}f(u)\,du.
$$
These are directed <definite integrals>: if $g$ decreases, the transformed endpoints reverse. This identity does not require $g$ to be <injective>, because an <antiderivative> composed with $g$ already accounts for any backtracking.https://openstax.org/books/calculus-volume-1/pages/5-5-substitution[OpenStax, Calculus Volume 1, Section 5.5: Substitution]{ref}

For a concrete computation, set $u=1+x^2$, so $du=2x\,dx$. The endpoints $x=0,1$ become $u=1,2$:
$$
\int_0^1\frac{2x}{1+x^2}\,dx=\int_1^2\frac{du}{u}=[\ln u]_1^2=\ln 2\approx0.693147.
$$
The numerator is precisely the <derivative> of the expression in the denominator. Substitution reveals the familiar <natural logarithm> hidden inside this <rational function>. Keeping the original endpoints after changing the <integrand> would describe a different <integral>.

For the elementary two-dimensional theorem, let $T:U\to V$ be a $C^1$ <diffeomorphism> between <open sets> in the plane, let $S\subset U$ be a bounded region with piecewise smooth boundary, and let $f$ be <continuous> on $T(S)$, with the displayed <integrals> finite. Then
$$
\iint_{T(S)}f(x,y)\,dx\,dy=\iint_S f(T(u,v))|\det DT(u,v)|\,du\,dv.
$$
Here $DT$ is the <Jacobian matrix>. The <diffeomorphism> assumption means a <bijection> with a <continuously differentiable> inverse, and ensures a nonzero <Jacobian determinant>. This excludes overlapping sheets; the more general <area formula> handles multiplicity.https://math.mit.edu/~larsh/teaching/F2007/handouts/changeofvariables.pdf[MIT 18.022: The change of variables theorem]{ref}

Take $S=[0,1]^2$ and the <linear map>
$$
T(u,v)=(2u+v,v),\qquad DT=\begin{pmatrix}2&1\\0&1\end{pmatrix},\qquad \det DT=2.
$$
Its inverse is $(u,v)=((x-y)/2,y)$. The square becomes a <parallelogram> with vertices $(0,0),(2,0),(3,1),(1,1)$: base two, height one, <area> two. Consequently $\iint_{T(S)}1\,dx\,dy=\iint_S2\,du\,dv=2$. A nonconstant <integrand> changes too: $\iint_{T(S)}x\,dx\,dy=\int_0^1\int_0^1(2u+v)2\,du\,dv=3$.

The direction of the map matters when selecting the factor. Here $T$ goes from the new coordinates to the original coordinates, so the factor is two. Its inverse has <Jacobian determinant> $1/2$, appropriate for converting <area> in the opposite direction. Writing down the map before computing its <Jacobian matrix> prevents a reciprocal-factor error.

\Image[/change-of-variables-area.png]
{title=A unit square becomes a parallelogram of area two; reflection changes the determinant sign but preserves area}

Now reflect the image vertically: $\widetilde T(u,v)=(2u+v,-v)$ has <Jacobian determinant> $-2$, but still produces <area> two. The sign records reversal of the <orientation of a vector space>; ordinary <area> uses its absolute value. For oriented <differential forms>, the <pullback of a differential form> instead retains the signed <determinant>.https://math.mit.edu/classes/18.952/spring2013/docs/book.pdf[MIT 18.952 notes: Integration of forms, Chapter 3]{ref}

The geometric beauty is that a nonlinear <differentiable map> has a <local linear approximation>: tiny <rectangles> behave approximately like these <parallelograms>. Summing their scaled contributions gives the <change of variables formula>. In <polar coordinates> this factor is $r$, explaining $dx\,dy=r\,dr\,d\theta$; equal angular steps cover more <area> farther from the origin. Choosing suitable coordinates can simplify both the boundary and the <integrand>.https://openstax.org/books/calculus-volume-3/pages/5-7-change-of-variables-in-multiple-integrals[OpenStax, Calculus Volume 3, Section 5.7: Change of variables in multiple integrals]{ref}