🌱 Tony's Memex Tony's Intertwingled Memex
Digital Garden | OER Curriculum
Home / Digital Garden / Differentials and Error Propagation

Differentials and Error Propagation

Core Definition

For a differentiable function z=f(x,y)z = f(x, y), let dx=Δxdx = \Delta x and dy=Δydy = \Delta y represent small independent changes (differentials) in the input variables. The total differential dzdz (or dfdf) is defined as:

  1. Total Differential Equation:
    dz=∂f∂xdx+∂f∂ydy=fx(x,y)dx+fy(x,y)dydz = \frac{\partial f}{\partial x} dx + \frac{\partial f}{\partial y} dy = f_x(x, y) dx + f_y(x, y) dy
  2. Increment Approximation:
    Δz=f(x+Δx,y+Δy)−f(x,y)≈dz\Delta z = f(x + \Delta x, y + \Delta y) - f(x, y) \approx dz
  3. Maximum Absolute Error Bound:
    ∣Δz∣≲∣dz∣max⁡=∣∂f∂x∣∣dx∣+∣∂f∂y∣∣dy∣|\Delta z| \lesssim |dz|_{\max} = \left|\frac{\partial f}{\partial x}\right| |dx| + \left|\frac{\partial f}{\partial y}\right| |dy|
  4. Relative and Percentage Error:
    Relative Error=dzz,Percentage Error=dzz×100%\text{Relative Error} = \frac{dz}{z}, \quad \text{Percentage Error} = \frac{dz}{z} \times 100\%

Concept Explanation

Geometric Distinction: Δz\Delta z versus dzdz

Understanding the fundamental difference between the true increment Δz\Delta z and the differential dzdz is essential in engineering error analysis:

  • Δz\Delta z (True Increment): The actual vertical change in height measured directly along the curved surface z=f(x,y)z = f(x, y) as the input moves from (x0,y0)(x_0, y_0) to (x0+Δx,y0+Δy)(x_0 + \Delta x, y_0 + \Delta y).
  • dzdz (Total Differential): The vertical change in height measured along the flat tangent plane at (x0,y0)(x_0, y_0).

Because the tangent plane is the best linear approximation to the surface, dzdz closely tracks Δz\Delta z for small variations in dxdx and dydy. As dx,dy→0dx, dy \to 0, the discrepancy between Δz\Delta z and dzdz shrinks faster than the distance (Δx)2+(Δy)2\sqrt{(\Delta x)^2 + (\Delta y)^2}.

             ^ z
             |                     . True Surface point (z + \Delta z)
             |                    /
             |                   /|  \Delta z (True change)
             |      dz          / |
             |   +-------------+  |
             |  /|             |  |
             | / | dz          |  . Tangent plane point (z + dz)
             |/  |             | /
             +---|-------------+/--------------> y
             |   (x_0, y_0)    (x_0 + dx, y_0 + dy)
             v x

Physical Sensitivity and Sensitivity Coefficients

In engineering systems, output performance zz depends on several independently measured inputs (x,y)(x, y). The partial derivatives in the total differential formula act as sensitivity coefficients:

dz=(∂f∂x)⏟Sensitivity to xdx+(∂f∂y)⏟Sensitivity to ydydz = \underbrace{\left(\frac{\partial f}{\partial x}\right)}_{\text{Sensitivity to } x} dx + \underbrace{\left(\frac{\partial f}{\partial y}\right)}_{\text{Sensitivity to } y} dy

A large magnitude for ∣∂f∂x∣|\frac{\partial f}{\partial x}| indicates that the system is hypersensitive to small perturbations or measurement errors in xx. Conversely, a small value indicates robustness against fluctuations in that variable. Engineers use this sensitivity weighting to decide where to invest in expensive high-precision instrumentation versus where cheaper sensors suffice.

Worst-Case Error Bounds (The Triangle Inequality)

When instruments measure physical parameters xx and yy with known manufacturing tolerances or measurement uncertainties ∣dx∣≤δx|dx| \le \delta_x and ∣dy∣≤δy|dy| \le \delta_y, the errors can have either positive or negative signs. In safety-critical engineering, we calculate the worst-case maximum absolute error by applying the Triangle Inequality, assuming the errors reinforce each other constructively:

∣dz∣=∣fxdx+fydy∣≤∣fx∣∣dx∣+∣fy∣∣dy∣≤∣fx∣δx+∣fy∣δy|dz| = \left|f_x dx + f_y dy\right| \le |f_x| |dx| + |f_y| |dy| \le |f_x| \delta_x + |f_y| \delta_y

Extension to Three or More Variables

For a system governed by nn variables w=f(x1,x2,…,xn)w = f(x_1, x_2, \dots, x_n):

dw=∑i=1n∂f∂xidxi=∂f∂x1dx1+∂f∂x2dx2+⋯+∂f∂xndxndw = \sum_{i=1}^n \frac{\partial f}{\partial x_i} dx_i = \frac{\partial f}{\partial x_1} dx_1 + \frac{\partial f}{\partial x_2} dx_2 + \dots + \frac{\partial f}{\partial x_n} dx_n
∣dw∣max⁡≤∑i=1n∣∂f∂xi∣δxi|dw|_{\max} \le \sum_{i=1}^n \left|\frac{\partial f}{\partial x_i}\right| \delta_{x_i}


Engineering Applications

  • Manufacturing Quality Assurance (QA/QC): Establishing dimensional tolerances on machined shafts, bolt diameters, and housing bores so that assembled clearances remain within safe operational limits.
  • Electrical Circuit Tolerance Analysis: Computing the total uncertainty in electrical power dissipation P=I2RP = I^2 R or resonant frequency ω=1LC\omega = \frac{1}{\sqrt{LC}} resulting from component manufacturing tolerances (±5%\pm 5\% resistors and capacitors).
  • Civil & Geotechnical Surveying: Propagating measurement inaccuracies from laser total stations (angle and distance errors) into computed boundary land areas and building foundation elevations.
  • Fluid Mechanics & Pipeline Metering: Calculating the propagated uncertainty in volumetric flow rate Q=πD4ΔP128μLQ = \frac{\pi D^4 \Delta P}{128 \mu L} (Hagen-Poiseuille equation) caused by pipe diameter manufacturing variations.

Example Problems

Example 1: Cylindrical Storage Tank Error Propagation

The volume of a cylindrical fluid storage tank is given by V(r,h)=πr2hV(r, h) = \pi r^2 h. The radius is measured as r=2.0 mr = 2.0\text{ m} with an uncertainty of ±0.02 m\pm 0.02\text{ m}, and height is measured as h=5.0 mh = 5.0\text{ m} with an uncertainty of ±0.05 m\pm 0.05\text{ m}.

  1. Compute the total differential dVdV.
  2. Estimate the maximum absolute error in the calculated volume.
  3. Determine the relative error dVV\frac{dV}{V} and percentage error.
Solution
  1. Compute Partial Derivatives:
    ∂V∂r=2πrh,∂V∂h=πr2\frac{\partial V}{\partial r} = 2\pi r h, \quad \frac{\partial V}{\partial h} = \pi r^2
    State the Total Differential Equation:
    dV=∂V∂rdr+∂V∂hdh=2πrh dr+πr2 dhdV = \frac{\partial V}{\partial r} dr + \frac{\partial V}{\partial h} dh = 2\pi r h \, dr + \pi r^2 \, dh
  2. Estimate Maximum Absolute Error at (r,h)=(2.0,5.0)(r, h) = (2.0, 5.0):
    ∂V∂r(2,5)=2π(2.0)(5.0)=20π\frac{\partial V}{\partial r}(2, 5) = 2\pi(2.0)(5.0) = 20\pi
    ∂V∂h(2,5)=π(2.0)2=4π\frac{\partial V}{\partial h}(2, 5) = \pi(2.0)^2 = 4\pi
    Applying worst-case tolerances ∣dr∣≤0.02 m|dr| \le 0.02\text{ m} and ∣dh∣≤0.05 m|dh| \le 0.05\text{ m}:
    ∣dV∣max⁡≤∣20π∣(0.02)+∣4π∣(0.05)=0.40π+0.20π=0.60π≈1.885 m3|dV|_{\max} \le |20\pi|(0.02) + |4\pi|(0.05) = 0.40\pi + 0.20\pi = 0.60\pi \approx 1.885\text{ m}^3
  3. Compute Relative and Percentage Error: Nominal volume: V(2,5)=π(2.0)2(5.0)=20π m3≈62.83 m3V(2, 5) = \pi(2.0)^2(5.0) = 20\pi\text{ m}^3 \approx 62.83\text{ m}^3.
    Relative Error=dVV=2πrh dr+πr2 dhπr2h=2drr+dhh\text{Relative Error} = \frac{dV}{V} = \frac{2\pi r h \, dr + \pi r^2 \, dh}{\pi r^2 h} = 2\frac{dr}{r} + \frac{dh}{h}
    dVV=2(0.022.0)+(0.055.0)=2(0.01)+0.01=0.02+0.01=0.030\frac{dV}{V} = 2\left(\frac{0.02}{2.0}\right) + \left(\frac{0.05}{5.0}\right) = 2(0.01) + 0.01 = 0.02 + 0.01 = 0.030
    Percentage Error=0.030×100%=3.0%\text{Percentage Error} = 0.030 \times 100\% = 3.0\%
    Engineering Takeaway: Notice that radius contributes twice as much relative error as height (2drr2 \frac{dr}{r} vs dhh\frac{dh}{h}) because radius is squared in the volume equation.

Example 2: Kinetic Energy Sensitivity in Mechanical Vehicles

The kinetic energy of a moving drone is K(m,v)=12mv2K(m, v) = \frac{1}{2} m v^2. A drone's mass is measured as m=4.0 kgm = 4.0\text{ kg} with an uncertainty of ±0.1 kg\pm 0.1\text{ kg}, and its velocity is measured as v=10.0 m/sv = 10.0\text{ m/s} with an uncertainty of ±0.2 m/s\pm 0.2\text{ m/s}. Estimate the percentage uncertainty in kinetic energy.

Solution
  1. Compute Total Differential:
    dK=∂K∂mdm+∂K∂vdv=(12v2)dm+(mv)dvdK = \frac{\partial K}{\partial m} dm + \frac{\partial K}{\partial v} dv = \left(\frac{1}{2}v^2\right) dm + (mv) dv
  2. Formulate Relative Error:
    dKK=12v2dm+mvdv12mv2=dmm+2dvv\frac{dK}{K} = \frac{\frac{1}{2}v^2 dm + mv dv}{\frac{1}{2}mv^2} = \frac{dm}{m} + 2\frac{dv}{v}
  3. Substitute Relative Uncertainties:
    dmm=0.14.0=0.025(2.5%)\frac{dm}{m} = \frac{0.1}{4.0} = 0.025 \quad (2.5\%)
    dvv=0.210.0=0.020(2.0%)\frac{dv}{v} = \frac{0.2}{10.0} = 0.020 \quad (2.0\%)
    dKK=0.025+2(0.020)=0.025+0.040=0.065  ⟹  6.5%\frac{dK}{K} = 0.025 + 2(0.020) = 0.025 + 0.040 = 0.065 \implies 6.5\%
    The maximum uncertainty in the calculated kinetic energy is approximately ±6.5%\pm 6.5\%.

Connections & References