21. Change of variables and the Jacobian
§11.1 and §11.4 introduced correction factors — r for polar, r again for cylindrical, \rho^2\sin\varphi for spherical — each justified by a separate geometric argument about sectors and spherical wedges. This closing lesson of the module supplies the single formula that produces every one of those factors automatically, for any change of coordinates at all: the Jacobian.
Change of variables in one dimension, recalled
§4.5's substitution rule, \int f(x)\,dx=\int f(x(u))\,x'(u)\,du, already contains the seed of this idea: swapping variables multiplies the integrand by a derivative that accounts for how the substitution stretches or compresses the interval. The Jacobian is exactly this stretching factor, generalized to two (or more) dimensions at once.
The Jacobian determinant
For a change of variables x=x(u,v), y=y(u,v), the Jacobian is the determinant
\frac{\partial(x,y)}{\partial(u,v)}=\begin{vmatrix}\dfrac{\partial x}{\partial u}&\dfrac{\partial x}{\partial v}\\[6pt]\dfrac{\partial y}{\partial u}&\dfrac{\partial y}{\partial v}\end{vmatrix}=\frac{\partial x}{\partial u}\frac{\partial y}{\partial v}-\frac{\partial x}{\partial v}\frac{\partial y}{\partial u}
Geometric meaning: this determinant measures how much a tiny rectangle in the uv-plane (area du\,dv) gets stretched or shrunk when mapped into the xy-plane by the substitution — exactly §9.2's cross-product-as-area idea, since a 2\times2 determinant is the (signed) area of the parallelogram spanned by two vectors, here the partial-derivative vectors \langle x_u,y_u\rangle and \langle x_v,y_v\rangle that describe how the small rectangle's edges get mapped.
The change of variables formula
\iint_Rf(x,y)\,dx\,dy=\iint_{R^*}f\big(x(u,v),y(u,v)\big)\left|\frac{\partial(x,y)}{\partial(u,v)}\right|du\,dv
where R^* is the region R described in the new uv-coordinates. The absolute value matters — area is never negative, even though the determinant itself can be, depending on orientation.
Recovering polar coordinates from first principles
Apply the formula to x=r\cos\theta, y=r\sin\theta:
\frac{\partial(x,y)}{\partial(r,\theta)}=\begin{vmatrix}\cos\theta&-r\sin\theta\\\sin\theta&r\cos\theta\end{vmatrix}=r\cos^2\theta+r\sin^2\theta=r
using the Pythagorean identity (§0.4) exactly as it appeared throughout Module 6. This single computation is the actual origin of the "extra factor of r" that §11.1 introduced through a sector-area argument — the Jacobian recovers it directly, with no geometric picture required at all, and the same machine works identically for cylindrical and spherical coordinates (§11.4), producing their correction factors from routine differentiation instead of a separate geometric argument each time.
Doing it in Python
Confirming the polar Jacobian is exactly r, straight from the determinant definition:
import sympy as sp
r, theta = sp.symbols('r theta', positive=True)
x = r * sp.cos(theta)
y = r * sp.sin(theta)
J = sp.Matrix([
[sp.diff(x, r), sp.diff(x, theta)],
[sp.diff(y, r), sp.diff(y, theta)]
]).det()
print(f"Jacobian = {sp.simplify(J)}")
A linear change of variables, u=x+y, v=x-y, computing its Jacobian and using it to simplify a genuinely awkward-looking integral:
import sympy as sp
u, v, x, y = sp.symbols('u v x y')
x_uv = (u + v) / 2
y_uv = (u - v) / 2
J = sp.Matrix([
[sp.diff(x_uv, u), sp.diff(x_uv, v)],
[sp.diff(y_uv, u), sp.diff(y_uv, v)]
]).det()
print(f"Jacobian = {J}, |Jacobian| = {abs(J)}")
f = (x + y) * sp.exp(x - y)
f_in_uv = sp.simplify(f.subs({x: x_uv, y: y_uv}))
print(f"f(x,y) becomes f(u,v) = {f_in_uv} -- dramatically simpler")
result = sp.integrate(sp.integrate(f_in_uv * abs(J), (v, -1, 1)), (u, 0, 2))
print(f"integral = {sp.simplify(result)}")
Confirming the spherical Jacobian, \rho^2\sin\varphi, matches §11.4's volume element from the same routine determinant recipe (extended to three variables, where the Jacobian is a 3\times3 determinant):
import sympy as sp
rho, phi, theta = sp.symbols('rho phi theta', positive=True)
x = rho * sp.sin(phi) * sp.cos(theta)
y = rho * sp.sin(phi) * sp.sin(theta)
z = rho * sp.cos(phi)
J = sp.Matrix([
[sp.diff(x, rho), sp.diff(x, phi), sp.diff(x, theta)],
[sp.diff(y, rho), sp.diff(y, phi), sp.diff(y, theta)],
[sp.diff(z, rho), sp.diff(z, phi), sp.diff(z, theta)]
]).det()
print(f"spherical Jacobian = {sp.simplify(J)}")
print("matches rho^2*sin(phi) from section 11.4, up to sign")
Worked example
Evaluate \displaystyle\iint_R(x+y)e^{x-y}\,dA, where R is the region bounded by x+y=0, x+y=2, x-y=-1, x-y=1 (a parallelogram, awkward to describe directly in x,y).
Substitute u=x+y, v=x-y, so x=\frac{u+v}2, y=\frac{u-v}2. The parallelogram's four boundary lines become exactly the four sides of a rectangle in uv-coordinates: 0\le u\le2, -1\le v\le1 — the entire point of choosing this substitution.
The Jacobian:
\frac{\partial(x,y)}{\partial(u,v)}=\begin{vmatrix}\frac12&\frac12\\\frac12&-\frac12\end{vmatrix}=\left(\frac12\right)\left(-\frac12\right)-\left(\frac12\right)\left(\frac12\right)=-\frac14-\frac14=-\frac12
\left|\frac{\partial(x,y)}{\partial(u,v)}\right|=\frac12
The integrand simplifies immediately: x+y=u, x-y=v, so (x+y)e^{x-y}=ue^v.
\iint_R(x+y)e^{x-y}\,dA=\int_0^2\int_{-1}^1ue^v\cdot\frac12\,dv\,du=\frac12\int_0^2u\,du\cdot\int_{-1}^1e^v\,dv
=\frac12\cdot\left[\frac{u^2}2\right]_0^2\cdot\Big[e^v\Big]_{-1}^1=\frac12\cdot2\cdot\left(e-\frac1e\right)=\boxed{e-\frac1e}
Sanity check. e-\frac1e\approx2.718-0.368\approx2.350 — a modest positive number, reasonable for integrating a moderate-sized function over a moderate-sized region. More importantly: both the region and the integrand became dramatically simpler in the new coordinates — a slanted parallelogram became an axis-aligned rectangle, and a mixed (x+y)e^{x-y} expression became the cleanly separable ue^v — exactly the payoff a well-chosen substitution is supposed to deliver, mirroring §4.5's single-variable substitution rule one dimension up. ✓
Your turn
1. Compute the Jacobian \dfrac{\partial(x,y)}{\partial(u,v)} for x=2u+v, y=u-3v.
2. Using the substitution u=xy, v=x/y (for x,y>0), find \dfrac{\partial(x,y)}{\partial(u,v)} (this requires first solving for x,y in terms of u,v: x=\sqrt{uv}, y=\sqrt{u/v}).
3. True or false: the Jacobian of a change of variables is always positive.
Solutions
1.
\frac{\partial(x,y)}{\partial(u,v)}=\begin{vmatrix}2&1\\1&-3\end{vmatrix}=(2)(-3)-(1)(1)=-6-1=\boxed{-7}
(the area-scaling factor used in an integral would be |-7|=7)
2. x=\sqrt{uv}=u^{1/2}v^{1/2}, y=\sqrt{u/v}=u^{1/2}v^{-1/2}.
x_u=\frac12u^{-1/2}v^{1/2},\quad x_v=\frac12u^{1/2}v^{-1/2},\quad y_u=\frac12u^{-1/2}v^{-1/2},\quad y_v=-\frac12u^{1/2}v^{-3/2}
\frac{\partial(x,y)}{\partial(u,v)}=x_uy_v-x_vy_u=\left(\frac12u^{-1/2}v^{1/2}\right)\left(-\frac12u^{1/2}v^{-3/2}\right)-\left(\frac12u^{1/2}v^{-1/2}\right)\left(\frac12u^{-1/2}v^{-1/2}\right)
=-\frac14v^{-1}-\frac14v^{-1}=\boxed{-\frac1{2v}}
3. False. The worked example itself found a Jacobian of -\frac12, and problem 1 found -7 — both negative. The sign reflects orientation (whether the substitution preserves or reverses the handedness of the coordinate grid, the same \pm sign the cross product carries in §9.2), which is exactly why the change-of-variables formula takes the absolute value of the Jacobian — area itself is never negative, regardless of which way the substitution happens to twist the grid.
Check yourself in code
For the substitution u=x+y, v=x-y, compute the Jacobian \dfrac{\partial(x,y)}{\partial(u,v)}.
Print exactly this:
Jacobian = -1/2
import sympy as sp
u, v = sp.symbols('u v')
x_uv = (u + v) / 2
y_uv = (u - v) / 2
J = sp.Matrix([
[sp.diff(x_uv, u), sp.diff(x_uv, v)],
[sp.diff(y_uv, u), sp.diff(y_uv, v)]
]).det()
print("Jacobian = ...")
import sympy as sp
u, v = sp.symbols('u v')
x_uv = (u + v) / 2
y_uv = (u - v) / 2
J = sp.Matrix([
[sp.diff(x_uv, u), sp.diff(x_uv, v)],
[sp.diff(y_uv, u), sp.diff(y_uv, v)]
]).det()
print(f"Jacobian = {J}")
The Jacobian determinant, \frac{\partial(x,y)}{\partial(u,v)}=x_uy_v-x_vy_u, measures exactly how much a substitution stretches area, and the change-of-variables formula \iint f\,dx\,dy=\iint f\,|J|\,du\,dv is the two-variable extension of §4.5's substitution rule. Plugging in polar or spherical coordinates reproduces §11.1's and §11.4's correction factors — r and \rho^2\sin\varphi — automatically, from routine differentiation rather than a fresh geometric argument each time, and a well-chosen linear substitution can turn a slanted, awkward region and a tangled integrand into a clean rectangle and a separable product, as this lesson's worked example showed directly.
That closes this module's extension of the integral to two and three dimensions — double and triple integrals, polar, cylindrical, and spherical coordinates, and the Jacobian that unifies every coordinate change into one formula. Next: vector calculus, where the gradient from Module 10 gains two siblings — divergence and curl — and integrals along curves and across surfaces bring this course to its close.