Several Variable Calculus UNSW Lecture Notes

Chapter 7: Several Variable Calculus - Introduction

  • Conceptual Overview: Many mathematical problems require more than one input variable to be described adequately.
  • Finance Application Example: In mathematical finance, the value V\text{V} of an option depends on several parameters: current price (S\text{S}), volatility (ω\omega), time value (ϵ\epsilon), risk-free interest rate (r\text{r}), and more, expressed as V = V(S, heta, ho, r, K, q, ext{…}).
  • The "Greeks": These are sensitivities of V\text{V} to underlying parameters, represented by Greek letters. Mathematically, they are derivatives of V\text{V} with respect to specific variables.
  • Complexity of Several Variables:     * The space of allowable parameters may be more complex than a simple interval in R\mathbb{R}.     * Visualization is more difficult.     * In R\mathbb{R}, movement is limited to left or right (larger or smaller); in Rn\mathbb{R}^n, a point can be approached from infinitely many directions, meaning limits are no longer restricted to left and right.

Graphs of Multi-Variable Functions

  • Graph Definitions:     * For a function f:RRf : \mathbb{R} \rightarrow \mathbb{R}, the graph is the subset graph(f)=(x,y)R2:y=f(x)\text{graph}(f) = {(x, y) \in \mathbb{R}^2 : y = f(x)}.     * For a function g:RnRg : \mathbb{R}^n \rightarrow \mathbb{R}, the graph is graph(g)=(x,z)Rn+1:z=g(x)\text{graph}(g) = {(x, z) \in \mathbb{R}^{n+1} : z = g(x)}.
  • Dimensional Constraints: Graphs where n > 2 cannot be drawn using standard 3D visualization techniques.     * Two variables (x,yx, y) typically represent a curve in a plane, such as the circle x2+y2=4x^2 + y^2 = 4.     * Three variables (x,y,zx, y, z) typically represent a surface in 3D, such as the sphere x2+y2+z2=4x^2 + y^2 + z^2 = 4.
  • Level Curves and Contour Maps: Surfaces can be represented via contour maps where h(x,y)=height at position (x,y)h(x, y) = \text{height at position } (x, y). The level curves are equations h(x,y)=ch(x, y) = c for various constants cc.
  • Example Function: For f(x,y)=sin(x2+y2)f(x, y) = \sin(x^2 + y^2), the graph is the surface graph(f)=(x,y,z)R3:z=f(x,y)\text{graph}(f) = {(x, y, z) \in \mathbb{R}^3 : z = f(x, y)}.

Partial Differentiation

  • Informal Definition: For a function of several independent variables x1,x2,ext,xnx_1, x_2, ext{…}, x_n, the partial derivative with respect to xix_i (fxif_{x_i} or fxi\frac{\partial f}{\partial x_i}) is calculated by treating all variables except xix_i as constants.
  • Notation Distinction: The partial symbol \partial is used for functions of more than one independent variable. The symbol dd is used for single variable or implicit functions (e.g., x2+3xy+y4=4x^2 + 3xy + y^4 = 4 defines yy implicitly as a function of xx).
  • Geometric Interpretation:     * If we fix y=y0y = y_0, we obtain a cross-section function cy0(x)=f(x,y0)c_{y_0}(x) = f(x, y_0). The partial derivative fx(x0,y0)\frac{\partial f}{\partial x}(x_0, y_0) is the slope of this curve in the xx-direction.     * If we fix x=x0x = x_0, we obtain a cross-section dx0(y)=f(x0,y)d_{x_0}(y) = f(x_0, y). The partial derivative fy(x0,y0)\frac{\partial f}{\partial y}(x_0, y_0) is the rate of change in the yy-direction.
  • Formal Definition:     * fxi(x)=limh0f(x1,x2,,xi+h,,xn)f(x1,x2,,xn)h\frac{\partial f}{\partial x_i}(\mathbf{x}) = \lim_{h \to 0} \frac{f(x_1, x_2, \dots, x_i + h, \dots, x_n) - f(x_1, x_2, \dots, x_n)}{h}, provided the limit exists.
  • Example 1 Calculation:     1. f(x,y)=xcos(xy)f(x, y) = x \cos(xy).     2. g(x,y,z)=xy+sin(x2z)+y2ezg(x, y, z) = xy + \sin(x^2 z) + y^2 e^z.
  • Higher Order Derivatives:     * Fractional notation: 2fxy=x(fy)\frac{\partial^2 f}{\partial x \partial y} = \frac{\partial}{\partial x} (\frac{\partial f}{\partial y}).     * Subscript notation (sequential from inside out): fxy=(fx)<em>y=2fyxf_{xy} = (f_x)<em>y = \frac{\partial^2 f}{\partial y \partial x}.     * Schwarz’s Theorem: If the partial derivatives of f:R2Rf : \mathbb{R}^2 \rightarrow \mathbb{R} up to and including second order are continuous, then f</em>xy(x,y)=fyx(x,y)f</em>{xy}(x, y) = f_{yx}(x, y).

Continuity in Several Variables

  • Definition: A function f:R2Rf : \mathbb{R}^2 \rightarrow \mathbb{R} is continuous at x<em>0=(x0,y0)\mathbf{x}<em>0 = (x_0, y_0) if lim</em>xx0f(x)\lim</em>{\mathbf{x} \to \mathbf{x}_0} f(\mathbf{x}) exists and equals f(x0)f(\mathbf{x}_0).
  • Path Dependency: Limits in Rn\mathbb{R}^n are more complex. For a limit to exist, it must be the same regardless of the path taken to reach the point.
  • Example 4 (Discontinuity): Let f(x,y)=2x2yx4+y2f(x, y) = \frac{2x^2 y}{x^4 + y^2} at x0=(0,0)\mathbf{x}_0 = (0, 0).     * Approaching along y=xy = x: f(x,x)=2x3x4+x2=2xx2+10f(x, x) = \frac{2x^3}{x^4 + x^2} = \frac{2x}{x^2 + 1} \rightarrow 0 as x0x \rightarrow 0.     * Approaching along y=x2y = x^2: f(x,x2)=2x4x4+x4=2x42x4=1f(x, x^2) = \frac{2x^4}{x^4 + x^4} = \frac{2x^4}{2x^4} = 1.     * Since different paths yield different limits, the function is not continuous at (0,0)(0, 0).
  • General Rule: Any function composed of continuous single-variable functions is continuous on its domain, excluding points like division by zero or negative square roots.

The Tangent Plane

  • Concept: Just as a single variable function is approximated by a tangent line, a function of two variables f:R2Rf : \mathbb{R}^2 \rightarrow \mathbb{R} is approximated by a two-dimensional tangent plane.
  • Cartesian Equation: If fxf_x and fyf_y exist and are continuous at (x0,y0)(x_0, y_0), the tangent plane is:     * z=f(x0,y0)+fx(x0,y0)(xx0)+fy(x0,y0)(yy0)z = f(x_0, y_0) + f_x(x_0, y_0)(x - x_0) + f_y(x_0, y_0)(y - y_0).
  • Parametric Vector Form: The plane passes through a=(x0,y0,f(x0,y0))T\mathbf{a} = (x_0, y_0, f(x_0, y_0))^T and is spanned by vectors v1=(1,0,fx(x0,y0))T\mathbf{v}_1 = (1, 0, f_x(x_0, y_0))^T and v2=(0,1,fy(x0,y0))T\mathbf{v}_2 = (0, 1, f_y(x_0, y_0))^T:     * x=(x0 y0 f(x0,y0))+ω1(1 0 fx(x0,y0))+ω2(0 1 fy(x0,y0))\mathbf{x} = \begin{pmatrix} x_0 \ y_0 \ f(x_0, y_0) \end{pmatrix} + \omega_1 \begin{pmatrix} 1 \ 0 \ f_x(x_0, y_0) \end{pmatrix} + \omega_2 \begin{pmatrix} 0 \ 1 \ f_y(x_0, y_0) \end{pmatrix}.
  • Point-Normal Form: The normal vector n=v1×v2=(fx(x0,y0),fy(x0,y0),1)T\mathbf{n} = \mathbf{v}_1 \times \mathbf{v}_2 = (-f_x(x_0, y_0), -f_y(x_0, y_0), 1)^T.     * n(xa)=0\mathbf{n} \cdot (\mathbf{x} - \mathbf{a}) = 0.

The Gradient Vector and Optimization

  • Definition: The gradient of f:RnRf : \mathbb{R}^n \rightarrow \mathbb{R} is the vector f(x)=(fx1,fx2,,fxn)T\nabla f(\mathbf{x}) = (\frac{\partial f}{\partial x_1}, \frac{\partial f}{\partial x_2}, \dots, \frac{\partial f}{\partial x_n})^T.
  • Total Differential Approximation: For x\mathbf{x} near x0\mathbf{x}_0, f(x)f(x0)+f(x0)(xx0)f(\mathbf{x}) \approx f(\mathbf{x}_0) + \nabla f(\mathbf{x}_0) \cdot (\mathbf{x} - \mathbf{x}_0).     * f(x)f(\mathbf{x}) changes fastest when (xx0)(\mathbf{x} - \mathbf{x}_0) is parallel to f(x0)\nabla f(\mathbf{x}_0).     * f(x)f(\mathbf{x}) is constant when (xx0)(\mathbf{x} - \mathbf{x}_0) is orthogonal to f(x0)\nabla f(\mathbf{x}_0).
  • Local Maxima and Minima: Similar to looking for f(x)=0f'(x) = 0 in single variables, we seek points where the tangent plane is flat: f(x,y)=(0,0)\nabla f(x, y) = (0, 0), which implies fx=0f_x = 0 and fy=0f_y = 0.

Chain Rules

  • Case 1 (Function of one variable tt): If z=f(x,y)z = f(x, y) where x=g(t)x = g(t) and y=h(t)y = h(t), then:     * dzdt=fxdxdt+fydydt\frac{dz}{dt} = \frac{\partial f}{\partial x} \frac{dx}{dt} + \frac{\partial f}{\partial y} \frac{dy}{dt}.
  • Case 2 (Function of two variables s,ts, t): If z=f(x,y)z = f(x, y) where x=g(s,t)x = g(s, t) and y=h(s,t)y = h(s, t), then:     * zs=fxxs+fyys\frac{\partial z}{\partial s} = \frac{\partial f}{\partial x} \frac{\partial x}{\partial s} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial s}.     * zt=fxxt+fyyt\frac{\partial z}{\partial t} = \frac{\partial f}{\partial x} \frac{\partial x}{\partial t} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial t}.

Directional Derivatives

  • Definition: The directional derivative of f:R2Rf : \mathbb{R}^2 \rightarrow \mathbb{R} in the direction of a unit vector v=(a,b)T\mathbf{v} = (a, b)^T is:     * Dvf(x,y)=limh0f(x+ah,y+bh)f(x,y)hD_{\mathbf{v}} f(x, y) = \lim_{h \to 0} \frac{f(x + ah, y + bh) - f(x, y)}{h}.
  • Formula using Gradient: For a unit vector v\mathbf{v}, Dvf=fvD_{\mathbf{v}} f = \nabla f \cdot \mathbf{v}.
  • Basis Vectors: The directional derivatives in the direction of standard basis vectors e1e_1 and e2e_2 correspond exactly to the partial derivatives fxf_x and fyf_y.

Level Curves and Hypersurfaces

  • Normal to Level Curve: For F(x,y)=0F(x, y) = 0, the gradient F(x0,y0)\nabla F(x_0, y_0) is normal to the curve at the point (x0,y0)(x_0, y_0).
  • Level Surface: The graph z=f(x,y)z = f(x, y) can be written as F(x,y,z)=f(x,y)z=0F(x, y, z) = f(x, y) - z = 0. The normal vector is F=(fx,fy,1)T\nabla F = (f_x, f_y, -1)^T.

The Jacobian Matrix

  • Definition: For a function f:RnRmf : \mathbb{R}^n \rightarrow \mathbb{R}^m, the Jacobian matrix Df(x)Df(\mathbf{x}) is the matrix of partial derivatives where [Df]ij=fixj[Df]_{ij} = \frac{\partial f_i}{\partial x_j}.
  • General Chain Rule: D(fg)(x)=Df(g(x))Dg(x)D(f \circ g)(\mathbf{x}) = Df(g(\mathbf{x})) Dg(\mathbf{x}).
  • Applications:     * Inverse Function Theorem: D(g1)(x)=[Dg(g1(x))]1D(g^{-1})(\mathbf{x}) = [Dg(g^{-1}(\mathbf{x}))]^{-1}.     * Change of Variables: When transforming a region ARnA \subset \mathbb{R}^n via gg, the integral is adjusted by the determinant of the Jacobian: Af(g(x))det(Dg)(x)dx=g(A)f(u)du\int_A f(g(\mathbf{x})) |\det(Dg)(\mathbf{x})| d\mathbf{x} = \int_{g(A)} f(\mathbf{u}) d\mathbf{u}.

Leibniz’s Rule

  • Theorem: If f:R2Rf : \mathbb{R}^2 \rightarrow \mathbb{R} is continuous and fy\frac{\partial f}{\partial y} is continuous, then the derivative of the integral with respect to the parameter yy is:     * ddyabf(x,y)dx=abfy(x,y)dx\frac{d}{dy} \int_a^b f(x, y) dx = \int_a^b \frac{\partial f}{\partial y} (x, y) dx.
  • Example Application: This rule helps calculate complex integrals by differentiating under the integral sign relative to a constant parameter yy.

Discussion of Example 15

  • Problem: Find I=0π/4sin2(x)(cos2(x)+4sin2(x))2dxI = \int_0^{\pi/4} \frac{\sin^2(x)}{(\cos^2(x) + 4\sin^2(x))^2} dx.
  • Method:     1. Consider A(y)=0π/41cos2(x)+y2sin2(x)dxA(y) = \int_0^{\pi/4} \frac{1}{\cos^2(x) + y^2 \sin^2(x)} dx.     2. Note that y1cos2(x)+y2sin2(x)=2ysin2(x)(cos2(x)+y2sin2(x))2\frac{\partial}{\partial y} \frac{1}{\cos^2(x) + y^2 \sin^2(x)} = \frac{-2y \sin^2(x)}{(\cos^2(x) + y^2 \sin^2(x))^2}.     3. By Leibniz's Rule: A(y)=0π/42ysin2(x)(cos2(x)+y2sin2(x))2dxA'(y) = \int_0^{\pi/4} \frac{-2y \sin^2(x)}{(\cos^2(x) + y^2 \sin^2(x))^2} dx.     4. Evaluating A(y)A(y): Divide num/den by cos2(x)\cos^2(x) to use sec2(x)1+y2tan2(x)dx\int \frac{\sec^2(x)}{1 + y^2 \tan^2(x)} dx.     5. Let u=ytan(x)u = y \tan(x), then A(y)=1y0y11+u2du=tan1(y)yA(y) = \frac{1}{y} \int_0^y \frac{1}{1+u^2} du = \frac{\tan^{-1}(y)}{y}.     6. Finding A(y)=y1+y2tan1(y)y2A'(y) = \frac{\frac{y}{1+y^2} - \tan^{-1}(y)}{y^2}.     7. Setting y=2y = 2, the integral I=A(2)4I = -\frac{A'(2)}{4}.     8. Final calculation: I=18[tan1(2)25]I = \frac{1}{8} [\tan^{-1}(2) - \frac{2}{5}].