Total derivative and change of variables
Total derivative, total differential, multivariable chain rule, Jacobians, and change of variables in integrals (including polar/cylindrical/spherical transforms).
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Engineers often deal with quantities that depend on several variables which themselves depend on other parameters, such as temperature fields changing with time or stresses depending on transformed coordinates. Total derivatives and change of variables let you compute rates of change correctly and evaluate integrals efficiently in more natural coordinates (polar, cylindrical, spherical). They are essential in heat transfer, fluid mechanics, solid mechanics, and signal/image processing.
Key ideas
- Partial derivative: The derivative of f with respect to one variable, keeping others constant, written ∂f/∂x or f_x.
- Total differential: For a differentiable function f(x, y), a linear approximation of the change in f due to small changes dx, dy: df = f_x dx + f_y dy. It generalizes to more variables by summing over all variables.
- Total derivative with respect to a parameter: If x = x(t), y = y(t), and z = f(x, y), the total derivative dz/dt measures the rate of change of z with t, combining both direct and indirect effects via x and y. It follows from the multivariable chain rule: dz/dt = f_x dx/dt + f_y dy/dt.
- Multivariable chain rule (general form): If x depends on u = (u_1, …, u_m) via x = g(u) and z = f(x), then Dz/Du = (Jacobian of f with respect to x) × (Jacobian of g with respect to u). Component-wise: ∂z/∂u_j = Σ_i (∂f/∂x_i)(∂x_i/∂u_j).
- Jacobian matrix: For a vector mapping F: ℝ^m → ℝ^n with components (x_1, …, x_n) as functions of (u_1, …, u_m), the matrix of first partial derivatives is J = [∂x_i/∂u_j] (size n×m).
- Jacobian determinant (or simply, Jacobian): det J, written ∂(x_1, …, x_n)/∂(u_1, …, u_n). It scales small volume elements under the transformation.
- Change of variables in multiple integrals: If a one-to-one, continuously differentiable transformation x = x(u) with nonzero Jacobian maps a region R_u to R_x, then the integral over R_x of a function becomes an integral over R_u multiplied by |Jacobian|.
- Orientation: The sign of the Jacobian determinant indicates whether the mapping preserves (+) or reverses (−) orientation. Integrals use the absolute value |Jacobian| to scale area/volume.
Exact statements and common derivations
- Definition: Total differential and differentiability
- Statement: Let f: ℝ^n → ℝ be differentiable at a point a. Then for a small increment h, f(a + h) − f(a) = ∇f(a) · h + o(∥h∥) as ∥h∥ → 0. The total differential at a is df = Σ_i (∂f/∂x_i)(a) dx_i.
- Assumptions: f is differentiable at a (all first partial derivatives exist in a neighborhood and are continuous at a is sufficient but not necessary).
- Derivation to the two-variable formula: For n = 2, write h = (dx, dy). Then df ≈ f_x dx + f_y dy; higher-order terms are negligible for small changes.
- Chain rule (two variables depending on one parameter)
- Statement: Let z = f(x, y) with f having continuous first partial derivatives. If x = x(t), y = y(t) are differentiable, then dz/dt = f_x dx/dt + f_y dy/dt.
- Derivation: Use differentiability: dz = f_x dx + f_y dy. Divide by dt and apply dx/dt, dy/dt. Limits exist since all functions are differentiable at the point.
- Diagram to draw: A three-layer diagram with t-axis at bottom, (x, y)-plane in middle, and z-axis on top. Arrows: t → (x(t), y(t)) → z = f(x, y). Label arrows with derivatives dx/dt, dy/dt, and partials f_x, f_y to show composition.
- Chain rule (general multivariable form)
- Statement: Let f: ℝ^n → ℝ^k be differentiable at x = g(u), where g: ℝ^m → ℝ^n is differentiable at u. Then the derivative (Jacobian) satisfies D(f ∘ g)(u) = Df(x) Dg(u). Component form: ∂f_r/∂u_j = Σ_i (∂f_r/∂x_i)(x) (∂x_i/∂u_j)(u).
- Assumptions: f and g differentiable at the relevant points.
- Derivation idea: Linearize both maps by their Jacobians and compose the linear maps.
- Jacobian of a transformation and its inverse
- Statement: If x = x(u, v), y = y(u, v) and the Jacobian J = ∂(x, y)/∂(u, v) ≠ 0 at a point, then locally the inverse mapping (u, v) = (u(x, y), v(x, y)) exists and ∂(u, v)/∂(x, y) = 1 / (∂(x, y)/∂(u, v)).
- Assumptions: Continuously differentiable functions, nonzero Jacobian at the point (Inverse Function Theorem).
- Derivation: From the chain rule applied to identity mappings: ∂(x, y)/∂(x, y) = [∂(x, y)/∂(u, v)] [∂(u, v)/∂(x, y)] = I, so determinants multiply to 1.
- Diagram to draw: Two planes: (u, v)-plane on left with a small rectangle Δu by Δv; mapped to the (x, y)-plane on right as a small parallelogram. Label sides and show area scaling by |Jacobian|.
- Change of variables in double integrals
- Statement: Let R_u be a region in the (u, v)-plane and x = x(u, v), y = y(u, v) a one-to-one C^1 transformation with continuous partial derivatives on R_u and nonzero Jacobian. Let R_x be its image in the (x, y)-plane. Then for an integrable function f, ∬{R_x} f(x, y) dA = ∬{R_u} f(x(u, v), y(u, v)) |∂(x, y)/∂(u, v)| du dv.
- Assumptions: One-to-one (or piecewise one-to-one) mapping, C^1 smoothness, nonzero Jacobian except possibly on a set of measure zero, and f integrable on R_x.
- Sketch of proof: Partition R_u into small rectangles; under the mapping they become approximately parallelograms with area |Jacobian| Δu Δv; sum and take limits.
- Standard coordinate transforms
- Polar coordinates in 2D: x = r cos θ, y = r sin θ; Jacobian |∂(x, y)/∂(r, θ)| = r. Area element: dA = r dr dθ. Typical ranges: r ≥ 0, 0 ≤ θ < 2π (adjust θ-interval to the region).
- Cylindrical coordinates in 3D: x = r cos θ, y = r sin θ, z = z; Jacobian = r. Volume element: dV = r dr dθ dz. Typical ranges: r ≥ 0, 0 ≤ θ < 2π, z ∈ ℝ (or as per region).
- Spherical coordinates in 3D (physics convention): x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ; Jacobian = ρ^2 sin φ. Volume element: dV = ρ^2 sin φ dρ dφ dθ. Typical ranges: ρ ≥ 0, 0 ≤ φ ≤ π, 0 ≤ θ < 2π.
- Diagram to draw for polar: Draw (x, y)-axes. Show a sector bounded by circles r and r + dr, and angles θ and θ + dθ. Label area ≈ r dr dθ.
- Error propagation via total differential
- Statement: For small measurement errors dx_i in variables x_i, the approximate error in f is df = Σ_i f_{x_i} dx_i. If errors are independent with bounds |dx_i| ≤ ε_i, then |df| ≤ Σ_i |f_{x_i}| ε_i at the operating point.
- Assumptions: Small errors, differentiability.
Formulas
df = f_x dx + f_y dy
- df: total differential of f (unit: same as f), f_x, f_y: partial derivatives (unit: unit of f per unit of x or y), dx, dy: small changes in x, y (units of x, y). Applies when f is differentiable at (x, y).
dz/dt = f_x dx/dt + f_y dy/dt
- z = f(x, y), t: parameter (unit depends on context), dx/dt, dy/dt: rates (units of x or y per unit t). Applies when x(t), y(t), f are differentiable.
∂z/∂u_j = Σ_i (∂z/∂x_i)(∂x_i/∂u_j)
- General chain rule in components; units consistent through product of sensitivities and rates. Applies for differentiable functions.
∂(x, y)/∂(u, v) = | (∂x/∂u ∂x/∂v ; ∂y/∂u ∂y/∂v) |
- Jacobian determinant; unit: (unit of x·unit of y)/(unit of u·unit of v). Applies to differentiable transformations.
∂(u, v)/∂(x, y) = 1 / [∂(x, y)/∂(u, v)]
- Jacobian of inverse mapping when inverse exists; applies under Inverse Function Theorem assumptions.
∬_R f(x, y) dA = ∬_{R'} f(x(u, v), y(u, v)) |∂(x, y)/∂(u, v)| du dv
∭_{R_x} f(x, y, z) dV = ∭_{R_u} f(x(u, v, w), y(u, v, w), z(u, v, w)) |∂(x, y, z)/∂(u, v, w)| du dv dw
- Change of variables for double integrals; units: area element scales by Jacobian. Applies for one-to-one C^1 transforms with nonzero Jacobian.
x = r cos θ, y = r sin θ, dA = r dr dθ
- Polar coordinates; r in m, θ in rad; area element scaling r. Use for regions natural in circles/sectors.
x = r cos θ, y = r sin θ, z = z, dV = r dr dθ dz
- Cylindrical coordinates; r in m, θ in rad, z in m. Use for bodies with circular symmetry and height.
x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ, dV = ρ^2 sin φ dρ dφ dθ
- Spherical coordinates (ρ in m, φ polar angle in rad from +z, θ azimuth in rad). Use for spherical symmetry.
|ΔA_xy| ≈ |∂(x, y)/∂(u, v)| Δu Δv
- Area scaling for small elements; applies locally for small Δu, Δv.
|df| ≤ Σ_i |f_{x_i}| |dx_i|
- Error bound from total differential; applies for small errors and differentiability.
Worked examples
Example 1: Total derivative when variables depend on a parameter Given z = f(x, y) = x^2 y + e^{xy}, with x = x(t) = t^2 and y = y(t) = sin t. Find dz/dt at t = π/6.
Steps:
- Formula: dz/dt = f_x dx/dt + f_y dy/dt.
- Compute partials: f_x = 2xy + y e^{xy}; f_y = x^2 + x e^{xy}.
- Compute x, y, and rates at t = π/6: x = (π/6)^2 = π^2/36; y = sin(π/6) = 1/2; dx/dt = 2t → 2·(π/6) = π/3; dy/dt = cos t → cos(π/6) = √3/2.
- Evaluate partials at these values:
- f_x = 2·x·y + y e^{xy} = 2·(π^2/36)·(1/2) + (1/2) e^{(π^2/36)(1/2)} = (π^2/36) + (1/2) e^{π^2/72}.
- f_y = x^2 + x e^{xy} = (π^2/36)^2 + (π^2/36) e^{π^2/72} = π^4/1296 + (π^2/36) e^{π^2/72}.
- Combine: dz/dt = f_x (dx/dt) + f_y (dy/dt).
- f_x (dx/dt) = [ (π^2/36) + (1/2) e^{π^2/72} ] · (π/3) = (π^3/108) + (π/6) e^{π^2/72}.
- f_y (dy/dt) = [ π^4/1296 + (π^2/36) e^{π^2/72} ] · (√3/2) = (√3 π^4/2592) + (√3 π^2/72) e^{π^2/72}.
- Final answer: dz/dt = (π^3/108) + (π/6) e^{π^2/72} + (√3 π^4/2592) + (√3 π^2/72) e^{π^2/72}.
Answer: In exact form as above; numerics not required. Units: dimensionless here.
Example 2: Change of variables — polar coordinates in a disk Evaluate ∬_R (x^2 + y^2) dA where R is the unit disk x^2 + y^2 ≤ 1.
Steps:
- Choose polar coordinates: x = r cos θ, y = r sin θ, with Jacobian r and dA = r dr dθ.
- Region in polar: 0 ≤ r ≤ 1, 0 ≤ θ ≤ 2π.
- Integrand in polar: x^2 + y^2 = r^2.
- Set up integral: ∬R (x^2 + y^2) dA = ∫{θ=0}^{2π} ∫{r=0}^{1} r^2 · r dr dθ = ∫{0}^{2π} ∫_{0}^{1} r^3 dr dθ.
- Compute inner integral: ∫{0}^{1} r^3 dr = [r^4/4]{0}^{1} = 1/4.
- Compute outer integral: ∫_{0}^{2π} (1/4) dθ = (1/4)·(2π) = π/2.
Final answer: ∬_R (x^2 + y^2) dA = bold π/2.
Example 3: Jacobian and inverse Jacobian for a non-linear transform Given u = x y and v = x/y (assume y ≠ 0), find ∂(u, v)/∂(x, y) and ∂(x, y)/∂(u, v). Express the latter also in terms of u, v.
Steps:
- Compute ∂(u, v)/∂(x, y):
- ∂u/∂x = y, ∂u/∂y = x; ∂v/∂x = 1/y, ∂v/∂y = −x/y^2.
- Jacobian determinant: ∂(u, v)/∂(x, y) = | y x ; 1/y −x/y^2 | = y·(−x/y^2) − x·(1/y) = −x/y − x/y = −2x/y.
- Use inverse relation for Jacobians: ∂(x, y)/∂(u, v) = 1 / [∂(u, v)/∂(x, y)] = − y/(2x).
- Express in terms of u, v. From u = x y and v = x/y, solve: x = √(u v), y = √(u/v) (taking principal positive branch for definiteness where x, y > 0).
- Then y/x = 1/v, so ∂(x, y)/∂(u, v) = −(1)/(2v).
Final answers:
- ∂(u, v)/∂(x, y) = −2x/y.
- ∂(x, y)/∂(u, v) = − y/(2x) = − 1/(2v) (on the branch x, y > 0).
Example 4 (optional style seen in exams): Error propagation For f(x, y) = x y^2 at (x, y) = (2.00, 3.00), with measurement errors |dx| ≤ 0.01, |dy| ≤ 0.02, estimate the maximum error in f.
Steps:
- Total differential: df = f_x dx + f_y dy; f_x = y^2, f_y = 2xy.
- Evaluate at (2, 3): f_x = 9, f_y = 12.
- Error bound: |df| ≤ |f_x||dx| + |f_y||dy| = 9·0.01 + 12·0.02 = 0.09 + 0.24 = 0.33.
Final answer: Maximum estimated error in f is bold 0.33 (units of f).
Common mistakes
- Dropping the Jacobian factor in change of variables, leading to wrong scaling of the integral.
- Using Jacobian without absolute value in area/volume integrals, causing sign errors.
- Wrong limits after transformation: Mapping region R incorrectly into new coordinates; not sketching to confirm bounds.
- Mixing up spherical angle conventions (φ vs θ), causing wrong Jacobian and limits.
- Assuming existence of inverse mapping without checking Jacobian ≠ 0 and one-to-one behavior in the region.
- Treating df as a finite change instead of an approximation for small changes; using it for large increments without caution.
For your exam
- Derivations: Derive dz/dt = f_x dx/dt + f_y dy/dt from df; derive ∂(u, v)/∂(x, y) · ∂(x, y)/∂(u, v) = 1; derive area scaling via small-element mapping to a parallelogram.
- Numericals: Compute dz/dt for given f, x(t), y(t) at a specified t; evaluate a double/triple integral by switching to polar/cylindrical/spherical coordinates; compute a Jacobian for a given transformation and use it to change variables.
- Diagrams: Mapping of a small rectangle in (u, v) to a parallelogram in (x, y) with labeled sides and area; region mapping showing old and new limits; polar sector element with area r dr dθ.
- Full-marks answers: State assumptions; write the correct formula before substituting numbers; carry units where applicable; show limits transformation clearly with a labeled sketch; justify absolute value in Jacobian for integrals; simplify to exact values when possible.
Quick check
- If z = f(x, y) with x = x(t), y = y(t), write the formula for dz/dt.
- What is the Jacobian ∂(x, y)/∂(r, θ) for x = r cos θ, y = r sin θ? What is dA in polar coordinates?
- State the change of variables formula for ∬ f(x, y) dA under x = x(u, v), y = y(u, v), and one key assumption.
Answers: (1) dz/dt = f_x dx/dt + f_y dy/dt. (2) Jacobian = r; dA = r dr dθ. (3) ∬R f(x, y) dA = ∬{R'} f(x(u, v), y(u, v)) |∂(x, y)/∂(u, v)| du dv; assumption: one-to-one C^1 mapping with nonzero Jacobian.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?