Multivariable Functions and Partial DifferentiationIntroductionMany mechatronic systems depend simultaneously on several changing quantities. Temperature may vary with position, motor torque may depend on current and angular speed, and the position of a robot end-effector may depend on several joint angles. Engineering Mathematics I therefore extends single-variable calculus to functions of several independent variables. This chapter develops the mathematical tools used to model and analyze such systems: surfaces and level curves, partial and directional derivatives, gradients, total differentials, Jacobians, linearization, sensitivity analysis, and optimization. These tools support sensor calibration, robotic kinematics, thermal analysis, design optimization, and uncertainty evaluation. Learning ObjectivesBy the end of this chapter, students should be able to: - Interpret and represent functions of two or more variables.
- Compute and interpret partial, directional, and total derivatives.
- Use gradients to determine direction of greatest increase and construct tangent planes.
- Apply differentials and linearization to estimate changes and errors.
- Calculate and interpret Jacobian matrices and determinants.
- Analyze sensitivity and propagate small measurement uncertainties.
- Locate and classify stationary points of multivariable functions.
- Solve constrained optimization problems using Lagrange multipliers.
- Select suitable multivariable methods for engineering applications.
1. Functions of Several VariablesA function of two variables assigns one output to each admissible ordered pair: z = f(x,y) Here, x and y are independent variables, z is the dependent variable, and the domain is the set of permitted (x,y) pairs. The graph of f is a surface in three-dimensional Cartesian space. For a function of three variables, w = f(x,y,z), the graph generally lies in four-dimensional space and is usually studied through algebraic or graphical cross-sections. 1.1 Domains and rangesThe domain must exclude values that make an expression undefined. For example, the function f(x,y) = √(25 − x² − y²) is real-valued only when x² + y² ≤ 25. Its domain is a disk of radius 5, and its range is 0 ≤ f ≤ 5. Engineering variables may impose additional restrictions, such as nonnegative mass, absolute temperature, or positive resistance. 1.2 Level curves and level surfacesA level curve is obtained by setting the function equal to a constant: f(x,y) = c For example, the level curves of f(x,y) = x² + y² are circles x² + y² = c. They are useful contour representations of a surface. A temperature map, for example, may display curves connecting points of equal temperature. For a scalar field F(x,y,z), the equation F(x,y,z) = c defines a level surface. If F(x,y,z) = x² + y² + z², the level surfaces are spheres centered at the origin. 2. Limits and ContinuityThe limit lim_(x,y)→(a,b) f(x,y) = L means that f(x,y) approaches L as (x,y) approaches (a,b) from every possible direction. This directional requirement is stronger than in one-variable calculus. If two paths produce different limiting values, the limit does not exist. A function is continuous at (a,b) if it is defined there and lim_(x,y)→(a,b) f(x,y) = f(a,b) Polynomials are continuous everywhere; rational functions are continuous wherever their denominators are nonzero. Continuity is important in physical models because abrupt mathematical discontinuities may represent impossible or improperly idealized system behavior. 3. Partial DerivativesThe partial derivative with respect to x treats all other independent variables as constant: fx(x,y) = ∂f/∂x = lim_(h→0) [f(x+h,y) − f(x,y)]/h Similarly, fy(x,y) = ∂f/∂y = lim_(h→0) [f(x,y+h) − f(x,y)]/h The units of fx are output units per x-unit, and the units of fy are output units per y-unit. Partial derivatives describe local sensitivity while one independent variable changes and the others are held fixed. Worked Example 1: Partial derivativesLet the power model for a simplified actuator be P(I,ω) = R I² + kωI where P is power in watts, I is current in amperes, ω is angular speed in radians per second, R is resistance in ohms, and k is a torque-related constant with appropriate SI units. Then PI = 2RI + kω and P_ω = kI At a particular operating point, PI measures the local change in power per ampere when speed is fixed, while P_ω measures the local change in power per unit angular speed when current is fixed. 3.1 Higher-order partial derivativesSecond partial derivatives include fxx, fyy, fxy, and fyx. If the mixed derivatives are continuous in a neighborhood of a point, Clairaut’s theorem gives fxy = fyx The continuity condition matters; equality should not be assumed for every function without checking regularity. 4. Tangent Planes and LinearizationFor a differentiable surface z = f(x,y), the tangent plane at (a,b,f(a,b)) is z − f(a,b) = fx(a,b)(x − a) + fy(a,b)(y − b) The corresponding linearization is L(x,y) = f(a,b) + fx(a,b)(x − a) + fy(a,b)(y − b) This approximation is accurate when x and y are sufficiently close to a and b and f is differentiable near the point. It is not generally reliable far from the reference point or near singularities. Worked Example 2: LinearizationEstimate √(3.98² + 2.01²) using a nearby convenient point. Define f(x,y) = √(x² + y²) Choose (a,b) = (4,2). Then f(4,2) = √20 ≈ 4.4721. The partial derivatives are fx = x/√(x²+y²), fy = y/√(x²+y²) At (4,2), fx = 4/√20 ≈ 0.8944 and fy = 2/√20 ≈ 0.4472. With ∆x = −0.02 and ∆y = 0.01, ∆f ≈ fx∆x + fy∆y ≈ (0.8944)(−0.02) + (0.4472)(0.01) ≈ −0.013416 Thus the estimate is 4.4721 − 0.0134 ≈ 4.4587. The calculation illustrates how two small input changes contribute additively to the output change. 5. Total Differentials and Error EstimationIf z = f(x,y) is differentiable, its total differential is dz = fx dx + fy dy For small finite changes, ∆z ≈ dz. The differential is a first-order approximation, not an exact finite-change identity. For a function w = f(x,y,z), dw = fx dx + fy dy + fz dz Sensitivity interpretationThe coefficients of the differential quantify local sensitivity. A large absolute partial derivative means that a small change in that input can produce a comparatively large output change. However, sensitivity must be interpreted with units and operating ranges; derivatives with different units cannot be compared numerically without normalization. A useful dimensionless relative sensitivity of y to x is the elasticity Sx = (x/y)(∂y/∂x) provided x and y are nonzero. It estimates the percentage change in y resulting from a 1% change in x. Measurement-error estimateIf independent small uncertainties in x and y are represented by standard deviations σ_x and σ_y, a first-order variance approximation is σf² ≈ (fxσx)² + (fyσy)² For correlated measurements, include the covariance term: σf² ≈ (fxσx)² + (fyσy)² + 2fxfy Cov(x,y) These formulas assume a differentiable model and sufficiently small uncertainties. The independent form assumes zero covariance, not merely that the sensors are physically separate. 6. Directional Derivatives and the GradientThe gradient of a scalar field f(x,y) is ∇f = ⟨fx, fy⟩ For f(x,y,z), ∇f = ⟨fx, fy, fz⟩ For a unit vector û, the directional derivative is Du f = ∇f · û where û = u/||u||. The direction vector must be normalized; otherwise the result is the rate of change per unit length multiplied by the vector magnitude. The gradient points in the direction of maximum increase, and the maximum rate is ||∇f||. The direction of maximum decrease is −∇f. A direction perpendicular to the gradient produces zero first-order change. Consequently, ∇f is normal to a level curve or level surface. Worked Example 3: Directional derivativeLet T(x,y) = x² + 3y² represent temperature in degrees Celsius, with x and y measured in metres. At (1,2), ∇T = ⟨2x,6y⟩ = ⟨2,12⟩ °C/m The direction from (1,2) toward (4,6) is v = ⟨3,4⟩, so û = ⟨3/5,4/5⟩. Therefore, DuT = ⟨2,12⟩·⟨3/5,4/5⟩ = 54/5 = 10.8 °C/m The temperature increases at 10.8 °C per metre in that direction. The maximum local increase is √(2²+12²) = √148 ≈ 12.17 °C/m. 7. The Chain Rule for Several VariablesIf z = f(x,y) and x and y depend on t, then dz/dt = fx dx/dt + fy dy/dt If x = x(s,t) and y = y(s,t), then ∂z/∂s = fx ∂x/∂s + fy ∂y/∂s The chain rule is central to robotics and dynamic modeling because a measured output may depend indirectly on joint coordinates, actuator states, and time. 8. Jacobians and Coordinate TransformationsFor a vector-valued mapping u = u(x,y), v = v(x,y) the Jacobian matrix is J = ∂(u,v)/∂(x,y) = [ ux uy ; vx vy ] More generally, if F:ℝⁿ→ℝᵐ, its Jacobian is the m × n matrix of first partial derivatives. For small changes, ∆F ≈ J∆x The Jacobian maps small input displacements to small output displacements. In robot kinematics, it maps joint-rate vectors to end-effector velocity vectors. For a square two-dimensional transformation, the Jacobian determinant is ∂(u,v)/∂(x,y) = uxvy − uyvx Its absolute value describes local area scaling. A zero determinant indicates local loss of invertibility or a possible singularity, although further analysis may be needed to determine the global behavior. Polar-coordinate exampleFor x = r cosθ and y = r sinθ, ∂(x,y)/∂(r,θ) = r Thus, when changing variables in a double integral, dA = r dr dθ The factor r is required for area consistency and is not optional. 9. Critical Points and Unconstrained OptimizationA critical point of f(x,y) occurs where both first partial derivatives vanish or where a derivative does not exist: fx(a,b) = 0, fy(a,b) = 0 For a twice-differentiable function, define D = fxx(a,b)fyy(a,b) − [fxy(a,b)]² The second-derivative test is: - If D > 0 and fxx > 0, there is a local minimum.
- If D > 0 and fxx < 0, there is a local maximum.
- If D < 0, the point is a saddle point.
- If D = 0, the test is inconclusive.
A global optimum requires consideration of the entire domain, including boundaries and behavior at infinity. A local test alone cannot establish global optimality. Worked Example 4: Classifying a stationary pointLet f(x,y) = x² + 4xy + y² Then fx = 2x + 4y and fy = 4x + 2y. Solving both equal to zero gives (0,0). Also, fxx=2, fyy=2, fxy=4 Thus D = (2)(2) − 4² = −12 < 0. The origin is a saddle point, not a minimum, despite the first derivatives being zero. 10. Constrained OptimizationEngineering designs often have constraints such as fixed mass, allowable power, or prescribed geometry. To optimize f(x,y) subject to g(x,y)=c, use the Lagrangian L(x,y,λ) = f(x,y) − λ[g(x,y) − c] At a regular constrained stationary point, ∇f = λ∇g, g(x,y)=c The gradients are parallel because motion tangent to the constraint produces no first-order change in the objective at an optimum. The method requires differentiability and a regular constraint gradient; ∇g ≠ 0 is the usual regularity condition. For several constraints, write ∇f = λ1∇g1 + λ2∇g2 + ⋯. Inequality constraints require additional methods, such as the Karush–Kuhn–Tucker conditions, and should not be treated as ordinary equality constraints without checking active boundaries. Worked Example 5: Lagrange multiplierMaximize the area A = xy of a rectangle with fixed perimeter 20, so 2x+2y=20 or x+y=10. Let g=x+y. Then ∇A = ⟨y,x⟩, ∇g = ⟨1,1⟩ The condition ⟨y,x⟩ = λ⟨1,1⟩ gives x = y. Together with x + y = 10, x = y = 5. The maximum area is A = 25 square units. Positivity and the bounded constraint segment confirm that this is the global maximum for a physical rectangle. 11. Applied Case: Calibration of a Two-Axis Force SensorBackgroundConsider an illustrative two-axis force sensor whose measured output is modeled by V(Fx,Fy) = 0.80Fx + 0.50Fy + 0.02FxFy where force components are in newtons and V is an output voltage in volts. The model is valid only over the calibration range used to identify it. ProblemAt (Fx,Fy)=(10,6) N, determine the local sensitivity to each force component and estimate the voltage change for ∆Fx=0.10 N and ∆Fy=−0.20 N. Analysis and solutionThe partial derivatives are VFx = 0.80 + 0.02Fy VFy = 0.50 + 0.02Fx At the operating point, VFx=0.92 V/N, VFy=0.70 V/N The differential estimate is ∆V ≈ VFx∆Fx + VFy∆Fy = (0.92)(0.10) + (0.70)(−0.20) = −0.048 V Thus the output is expected to decrease by approximately 48 mV. The Jacobian for the scalar output is the row vector J = [0.92 0.70]. It can be used in a controller or estimator to translate small force perturbations into voltage changes. Outcome and learning pointsThe cross-term means that sensitivity to one force depends on the other force. A calibration performed at only one operating point may therefore be inadequate over a broad range. A robust engineering implementation should validate residual errors, specify the operating domain, account for sensor noise and drift, and avoid extrapolation beyond calibrated conditions. 12. Engineering Practice, Limitations, and Contemporary UseMultivariable calculus is used in robotic Jacobians, finite-element formulations, thermal gradients, optimization-based control, computer vision, and digital twins. Automatic differentiation software can compute derivatives accurately from computational models, while symbolic tools can simplify expressions. Numerical derivatives remain useful for black-box systems but may suffer from truncation and round-off errors. Best practice includes: - define variables, domains, units, and sign conventions before differentiating;
- normalize direction vectors in directional-derivative problems;
- check dimensions of differential and sensitivity equations;
- distinguish local from global conclusions;
- test boundaries in optimization problems;
- verify derivatives numerically when implementing software;
- report the operating point and validity range of linear models;
- quantify uncertainty rather than presenting excessive decimal precision.
AI-based optimization and automated model calibration do not remove the need for mathematical judgment. A derivative may be mathematically correct but physically meaningless outside the model’s valid range. Engineers remain responsible for constraints, safety margins, traceability, privacy of measured data, and validation against real hardware. Chapter SummaryFunctions of several variables model systems in which multiple inputs influence one or more outputs. Their domains, surfaces, level curves, and continuity provide the geometric and analytical foundation. Partial derivatives measure local change with selected variables held fixed, while the total differential combines simultaneous small changes. The gradient contains all first-order spatial sensitivity information for a scalar field. It points in the direction of greatest increase, is normal to level sets, and provides directional derivatives through a dot product. Linearization and tangent planes approximate nonlinear models near a reference point. Jacobians generalize derivatives to vector mappings and are essential for coordinate transformations and robotic velocity analysis. Stationary points are classified using the Hessian-based second-derivative test, but global optimization requires domain and boundary analysis. Lagrange multipliers handle smooth equality constraints by equating the objective gradient to a linear combination of constraint gradients. In engineering practice, these methods support calibration, uncertainty estimation, design optimization, and control, provided assumptions, units, validity ranges, and limitations are explicitly checked. Key TermsPartial derivative: Derivative with respect to one variable while other independent variables are held constant. Gradient: Vector of first partial derivatives of a scalar field. Directional derivative: Rate of change in a specified unit direction. Level curve: Set of points where a two-variable function has a constant value. Level surface: Set of points where a three-variable scalar field has a constant value. Tangent plane: Plane giving the best first-order approximation to a differentiable surface at a point. Linearization: Local linear approximation of a nonlinear function. Total differential: First-order expression combining changes in all independent variables. Sensitivity: Change in an output caused by a small change in an input. Elasticity: Dimensionless relative sensitivity. Jacobian matrix: Matrix containing first partial derivatives of a vector-valued function. Jacobian determinant: Determinant describing local scaling and invertibility of a square transformation. Critical point: Point where all relevant first partial derivatives vanish or fail to exist. Saddle point: Stationary point with increasing and decreasing directions. Hessian: Matrix of second-order partial derivatives. Unconstrained optimization: Optimization without explicit equality or inequality restrictions. Constrained optimization: Optimization subject to specified restrictions. Lagrange multiplier: Parameter used to solve smooth equality-constrained optimization problems. Covariance: Measure of joint variation between two uncertain quantities. Singularity: Point where a mapping loses local rank or invertibility. Review QuestionsShort Answer Questions- What is the difference between a partial derivative and a total derivative?
- Why must a direction vector be normalized before calculating a directional derivative?
- State the geometric meaning of the gradient.
- What information does a Jacobian matrix provide?
- Under what condition is the second-derivative test inconclusive?
Long Answer Questions- Explain level curves, gradients, and tangent planes using a temperature field as an engineering example.
- Derive the linearization formula for z=f(x,y) and discuss its assumptions.
- Explain how total differentials can be used for measurement-error estimation.
- Describe the Jacobian of a robot mapping from joint coordinates to end-effector coordinates.
- Explain the Lagrange multiplier method and why the gradients are parallel at a constrained optimum.
Analytical / Application Questions- For f(x,y)=x²+2xy+3y², find the stationary point and classify it using the second-derivative test.
- A sensor output is q=5ab, with a=2.0±0.01 and b=3.0±0.02, where uncertainties are independent. Estimate q and its first-order standard uncertainty.
- A mobile robot’s scalar cost function is C(x,y)=x²+y² subject to x+y=6. Use a suitable constrained-optimization method to determine the minimum-cost point.
Multiple Choice Questions with AnswersQuestion 1For f(x,y)=x²y+3y, what is fx? A. 2xy B. x²+3 C. 2xy+3 D. x²y Correct Answer: A. 2xy Question 2The gradient of a differentiable scalar field at a point is directed toward the A. greatest decrease B. greatest increase C. nearest level curve D. zero directional derivative Correct Answer: B. greatest increase Question 3If ∇f=⟨3,4⟩, the maximum directional derivative is A. 1 B. 4 C. 5 D. 7 Correct Answer: C. 5 Question 4For f(x,y)=x²+3y², the directional derivative at (1,2) toward ⟨3,4⟩ is A. 54/5 B. 12/5 C. 10 D. 15 Correct Answer: A. 54/5 Question 5The linearization of f(x,y) at (a,b) uses A. only second partial derivatives B. the function value and first partial derivatives at (a,b) C. values of f only on the boundary D. the Jacobian determinant only Correct Answer: B. the function value and first partial derivatives at (a,b) Question 6If u=u(x,y) and v=v(x,y), the Jacobian determinant is A. uxvx+uyvy B. uxvy-uyvx C. uyvx-uxvy D. ux+uy+vx+vy Correct Answer: B. uxvy-uyvx Question 7For f(x,y)=x²+4xy+y², the stationary point at the origin is a A. local maximum B. local minimum C. saddle point D. point of discontinuity Correct Answer: C. saddle point Question 8The standard first-order uncertainty formula without covariance assumes that the input uncertainties are A. identically zero B. perfectly correlated C. independent D. infinitely large Correct Answer: C. independent Question 9In the constraint method ∇f=λ∇g, the constraint is normally written as A. g=0 B. g=c C. ∇g=0 D. f=c Correct Answer: B. g=c Question 10For the polar transformation x=r cosθ, y=r sinθ, the area element is A. dr dθ B. r² dr dθ C. r dr dθ D. sinθ dr dθ Correct Answer: C. r dr dθ
|