Multivariable Functions

Published September 18, 2022 by Connor
Math
Multivariable Functions

These are calc 3 notes from sophmore year. I still got a C lol, I was gonna get an A but bombed the final and got like a 30%. Some equations might not show on mobile.

14.1 Functions of Two or More Variables

Functions with multiple variables are typically denoted as:
g(x,y,z)=c=x2+y2+z2g(x, y, z) = c = \sqrt{x^2 + y^2 + z^2}

Traces

A trace is freezing one coordinate on the function (typically x-coordinate, (x=a(x=a) and examining the resulting curve in 2 dimensions

Note: Vertical trace is where you freeze the y-axis (y=by=b), rather than x, to find your trace

Contour Map

Tracing the height of a map and projecting those shadows onto a plane below
f(x,y)=c;m=the contour intervalf(x, y)=c; \quad m=\text{the contour interval}

Saddle Point Contour Map

Rate of Change

average rate of change from P to Q=Δ altitudeΔ horizontal\text{average rate of change from P to Q}=\frac{\Delta \text{ altitude}}{\Delta \text{ horizontal}}

Isotherms

The coloring of certain areas within a 3D contour map to show the different height differences

14.3 Partial Derivatives:

Partial Derivative:

Finding the rates of change in respect to only one variable in the equation.
fx,fy\frac{\partial f}{\partial x}, \quad \frac{\partial f}{\partial y}
Concept: The idea behind partial derivaties is to find the derivative of only one variable to see how manipulation of that variable affects the rest of the equation. This is done by treating every variable as a constant except the one being integrated

Partial Derivative of variable x:
fx(a,b)=limh0f(a+h,b)f(a,b)hf_x(a, b)= \lim_{h\rightarrow 0}\frac{f(a+h,b)-f(a,b)}{h}
Partial Derivative of variable y:
fy(a,b)=limh0f(a,b+k)f(a,b)kf_y(a, b)= \lim_{h\rightarrow 0}\frac{f(a, b+k)-f(a,b)}{k}

Example :: Partial Derivative:

Compute the partial derivatives of f(x,y)=x2y5f(x,y) = x^2 y^5

  1. Compute the partial derivative of xx
    1. fx=x(x2y5)=y5(2x)=2xy5\frac{\partial f}{\partial x} = \frac{\partial}{\partial x} (x^2 y^5) = y^5(2x) = 2xy^5
  2. Compute the partial derivative of yy
    1. fy=y(x2y5)=(5y4)x2=5x2y4\frac{\partial f}{\partial y} = \frac{\partial}{\partial y} (x^2 y^5) = (5y^4)x^2 = 5x^2y^4
Clairaut’s Theorem

Equality of Mixed Partials
If fxyf_{xy} and fyxf_{yx} both exist and are continuous on a disk DD, then fxy(a,b)=fyx(a,b)f_{xy}(a, b)=f_{yx}(a, b) for all (a,b)D(a, b) \in D. Therefore, on D,
2fxy=2fyx\frac{\partial^2f}{\partial x \partial y}=\frac{\partial^2f}{\partial y \partial x}

Heat Equation

ut=2ux2\frac{\partial u}{\partial t}=\frac{\partial^2u}{\partial x^2}

14.4 Differentiability, Tangent Planes, and Linear Approximation

Differentiability and the Tangent Plane

Assume that f(x,y)f(x, y) is defined in a disk DD containing (a,b)(a, b) and that fx(a,b)f_x (a, b) and fy(a,b)f_y (a, b) exists. Let
L(x,y)=f(a,b)+fx(a,b)(xa)+fy(a,b)(yb)L(x, y)=f(a, b) + f_x (a, b)(x-a)+f_y(a, b)(y-b)

  • f(x, y) is differentiable at (a,b)(a, b) if
    lim(x,y)(a,b)f(x,y)L(x,y)(xa)2+(yb)2=0\lim_{(x,y)\rightarrow (a, b)} \frac{f(x, y)-L(x,y)}{\sqrt{(x-a)^2 + (y-b)^2}}=0
  • If f(x,y)f(x, y) is differentiable at (a,b)(a, b), then the tangent plane to the graph at (a,b,f(a,b))(a, b, f(a, b)) is the plane with equation z=L(x,y)z=L(x, y). Explicitly, the equation of the tangent plane is…
    z=f(a,b)+fx(a,b)(xa)+fy(a,b)(yb)z=f(a, b) + f_x (a, b)(x-a)+f_y(a, b)(y-b)

You can also write linear approximation as
Δffx(a,b)Δx+fy(a,b)Δy\Delta f \approx f_x (a, b) \Delta x + f_y (a, b) \Delta y

Differentials and Linear Approximation

Assume that ff is differentiable at (a,b)(a, b) and let dx=Δx,dy=Δydx= \Delta x, dy= \Delta y Then the differential dfdf is defined by
df=fx(x,y)dx+fy(x,y)dydf=f_x(x, y)dx + f_y(x, y)dy

Example :: Linear Approximation:

Use the Linear Approximation to f(x,y)=xyf(x, y)=\sqrt{\frac{x}{y}} at (81,16)(81, 16) to estimate 81.115.9\sqrt{\frac{81.1}{15.9}}

  1. Use the multivariable function: L(x,y)=f(a,b)+fx(a,b)(xa)+fy(a,b)(yb)L(x, y)=f(a, b) + f_x (a, b)(x-a)+f_y(a, b)(y-b)
  2. First we will solve for fxf_x
    1. fx(81,16)=12yx=1294=172f_x(81,16)=\frac{1}{2\sqrt{{y}}\sqrt{x}}=\frac{1}{2 \cdot 9 \cdot 4}=\frac{1}{72}
  3. Now we solve for fy(a,b)f_y(a, b)
    1. fy(81,16)=x2y3/2=812(16)3/2=9128f_y(81,16)=-\frac{\sqrt{x}}{2y^{3/2}}=-\frac{\sqrt{81}}{2(16)^{3/2}}=-\frac{9}{128}
  4. Now solve for f(x,y)f(x, y)
    1. f(81,16)=8116=2.25f(81, 16)=\sqrt{\frac{81}{16}}=2.25
  5. Now plug into the equation
    1.L(81.1,15.9)=2.25+172(81.181)9128(15.916)=2.2584L(81.1, 15.9)=2.25 + \frac{1}{72}(81.1-81)-\frac{9}{128}(15.9-16)=2.2584
Example :: Approximating change in function:

Let f(x,y)=x3y4f(x, y)=x^3y^{-4}. Use the equation Δffx(a,b)Δx+fy(a,b)Δy\Delta f \approx f_x(a, b) \Delta x + f_y(a, b) \Delta y to estimate Δf=f(1.04,0.97)f(1,1)\Delta f = f(1.04, 0.97) - f(1, 1) from the linear approximation formula.

  1. Plug in
    1. Δffx(a,b)Δx+fy(a,b)Δy3x2y4Δx4x3y5Δy\Delta f \approx f_x(a, b) \Delta x + f_y(a, b) \Delta y \approx 3x^2y^{-4} \Delta x -4x^3y^{-5} \Delta y
    2. 3(1)2(1)4Δx4(1)3(1)5Δy\approx 3(1)^2(1)^{-4} \Delta x -4(1)^3(1)^{-5} \Delta y
    3. Δx=1.041=.04Δy=0.971=.03\Delta x = 1.04 - 1 = .04 \quad \Delta y=0.97 - 1= -.03
    4. 3(1)2(1)4(.04)4(1)3(1)5(.03)=0.24\approx 3(1)^2(1)^{-4} (.04) -4(1)^3(1)^{-5} (-.03)=0.24

A person’s Body Mass Index is 𝐼=𝑊𝐻2𝐼=\frac{𝑊}{𝐻^2}, where 𝑊 is the body weight (in kilograms) and 𝐻 is the body height (in meters). A child has weight 𝑊=39 kg and height 𝐻=1.5 m. Use the linear approximation to estimate the change in 𝐼 if (𝑊,𝐻) changes to (41,1.53).

  1. Solve for IxI_x and IyI_y using the linear approximation formula
    1. Ix=1H2Iy=2WW3I_x=\frac{1}{H^2} \quad I_y=\frac{-2W}{W^3}
    2. z=11.52(4139)2(39)1.53(1.531.5)z=\frac{1}{1.5^2}(41-39)-\frac{2(39)}{1.5^3}(1.53-1.5)
Theorem 1: Confirming Differentiability

If fx(x,y)f_x(x, y) and fy(x,y)f_y(x, y) exist and are continuous on an open disk DD, then f(x,y)f(x, y) is differentiable on DD

Example :: Linear Approximation to find Tangent Plane

Find the equation of the tangent plane to the graph of f(x,y)=2xy2+2x3y2f(x, y) = 2xy^2 + 2x^3y^2 at the point (1,3)(-1, 3).

  1. Find fxf_x, then fyf_y
    1. fx=2y2+6x2y2f_x=2y^2+6x^2y^2
    2. fy=4xy+4x3yf_y=4xy+4x^3y
  2. Plug the point into the original equation
  3. f(1,3)=2(1)(3)2+2(1)3(3)2=36f(-1, 3) = 2(-1)(3)^2 + 2(-1)^3(3)^2=-36
  4. Plug the point into the partial derivatives
    1. fx=2(3)2+6(1)2(3)2=72f_x=2(3)^2+6(-1)^2(3)^2=72
    2. fy=4(1)(3)+4(1)3(3)=24f_y=4(-1)(3)+4(-1)^3(3)=-24
  5. Plug into the equation df=fx(x,y)dx+fy(x,y)dydf=f_x(x, y)dx + f_y(x, y)dy
  6. df=36+72(x+1)24(y3)=72x24y+108df=-36 + 72(x+1)-24(y-3)=72x-24y+108

14.5 Gradient and directional derivatives

The Gradient

The gradient of function f(x,y)f(x,y) at point P=(a,b)P=(a,b) is the vector
f=fx(a,b,c),fy(a,b,c),fz(a,b,c)=fx,fx,fx\nabla f= \langle f_x(a,b,c),f_y(a,b,c), f_z (a,b,c) \rangle = \langle \frac{\partial f}{\partial x}, \frac{\partial f}{\partial x}, \frac{\partial f}{\partial x}\rangle
In three variables, for f(x,y,z)f(x,y,z) and P=(a,b,c)P=(a,b,c)
fp=fx(a,b,c),fy(a,b,c),fz(a,b,c)\nabla f_p= \langle f_x(a,b,c),f_y(a,b,c),f_z(a,b,c) \rangle

Example :: Computing the Gradient:

Calculate the gradient of g(x,y)=9xx2+y2g(x,y)=\frac{9x}{x^2+y^2}

  1. Set up problem using the Quotient Rule of Derivatives
    1. (fg)=fggfg2(\frac{f}{g})’=\frac{f’ \cdot g - g’ \cdot f}{g^2}
  2. Solve for the x-component
    1. (fg)x=fggfg2=9x(x)(x2+y2)x(x2+y2)x(x2+y2)2(\frac{f}{g})_x’=\frac{f’ \cdot g - g’ \cdot f}{g^2}=9\frac{\frac{\partial}{\partial x}(x)(x^2+y^2)-\frac{\partial}{\partial x}(x^2 + y^2)x}{(x^2 + y^2)^2}
    2. (fg)x=9x2+y22x2(x2+y2)2=9(x2+y2)(x2+y2)2(\frac{f}{g})_x’=9\frac{x^2+y^2-2x^2}{(x^2+y^2)^2}=9\frac{(-x^2+y^2)}{(x^2+y^2)^2}
  3. Solve for the y-component
    1. (fg)y=9xy(x2+y2)=18xy(x2+y2)2(\frac{f}{g})_y’=\frac{9x}{\frac{\partial}{\partial y}(x^2 + y^2)}=-\frac{18xy}{(x^2 + y^2)^2}
  4. Plug in
  5. fp=9(x2+y2)(x2+y2)2,18xy(x2+y2)2\nabla f_p= \langle 9\frac{(-x^2+y^2)}{(x^2+y^2)^2},-\frac{18xy}{(x^2 + y^2)^2} \rangle

Calculate the gradient h(a,b,c)=xyz9h(a, b, c)=xyz^{-9}

  1. Find gradient through formula
    1. hp=hx,hy,hz\nabla h_p= \langle h_x,h_y,h_z \rangle
  2. Compute x-component
    1. hx=xxyz9=yz9x(x)=yz9h_x=\frac{\partial}{\partial x}xyz^{-9}=yz^{-9}\frac{\partial}{\partial x}(x)=yz^{-9}
  3. Compute y-component
    1. hy=yxyz9=xz9y(y)=xz9h_y=\frac{\partial}{\partial y}xyz^{-9}=xz^{-9}\frac{\partial}{\partial y}(y)=xz^{-9}
  4. Compute z-component
    1. hz=zxyz9=9xyz10h_z=\frac{\partial}{\partial z}xyz^{-9}=-9xyz^{-10}
  5. Plug in
  6. hp=yz9,xz9,9xyz10\nabla h_p= \langle yz^{-9},xz^{-9},-9xyz^{-10} \rangle
Theorem 1: Properties of the Gradient

If f(x,y,z)f(x,y,z) and g(x,y,z)g(x,y,z) are differentiable and cc is a constant, then

  1. (f+g)=f+g\nabla (f + g) = \nabla f + \nabla g
  2. (cf)=cf\nabla (cf) = c \nabla f
  3. Product Rule for Gradients: (fg)=fg+gf\nabla (fg) = f \nabla g + g \nabla f
  4. Chain Rule for Gradients: If F(t)F(t) is a differentiable function of one variable, then… (F(f(x,y,z)))=F(f(x,y,z))f\nabla (F(f(x,y,z))) = F'(f(x,y,z)) \nabla f
Theorem 2: Chain Rule for Paths

If ff and r(t)r(t) are differentiable, then…
ddtf(r(t))=fr(t)r(t)\frac{d}{dt}f(r(t))= \nabla f_{r(t)} \cdot r'(t)
Chain rule for paths example:
ddtf(r(t))=fx,ydyx(t),y(t)=fxdxdt+fydydt\frac{d}{dt}f(r(t))= \langle \frac{\partial f}{\partial x} ,\frac{\partial y}{dy} \rangle \cdot \langle x'(t),y'(t) \rangle = \frac{\partial f}{\partial x} \frac{dx}{dt}+\frac{\partial f}{\partial y} \frac{dy}{dt}

Directional Derivative

The directional derivative of ff at P=(a,b)P=(a, b) in the direction of a unit vector u=h,ku= \langle h,k\rangle is the limit (assuming it exists)
Duf(P)=Uuf(a,b)=limt0f(a+th,b+tk)f(a,b)tD_uf(P)=U_uf(a,b)=\lim_{t \rightarrow 0}\frac{f(a + th,b + tk)-f(a,b)}{t}

Theorem 3: Computing the directional derivative

Duf(P)=fpu=fx(a,b)h+fy(a,b)kD_uf(P)= \nabla f_p \cdot u=f_x(a,b)h+f_y(a,b)k

  • where u=h,ku= \langle h,k \rangle is a unit vector
  • Also expands for more dimensions
Example :: Calculating the directional derivative:

Calculate the directional derivative of 𝑔(𝑥,𝑦,𝑧)=𝑧2𝑥𝑦+3𝑦2𝑔(𝑥,𝑦,𝑧)=𝑧^2−𝑥𝑦+3𝑦^2 in the direction 𝐯=1,4,2𝐯=⟨1,−4,2⟩ at the point 𝑃=(3,1,7)𝑃=(3,1,−7). Remember to use a unit vector in directional derivative computation. Find Dvg(3,1,7)D_vg(3,1,-7)

  1. Use the directional derivative formula, we must find the partial derivative of each component and then multiply by the unit vector.
    1. Duf(P)=fpu=fx(a,b)h+fy(a,b)kD_uf(P)= \nabla f_p \cdot u=f_x(a,b)h+f_y(a,b)k
  2. Compute the unit vectors of each component
    1. 121,421,221\langle \frac{1}{\sqrt{21}},\frac{-4}{\sqrt{21}},\frac{2}{\sqrt{21}} \rangle
  3. Compute the x-component, y-component, and z-component:
    1. gx=y,gy=6yx,gz=2zg_x=-y, \quad g_y=6y-x, \quad g_z=2z
  4. Multiply each partial derivative of g(x,y,z) by the proper component of the unit vector
    1. Dvg=121(1)+421(6(1)(3))+221(2(7))=1122821=4121D_vg= \frac{1}{\sqrt{21}} (-1) + \frac{-4}{\sqrt{21}} (6(1)-(3)) + \frac{2}{\sqrt{21}} (2(-7)) = \frac{-1-12-28 }{\sqrt{21}}=\frac{-41}{\sqrt{21}}
Properties of the Gradient

The rate of change in a given direction varies with the angle of cos between the gradient and direction
Duf(P)=fpu=fpucosθ=fpcosθD_uf(P)= \nabla f_p \cdot u = || \nabla f_p|| \cdot ||u || \cos \theta = || \nabla f_p|| \cos \theta

  • where (\theta) is the angle between (\nabla f_p) and (u)
  • because cos is constrained to -1 and 1, our answer will be…

fpDuf(P)fp-||\nabla f_p|| \le D_uf(P) \le || \nabla f_p ||

Theorem 4: Interpretation of the Gradient

Assume that (\nabla f_p \ne 0). Let (u) be a unit vector making an angle (\theta) with (\nabla f_p). Then
Duf(P)=fpcosθD_uf(P)=||\nabla f_p|| \cos\theta

(\nabla f_p) points in the direction of fastest rate of increase of (f) at (P), and that rate of increase is (||\nabla f_p||)

(-\nabla f_p) points in the direction of fastest rate of decrease of (f) at (P), and that rate of decrease is (-||\nabla f_p||)

(\nabla f_p) is normal to the level curve (or surface) of (f) at (P).

Theorem 5: Gradient as a Normal Vector

Let (P=(a,b,c)) be a point on the surface given by (F(x,y,z)=k) and assume that (\nabla F_p \ne 0). Then (\nabla F_p) is a vector normal to the tangent plane to the surface at (P). Moreover, the tangent plane to the surface at (P) has the equation:
Fx(a,b,c)(xa)+Fy(a,b,c)(yb)+Fz(a,b,c)(zc)=0F_x(a,b,c)(x-a) + F_y(a,b,c)(y-b) + F_z(a,b,c)(z-c)=0Fx(a,b,c)(xa)+Fy(a,b,c)(yb)+Fz(a,b,c)(zc)=0F_x(a,b,c)(x-a) + F_y(a,b,c)(y-b) + F_z(a,b,c)(z-c)=0

14.6 Multi-variable Calculus Chain Rules

  • Chain Rule for Paths applies to compositions f(r(t))f(r(t)) where ff and rr are differentiable.
Theorem 1: Chain Rule for Paths

ddtf(r(t))=fr(t)r(t)fx(x(t),y(t)limΔt0ΔxΔt+fy(x(t),y(t)limΔt0ΔyΔt\frac{d}{dt}f(r(t))= \nabla f_{r(t)} \cdot r'(t)\approx f_x(x(t),y(t) \lim_{\Delta t \rightarrow 0} \frac{\Delta x}{\Delta t} + f_y(x(t),y(t) \lim_{\Delta t \rightarrow 0} \frac{\Delta y}{\Delta t}
ddtf(r(t))=fx,fy,fzx(t),y(t),z(t)=fxdxdt,fydydt,fzdzdt\frac{d}{dt}f(r(t))= \langle \frac{\partial f}{\partial x},\frac{\partial f}{\partial y},\frac{\partial f}{\partial z} \rangle \cdot \langle x'(t), y'(t), z'(t) \rangle = \langle \frac{\partial f}{\partial x} \frac{dx}{dt},\frac{\partial f}{\partial y}\frac{dy}{dt},\frac{\partial f}{\partial z} \frac{dz}{dt} \rangle
ddtf(r(t))=limh0f(x(t+h),y(t+h))f(x(t),y(t))h\frac{d}{dt}f(r(t))=\lim_{h \rightarrow 0} \frac{f(x(t + h), y (t + h)) - f(x(t),y(t))}{h}

Example :: Calculating Chain Rule:

Let f(x,y,z)=xy+z3,x=r+s5t,y=3rt,z=s4f(x,y,z) = xy + z^3, x= r + s-5t, y = 3rt, z = s^4. Find fdr\frac{\partial f}{dr} and fdt\frac{\partial f}{dt}
f(x,y,z)=xy+z3=(r+s5t)(3rt)+(s4)3=3rt(r+s5t)+s12f(x,y,z) = xy + z^3 =(r + s-5t)(3rt) + (s^4)^3=3rt\left(r+s-5t\right)+s^{12}
fr(3r2t+3rts15rt2+s12)=6rt+3ts15t2\frac{\partial f}{ \partial r}(3r^2t+3rts-15rt^2+s^{12})=6rt + 3ts - 15t^2

ft(3r2t+3rts15rt2+s12)=3r2+3rs30rt\frac{\partial f}{ \partial t}(3r^2t+3rts-15rt^2+s^{12})=3r^2 + 3rs -30rt


Use chain rule to evaluate the partial derivative hq\frac{\partial h}{\partial q} at the point (q,r)=(3,3)(q,r)=(3,3), where h(u,v)=uev,u=q4,v=qr2h(u,v)=ue^v,u=q^4,v=qr^2
hq<em>(q,r)=f</em>r(q,r)r(q,r)\frac{\partial h}{\partial q}\left .\right.\bigg|<em>{(q,r)}=\nabla f</em>{r(q,r)} \cdot r'(q,r)

  1. Compute primary derivatives
    f=fu,fv=ev,uev\nabla f = \langle \frac{\partial f}{\partial u},\frac{\partial f}{\partial v} \rangle = \langle e^v,ue^v \rangle
  2. Compute the tangent vector to r(t)r(t)
    r(t)=4q3,r2r'(t)= \langle 4q^3,r^2 \rangle
  3. Plug in
    hq(q,r)=4q3ev+r2uev\frac{\partial h}{\partial q}\left .\right.\bigg|_{(q,r)}=4q^3e^v+r^2ue^v
  4. Find value of u and v at (q,r)=(3,3)(q,r) = (3,3)
    u=q4=(3)4=81,v=qr2=(3)(3)2=27u=q^4=(3)^4=81, \quad v=qr^2=(3)(3)^2=27
  5. Plug in
  6. hq(3,3)=4(3)3e(27)+(3)2(81)e(27)=837e27\frac{\partial h}{\partial q}\left .\right.\bigg|_{(3,3)}=4(3)^3e^{(27)}+(3)^2(81)e^{(27)}=837e^{27}

Let F(u,v)=eu+v,u=x2,v=2xyF(u,v)=e^{u+v},u=x^2,v=2xy. Use the chain rule to calculate the partial derivative

  1. Plug in for values u and v in F(u,v)F(u,v)
  2. ex2+2xy;Fy=2xex2+2xye^{x^2+2xy}; \quad \frac{\partial F}{\partial y}=2xe^{x^2 + 2xy}
  3. Let f(x,y)=4x+5y,r(t)=t3,t2f(x,y)=4x+5y, \quad r(t)= \langle t^3,t^2 \rangle. Use the chain rule to calculate ddtf(r(t))\frac{d}{dt}f(r(t)) at the value t=5t=-5
  4. ddt(f(r(t)))t=5\frac{d}{dt}\left (f(r(t))\right)\bigg|_{t=-5}
  5. Compute the gradient
  6. f=fx,fy=4,5,fr(5)=f(4,5)=4,5\nabla f = \langle \frac{\partial f}{\partial x},\frac{\partial f}{\partial y} \rangle=\langle 4,5 \rangle, \quad \nabla f_{r(-5)}= \nabla f (4,5)=\langle 4,5 \rangle
  7. Compute the tangent vector to r(t)r(t)
    r(t)=3t2,2t,r(5)=75,10r'(t)=\langle 3t^2,2t \rangle, \quad r'(-5)=\langle 75,-10 \rangle
  8. Plug in by chain rule
  9. ddt(f(r(t)))<em>t=5=f</em>r(5)r(5)=4,575,10=250\frac{d}{dt}\left (f(r(t))\right)\bigg|<em>{t=-5}=\nabla f</em>{r(-5)} \cdot r'(-5)=\langle 4,5 \rangle \cdot \langle 75,-10 \rangle=250

Two spacecraft are following paths in space given by r1=sin(t),t,t2r_1= \langle \sin (t),t,t^2 \rangle and r2=cos(t),1t,t3r_2= \langle \cos (t),1-t,t^3 \rangle If the temperature for the points is given by 𝑇(𝑥,𝑦,𝑧)=𝑥2𝑦(9𝑧)𝑇(𝑥,𝑦,𝑧)=𝑥^2𝑦(9−𝑧), use the Chain Rule to determine the rate of change of the difference DD in the temperatures the two spacecraft experience at time t=2t=2.

Plug r1r_1 and r2r_2 into T(x,y,z)T(x,y,z)

T(r1)=sin2(t)(t)(9t2),T(r2)=cos2(t)(1t)(9t3)T(r_1)=\sin^2(t)(t)(9-t^2), \quad T(r_2)=\cos^2(t)(1-t)(9-t^3)

D=ddt(T(r1)T(r2))=11.196D=\frac{d}{dt}(T(r_1)-T(r_2))=-11.196

14.7 Optimization in Several Variables

Local Extreme Values

A function f(x,y)f(x,y) has a local extremum at P=(a,b)P=(a,b) if there exists an open disk D(P,r)D(P,r) such that:

Local Maximum: f(x,y)f(a,b)f(x,y) \le f(a,b) for all (x,y)D(P,r)(x,y) \in D(P,r)

Local Minimum: f(x,y)f(a,b)f(x,y) \ge f(a,b) for all (x,y)D(P,r)(x,y) \in D(P,r)

About Fermat’s Theorem

For functions with one variable, if f(a)f(a) is a local extreme value, then aa is a critical point and thus the tangent line (if it exists) is horizontal at x=ax=a.

With two variables, it is the same concept but with a tangent plane rather than a line. The tangent plane z=f(x,y)z=f(x,y) at P=(a,b)P=(a,b) has the equation:
z=f(a,b)+fx(a,b)(xa)+fy(a,b)(yb)z=f(a,b) + f_x(a,b)(x-a)+f_y(a,b)(y-b)

Critical Point

A point P=(a,b)P=(a,b) in the domain of f(x,y)f(x,y) is called a critical point if:

  • fx(a,b)=0f_x(a,b)=0 or fx(a,b)f_x(a,b) does not exist, and
  • fy(a,b)=0f_y(a,b)=0 or fy(a,b)f_y(a,b) does not exist
Formula for Discriminant D

D=D(a,b)=fxx(a,b)fyy(a,b)fxy2(a,b)D=D(a,b)=f_{xx}(a,b)f_{yy}(a,b)-f^2_{xy}(a,b)

Theorem 1: Fermat’s Theorem

if f(x,y)f(x,y) has a local minimum or maximum at P=(a,b)P=(a,b), then (a,b)(a,b) is a critical point of f(x,y)f(x,y)

Theorem 2: Second Derivative Test for f(x,y)

Let P=(a,b)P=(a,b) be a critical point of f(x,y)f(x,y). Assume that fxx,fyy,fxyf_{xx}, f_{yy}, f_{xy} are continuous near PP. Then

  • If D>0D > 0 and fxx(a,b)>0f_{xx}(a,b) >0, then f(a,b)f(a,b) is a local minimum
  • If D>0D > 0 and fxx(a,b)<0f_{xx}(a,b) < 0, then f(a,b)f(a,b) is a local maximum
  • If D<0D < 0 then ff has a saddle point at (a,b)(a,b)
  • If D=0D=0, the test is inconclusive
Theorem 3: Existence and Location of Global Extrema

Let f(x,y)f(x,y) be a continuous function on a closed, bounded domain DD in R2R^2. Then

  1. f(x,y)f(x,y) takes on both a minimum and a maximum value on DD
  2. The extreme values occur either at critical points in the interior of DD or at points on the boundary of DD
Theorem 4

With Q(h,k)Q(h,k) and DD as above:

  1. If D>0D>0 and a>0a > 0, then Q(h,k)>0Q(h,k) > 0 for (h,k)(0,0)(h,k) \ne (0,0).
  2. If D>0D>0 and a<0a < 0, then Q(h,k)<0Q(h,k) < 0 for (h,k)(0,0)(h,k) \ne (0,0).
  3. If D<0D < 0, then Q(h,k)Q(h,k) takes on both positive and negative values

14.8 Lagrange Multipliers: Optimizing with a Constraint

Theorem 1: Lagrange Multipliers

Assume that f(x,y)f(x,y) and g(x,y)g(x,y) are differentiable functions. If f(x,y)f(x,y) has a local minimum or a local maximum on the constraint curve g(x,y)=0g(x,y)=0 at P=(a,b)P=(a,b) and if gp0\nabla g_p \ne 0, then there is a scalar λ\lambda such that…
fp=λgp\nabla f_p = \lambda \nabla g_p

Critical Value

The critical point that satisfies the values of the Lagrange Equations:
fx(a,b)=λgx(a,b),fy(a,b)=λgy(a,b)f_x(a,b)=\lambda g_x (a,b),\quad f_y(a,b)=\lambda g_y (a,b)

Example :: Lagrange Multiplier in 3 Variables:

Find the minimum and maximum values of the function with values
max: f(x,y,z)=x2+y2+z2constraint: g(x,y,z)=x+4y+5z=10\text{max: } f(x,y,z)=x^2 + y^2 + z^2 \quad \text{constraint: } g(x,y,z)=x+4y+5z=10

  1. Find the values of f\nabla f and g\nabla g
    1. f=2x,2y,2z,g=1,4,5,(f=g)=(2x,2y,2z=λ1,4,5)\nabla f = 2x,2y,2z, \quad \nabla g=\langle 1,4,5 \rangle, \quad (\nabla f = \nabla g) = (\langle 2x, 2y, 2z \rangle = \lambda \langle 1,4,5 \rangle)
  2. Solve for values of x, y, z, and λ\lambda
    1. λ=2x=y2=2z5,x=y4=z5\lambda = 2x = \frac {y}{2} = \frac{2z}{5}, \quad x=\frac{y}{4}=\frac{z}{5}
  3. Solve for value of x by plugging it into the constraint
    1. x+4y+5z=10=x+4(4x)+5(5x)=10,x=1042x + 4y + 5z = 10= x + 4(4x) + 5(5x) = 10, \quad x = \frac{10}{42}
  4. Plug in x to find values of y and z
    1. y=4x=4042,z=5x=5042y=4x=\frac{40}{42}, \quad z = 5x = \frac{50}{42}
      Solve for MIN: x2+y2+z2=(1042)2+(4042)2+(5042)2=5021\text{Solve for MIN: }x^2+y^2+z^2 = (\frac{10}{42})^2 + (\frac{40}{42})^2 + (\frac{50}{42})^2 = \frac{50}{21}
      Note: We know that 5021\frac{50}{21} is a min because since f(10,0,0)=100>5021f(10,0,0)=100 > \frac{50}{21}
  5. Max is DNE because we can go into the negatives for basically infinitely large values


Find the minimum and maximum values of the function f(x,y)=x2+y2f(x,y)=x^2 + y^2 subject on the constraint 2x+5y=22x+5y=2
MIN: x2+y2CONSTRAINT: 2x+5y=2\text{MIN: } x^2 + y^2 \quad \text{CONSTRAINT: } 2x+5y=2

  1. Find the values of f\nabla f and g\nabla g
    1. f=2x,2y,g=2,5\nabla f= \langle 2x, 2y \rangle , \quad \nabla g = \langle 2, 5 \rangle
  2. Solve for values of x, y, z, and λ\lambda
    1. f=λg,λ=x=2y5\nabla f = \lambda \nabla g, \quad \lambda = x = \frac{2y}{5}
  3. Solve for value of x by plugging it into the constraint
    1. (2x+5y=2),2x+5(5x2)=2,4x+25x2=2(2x + 5y = 2), 2x + 5(\frac{5x}{2})=2, \quad \frac{4x+25x}{2}=2
    2. 29x=4,x=429,y=22(429)5=12129529x = 4, x = \frac{4}{29}, \quad y = \frac{2 - 2(\frac{4}{29})}{5} = \frac{1\frac{21}{29}}{5}
  4. Plug in f(x,y)
  5. f(x,y)=(429)2+(121295)2=429f(x,y)=(\frac{4}{29})^2+(\frac{1\frac{21}{29}}{5})^2=\frac{4}{29}

Use Lagrange multipliers to find the maximum area 𝑆 of a rectangle inscribed in the ellipse x29+y264=1\frac{x^2}{9} + \frac{y^2}{64}=1

  1. Use the values of…
    MAX: f(x,y)=4xy,CONSTRAINT: g(x,y)=x29+y264=1\text{MAX: }f(x,y)=4xy,\quad \text{CONSTRAINT: }g(x,y)=\frac{x^2}{9} + \frac{y^2}{64}=1
  2. Write out the Lagrange equations
    1. f=4y,4x,g=λ8x9,8y64\nabla f=\langle 4y,4x \rangle, \quad \nabla g = \lambda\langle \frac{8x}{9},\frac{8y}{64} \rangle
  3. Solve for λ\lambda in terms of x and y
    1. y=λ8x9λ=9y8x,x=λy8λ=8xyy=\lambda \frac{8x}{9}\quad \lambda = \frac{9y}{8x},\quad x=\lambda \frac{y}{8} \quad \lambda = \frac{8x}{y}
  4. Solve for x and y
    1. 9y8x=8xy=9y2=64x2,x=9y264,y=64x29\frac{9y}{8x}=\frac{8x}{y}=\quad 9y^2=64x^2, \quad x=\sqrt{\frac{9y^2}{64}}, \quad y = \sqrt{\frac{64x^2}{9}}
  5. Plug x and y into the constraint to solve for x and y values
    1. (9y264)29+y264=1,y=±42\frac{(\sqrt{\frac{9y^2}{64}})^2}{9} + \frac{y^2}{64}=1, \quad y=\pm 4 \sqrt{2}
    2. x29+(64x29)264=1,x=±322\frac{x^2}{9} + \frac{(\sqrt{\frac{64x^2}{9}})^2}{64}=1, \quad x= \pm \frac{3\sqrt{2}}{2}
  6. Solve for critical points
    1. P=(9(42)264),64(322)29)=(32,42)P = (\sqrt{\frac{9(4\sqrt{2})^2}{64}}),\sqrt{\frac{64(\frac{3\sqrt{2}}{2})^2}{9}})=(\frac{3}{\sqrt{2}},4\sqrt{2})
  7. Plug in values
    4xy=3242=484xy=\frac{3}{\sqrt{2}} * 4\sqrt{2}=48