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 of an option depends on several parameters: current price (S), volatility (ω), time value (ϵ), risk-free interest rate (r), and more, expressed as V = V(S, heta,
ho, r, K, q, ext{…}).
- The "Greeks": These are sensitivities of V to underlying parameters, represented by Greek letters. Mathematically, they are derivatives of 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.
* Visualization is more difficult.
* In R, movement is limited to left or right (larger or smaller); in Rn, 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:R→R, the graph is the subset graph(f)=(x,y)∈R2:y=f(x).
* For a function g:Rn→R, the graph is graph(g)=(x,z)∈Rn+1:z=g(x).
- Dimensional Constraints: Graphs where n > 2 cannot be drawn using standard 3D visualization techniques.
* Two variables (x,y) typically represent a curve in a plane, such as the circle x2+y2=4.
* Three variables (x,y,z) typically represent a surface in 3D, such as the sphere x2+y2+z2=4.
- Level Curves and Contour Maps: Surfaces can be represented via contour maps where h(x,y)=height at position (x,y). The level curves are equations h(x,y)=c for various constants c.
- Example Function: For f(x,y)=sin(x2+y2), the graph is the surface graph(f)=(x,y,z)∈R3:z=f(x,y).
Partial Differentiation
- Informal Definition: For a function of several independent variables x1,x2,ext…,xn, the partial derivative with respect to xi (fxi or ∂xi∂f) is calculated by treating all variables except xi as constants.
- Notation Distinction: The partial symbol ∂ is used for functions of more than one independent variable. The symbol d is used for single variable or implicit functions (e.g., x2+3xy+y4=4 defines y implicitly as a function of x).
- Geometric Interpretation:
* If we fix y=y0, we obtain a cross-section function cy0(x)=f(x,y0). The partial derivative ∂x∂f(x0,y0) is the slope of this curve in the x-direction.
* If we fix x=x0, we obtain a cross-section dx0(y)=f(x0,y). The partial derivative ∂y∂f(x0,y0) is the rate of change in the y-direction.
- Formal Definition:
* ∂xi∂f(x)=limh→0hf(x1,x2,…,xi+h,…,xn)−f(x1,x2,…,xn), provided the limit exists.
- Example 1 Calculation:
1. f(x,y)=xcos(xy).
2. g(x,y,z)=xy+sin(x2z)+y2ez.
- Higher Order Derivatives:
* Fractional notation: ∂x∂y∂2f=∂x∂(∂y∂f).
* Subscript notation (sequential from inside out): fxy=(fx)<em>y=∂y∂x∂2f.
* Schwarz’s Theorem: If the partial derivatives of f:R2→R up to and including second order are continuous, then f</em>xy(x,y)=fyx(x,y).
Continuity in Several Variables
- Definition: A function f:R2→R is continuous at x<em>0=(x0,y0) if lim</em>x→x0f(x) exists and equals f(x0).
- Path Dependency: Limits in Rn 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)=x4+y22x2y at x0=(0,0).
* Approaching along y=x: f(x,x)=x4+x22x3=x2+12x→0 as x→0.
* Approaching along y=x2: f(x,x2)=x4+x42x4=2x42x4=1.
* Since different paths yield different limits, the function is not continuous at (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:R2→R is approximated by a two-dimensional tangent plane.
- Cartesian Equation: If fx and fy exist and are continuous at (x0,y0), the tangent plane is:
* z=f(x0,y0)+fx(x0,y0)(x−x0)+fy(x0,y0)(y−y0).
- Parametric Vector Form: The plane passes through a=(x0,y0,f(x0,y0))T and is spanned by vectors v1=(1,0,fx(x0,y0))T and v2=(0,1,fy(x0,y0))T:
* x=(x0 y0 f(x0,y0))+ω1(1 0 fx(x0,y0))+ω2(0 1 fy(x0,y0)).
- Point-Normal Form: The normal vector n=v1×v2=(−fx(x0,y0),−fy(x0,y0),1)T.
* n⋅(x−a)=0.
The Gradient Vector and Optimization
- Definition: The gradient of f:Rn→R is the vector ∇f(x)=(∂x1∂f,∂x2∂f,…,∂xn∂f)T.
- Total Differential Approximation: For x near x0, f(x)≈f(x0)+∇f(x0)⋅(x−x0).
* f(x) changes fastest when (x−x0) is parallel to ∇f(x0).
* f(x) is constant when (x−x0) is orthogonal to ∇f(x0).
- Local Maxima and Minima: Similar to looking for f′(x)=0 in single variables, we seek points where the tangent plane is flat: ∇f(x,y)=(0,0), which implies fx=0 and fy=0.
Chain Rules
- Case 1 (Function of one variable t): If z=f(x,y) where x=g(t) and y=h(t), then:
* dtdz=∂x∂fdtdx+∂y∂fdtdy.
- Case 2 (Function of two variables s,t): If z=f(x,y) where x=g(s,t) and y=h(s,t), then:
* ∂s∂z=∂x∂f∂s∂x+∂y∂f∂s∂y.
* ∂t∂z=∂x∂f∂t∂x+∂y∂f∂t∂y.
Directional Derivatives
- Definition: The directional derivative of f:R2→R in the direction of a unit vector v=(a,b)T is:
* Dvf(x,y)=limh→0hf(x+ah,y+bh)−f(x,y).
- Formula using Gradient: For a unit vector v, Dvf=∇f⋅v.
- Basis Vectors: The directional derivatives in the direction of standard basis vectors e1 and e2 correspond exactly to the partial derivatives fx and fy.
Level Curves and Hypersurfaces
- Normal to Level Curve: For F(x,y)=0, the gradient ∇F(x0,y0) is normal to the curve at the point (x0,y0).
- Level Surface: The graph z=f(x,y) can be written as F(x,y,z)=f(x,y)−z=0. The normal vector is ∇F=(fx,fy,−1)T.
The Jacobian Matrix
- Definition: For a function f:Rn→Rm, the Jacobian matrix Df(x) is the matrix of partial derivatives where [Df]ij=∂xj∂fi.
- General Chain Rule: D(f∘g)(x)=Df(g(x))Dg(x).
- Applications:
* Inverse Function Theorem: D(g−1)(x)=[Dg(g−1(x))]−1.
* Change of Variables: When transforming a region A⊂Rn via g, the integral is adjusted by the determinant of the Jacobian: ∫Af(g(x))∣det(Dg)(x)∣dx=∫g(A)f(u)du.
Leibniz’s Rule
- Theorem: If f:R2→R is continuous and ∂y∂f is continuous, then the derivative of the integral with respect to the parameter y is:
* dyd∫abf(x,y)dx=∫ab∂y∂f(x,y)dx.
- Example Application: This rule helps calculate complex integrals by differentiating under the integral sign relative to a constant parameter y.
Discussion of Example 15
- Problem: Find I=∫0π/4(cos2(x)+4sin2(x))2sin2(x)dx.
- Method:
1. Consider A(y)=∫0π/4cos2(x)+y2sin2(x)1dx.
2. Note that ∂y∂cos2(x)+y2sin2(x)1=(cos2(x)+y2sin2(x))2−2ysin2(x).
3. By Leibniz's Rule: A′(y)=∫0π/4(cos2(x)+y2sin2(x))2−2ysin2(x)dx.
4. Evaluating A(y): Divide num/den by cos2(x) to use ∫1+y2tan2(x)sec2(x)dx.
5. Let u=ytan(x), then A(y)=y1∫0y1+u21du=ytan−1(y).
6. Finding A′(y)=y21+y2y−tan−1(y).
7. Setting y=2, the integral I=−4A′(2).
8. Final calculation: I=81[tan−1(2)−52].