9 Multivariable Calculus

Basic Mathematics · Unit 9

Multivariable Calculus

Exam-focused notes for Multivariable Calculus (Basic Mathematics, MTH104): what the TU syllabus asks and how it has actually been tested, with 10 solved past questions from this unit.

Multivariable Calculus in short

Many real quantities depend on more than one variable, such as the height of a hill at each map point. Multivariable calculus extends derivatives to these functions so we can study slopes, steepest directions and peaks.

Multivariable Calculus: notes

Partial derivatives

For $z = f(x, y)$, the partial derivative with respect to $x$ is

$$f_x = \frac{\partial f}{\partial x} = \lim_{h \to 0}\frac{f(x + h, y) - f(x, y)}{h}.$$

To find it, treat $y$ as a constant and differentiate with respect to $x$. In the same way, $f_y$ treats $x$ as a constant. The value $f_x(a, b)$ is the slope of the surface at $(a, b)$ in the $x$ direction.

Example. For $f(x, y) = x^4 y + xy^3$ at $(1, 2)$:

$$\begin{aligned} f_x &= 4x^3 y + y^3 = 8 + 8 = 16 \ f_y &= x^4 + 3xy^2 = 1 + 12 = 13 \end{aligned}$$

Second order partial derivatives

Differentiate again to get $f_{xx}$, $f_{yy}$, and the mixed partials $f_{xy} = (f_x)y$ and $f{yx} = (f_y)x$. If these are continuous, then $f{xy} = f_{yx}$ (Clairaut's theorem).

For the same function:

$$\begin{aligned} f_{xx} &= 12x^2 y, \quad f_{yy} = 6xy \ f_{xy} &= 4x^3 + 3y^2 = 16 \text{ at } (1,2) \end{aligned}$$

Gradient vector

The gradient of $f$ collects the partial derivatives into a vector:

$$\nabla f = \langle f_x, f_y \rangle = f_x,\mathbf{i} + f_y,\mathbf{j}.$$

In three variables, $\nabla f = \langle f_x, f_y, f_z \rangle$. The gradient points in the direction of the steepest increase of $f$. It is perpendicular to the level curve through the point.

Example. For $f = x^2 y$, $\nabla f = \langle 2xy, x^2\rangle$. At $(1, 2)$ this is $\langle 4, 1\rangle$.

What this unit covers

  • Partial derivatives
  • Second order partial derivatives
  • Gradient vector
  • Directional derivatives
  • Chain rule for multivariable functions
  • Implicit differentiation in multiple variables
  • Local extrema of multivariable functions
  • Critical points and classification

Partial derivatives

2081 · 5 marks

Find the partial derivatives $f_x$, $f_y$ and $f_{xy}$ of $f(x,y) = \sqrt{x} y^3 + x^4 y$ at $(-4,1)$. [5]

Show solved answer

Given Data

  • Function: $f(x,y) = \sqrt{x}, y^3 + x^4 y$
  • Evaluation point: $(-4, 1)$

Step 1: Compute $f_x$

Treat $y$ as constant. Write $\sqrt{x} = x^{1/2}$.

$$f_x = \frac{1}{2}x^{-1/2},y^3 + 4x^3 y = \frac{y^3}{2\sqrt{x}} + 4x^3 y$$


Step 2: Compute $f_y$

Treat $x$ as constant.

$$f_y = 3\sqrt{x},y^2 + x^4$$


Step 3: Compute $f_{xy}$

Differentiate $f_x$ with respect to $y$:

$$f_{xy} = \frac{\partial}{\partial y}\left(\frac{y^3}{2\sqrt{x}} + 4x^3 y\right) = \frac{3y^2}{2\sqrt{x}} + 4x^3$$


Step 4: Evaluate at $(-4, 1)$

Domain note: Since $x = -4 < 0$, $\sqrt{x} = \sqrt{-4}$ is not real. The function (and its derivatives) are not defined at $(-4,1)$ in the real domain. Proceeding formally using $\sqrt{-4} = 2i$:

$f_x(-4,1)$: $$f_x = \frac{1^3}{2\sqrt{-4}} + 4(-4)^3(1) = \frac{1}{2(2i)} - 256 = \frac{1}{4i} - 256 = -\frac{i}{4} - 256$$

So $f_x(-4,1) = -256 - \dfrac{i}{4}$.

$f_y(-4,1)$: $$f_y = 3\sqrt{-4}(1)^2 + (-4)^4 = 3(2i) + 256 = 256 + 6i$$

$f_{xy}(-4,1)$: $$f_{xy} = \frac{3(1)^2}{2\sqrt{-4}} + 4(-4)^3 = \frac{3}{4i} - 256 = -\frac{3i}{4} - 256$$

So $f_{xy}(-4,1) = -256 - \dfrac{3i}{4}$.


Summary

DerivativeGeneral formAt $(-4,1)$
$f_x$$\dfrac{y^3}{2\sqrt{x}} + 4x^3 y$$-256 - \dfrac{i}{4}$ (not real)
$f_y$$3\sqrt{x},y^2 + x^4$$256 + 6i$ (not real)
$f_{xy}$$\dfrac{3y^2}{2\sqrt{x}} + 4x^3$$-256 - \dfrac{3i}{4}$ (not real)

Conclusion: The derivative expressions are correct. However, because $\sqrt{-4}$ is not real, the function is not defined at $(-4,1)$ over the reals. The point is almost certainly a typo for $(4,1)$, which would give real values:

  • $f_x(4,1) = \frac{1}{4} + 256 = 256.25$
  • $f_y(4,1) = 6 + 256 = 262$
  • $f_{xy}(4,1) = \frac{3}{4} + 256 = 256.75$

The derivative formulas and formal evaluations above are correct, and $\sqrt{-4} = 2i$ has been simplified to give explicit complex values.

Open this answer on its own page →

2080 · 5 marks

Define partial derivative and find the value of $\frac{\partial f}{\partial x}$ & $\frac{\partial f}{\partial y}$ at the point (4, -5) if $f(x,y) = x^3 + 3xy + y - 1$. [5]

Show solved answer

Model Answer: Partial Derivatives

Given

  • Function: $f(x, y) = x^3 + 3xy + y - 1$
  • Point of evaluation: $(x, y) = (4, -5)$
  • Required: $\dfrac{\partial f}{\partial x}$ and $\dfrac{\partial f}{\partial y}$ at $(4, -5)$

Definition of Partial Derivative

A partial derivative of a function $f(x, y)$ with respect to one variable is its rate of change with respect to that variable while all other variables are held constant.

$$\frac{\partial f}{\partial x} = \lim_{h \to 0} \frac{f(x+h, y) - f(x, y)}{h}$$

$$\frac{\partial f}{\partial y} = \lim_{k \to 0} \frac{f(x, y+k) - f(x, y)}{k}$$

Solution

Finding $\dfrac{\partial f}{\partial x}$ (treat $y$ constant)

$$\frac{\partial f}{\partial x} = \frac{\partial}{\partial x}\big(x^3 + 3xy + y - 1\big) = 3x^2 + 3y + 0 - 0 = 3x^2 + 3y$$

Finding $\dfrac{\partial f}{\partial y}$ (treat $x$ constant)

$$\frac{\partial f}{\partial y} = \frac{\partial}{\partial y}\big(x^3 + 3xy + y - 1\big) = 0 + 3x + 1 - 0 = 3x + 1$$

Evaluating at $(4, -5)$

$$\frac{\partial f}{\partial x}\bigg|_{(4,-5)} = 3(4)^2 + 3(-5) = 48 - 15 = 33$$

$$\frac{\partial f}{\partial y}\bigg|_{(4,-5)} = 3(4) + 1 = 12 + 1 = 13$$

Final Answer

$$\boxed{\dfrac{\partial f}{\partial x}\bigg|{(4,-5)} = 33, \qquad \dfrac{\partial f}{\partial y}\bigg|{(4,-5)} = 13}$$

Open this answer on its own page →

Gradient vector

2080

(question text pending review) # Solution

Part 1: Gradient and Directional Derivative [5 marks]

Definition of Gradient: The gradient of a scalar function $f(x,y,z)$ is defined as: $$

Part 1: - Function: $f(x,y,z) = x^3 - xy^2 + z$ - Point: $P(1,0,0)$ - Direction: $\vec{v} = 2\vec{i} - \vec{j} + \vec{k}$ Part 2: - Region bounded by $y = \sqrt{x}$, line $y = 1$, and $x = 4$ - Axis of revolution: $y = 1$ --- Definition of Gradient The gradient of a scalar function $f(x,y,z)$ is ...

Open this answer on its own page →

2079 · 10 marks

Question

Define Gradient vector and directional derivative. Find the direction in which $f(x,y) = \frac{x^2}{2} + \frac{y^2}{2}$ increases and decreases most rapidly at the point $(1,1)$. What is the direction of zero change in $f$ at $(1,1)$? Derivative of $f(x,y)$ at the point $(1,1)$ in the direction $v = 3i - 4j$. [5+2+3]

  • Function: $f(x,y) = \dfrac{x^2}{2} + \dfrac{y^2}{2}$ - Point: $(1,1)$ - Direction vector for part 3: $\mathbf{v} = 3\mathbf{i} - 4\mathbf{j}$ --- (a) Definitions The gradient of $f(x,y)$ is the vector of its first partial derivatives: $$\nabla f = \left\langle \frac{\partial f}{\partial x}, \fr...
Open this answer on its own page →

Chain rule for multivariable functions

2079 · 5 marks

What is chain rule for function $w = f(x,y)$? To use this rule, find the derivative of $w = xy$ w.r.t. $t$ along the path $x = \cos t$, $y = \sin t$. Also, find derivative of $w$ at $t = \frac{\pi}{2}$. [1+4]

  • $w = f(x,y) = xy$ - $x = \cos t$, $y = \sin t$ - Evaluate $\dfrac{dw}{dt}$ at $t = \dfrac{\pi}{2}$ --- For $w = f(x, y)$ where $x = x(t)$ and $y = y(t)$ are functions of a single variable $t$, the chain rule gives the total derivative: $$\frac{dw}{dt} = \frac{\partial w}{\partial x}\cdot\frac{d...
Open this answer on its own page →

Directional derivatives

2078 · 5 marks

Find the derivative of $f(x, y, z) = x^3 - xy^2 - z$ at point $P(1, 1, 0)$ in the direction of $v = 2i - 3j + 6k$. [5]

  • Function: $f(x,y,z) = x^3 - xy^2 - z$ - Point: $P(1, 1, 0)$ - Direction vector: $\mathbf{v} = 2\mathbf{i} - 3\mathbf{j} + 6\mathbf{k}$ The directional derivative is $D{\mathbf{u}}f = \nabla f \cdot \hat{\mathbf{u}}$, where $\hat{\mathbf{u}}$ is the unit vector along $\mathbf{v}$. $$\frac{\parti...
Open this answer on its own page →

2077 · 5 marks

Find the derivatives of the function $f(x,y) = x^3 - xy^2 + x^2y - y^3$ at the point $p_0(5,5)$ in the direction of $\vec{u} = 4\vec{i} + 3\vec{j}$. [5]

  • Function: $f(x,y) = x^3 - xy^2 + x^2y - y^3$ - Point: $p0(5,5)$ - Direction: $\vec{u} = 4\vec{i} + 3\vec{j}$ $$D{\vec{u}}f = \nabla f \cdot \hat{u}$$ $$\frac{\partial f}{\partial x} = 3x^2 - y^2 + 2xy$$ $$\frac{\partial f}{\partial y} = -2xy + x^2 - 3y^2$$ $$fx(5,5) = 3(25) - 25 + 2(25) = 75 - ...
Open this answer on its own page →

Implicit differentiation in multiple variables

2081.2 · 5 marks

Find $\frac{\partial z}{\partial x}$ and $\frac{\partial z}{\partial y}$ if $x^3 + y^3 + z^3 + 6xyz = 1$. [5]

Implicit relation: $$F(x,y,z) = x^3 + y^3 + z^3 + 6xyz - 1 = 0$$ Required: $\dfrac{\partial z}{\partial x}$ and $\dfrac{\partial z}{\partial y}$, where $z$ is an implicit function of $x$ and $y$. No numeric values are missing; this is a symbolic derivation. --- Finding

Open this answer on its own page →

Second order partial derivatives

0 · 5 marks

Find the second order derivative $\frac{\partial^2 f}{\partial x^2}, \frac{\partial^2 f}{\partial y^2}, \frac{\partial^2 f}{\partial x\partial y}, \frac{\partial^2 f}{\partial y\partial x}$ of $f(x,y) = x \cos y + ye^x$ [5]

$$f(x,y) = x\cos y + ye^x$$ Required: $\dfrac{\partial^2 f}{\partial x^2}, \dfrac{\partial^2 f}{\partial y^2}, \dfrac{\partial^2 f}{\partial x,\partial y}, \dfrac{\partial^2 f}{\partial y,\partial x}$ Differentiate with respect to $x$ (treat $y$ constant): $$\frac{\partial f}{\partial x} = \cos...

Open this answer on its own page →

Local extrema of multivariable functions

0 · 5 marks

Find the local extreme values of the function $f(x,y) = xy - x^2 - y^2 - 2x - 2y + 4$. [5]

Function: $f(x,y) = xy - x^2 - y^2 - 2x - 2y + 4$ First partial derivatives: $$fx = y - 2x - 2$$ $$fy = x - 2y - 2$$ Set equal to zero: $$y - 2x - 2 = 0 \quad (1)$$ $$x - 2y - 2 = 0 \quad (2)$$ From (1): $y = 2x + 2$ Substitute into (2): $$x - 2(2x+2) - 2 = 0$$ $$x - 4x - 4 - 2 = 0$$ $$-3x - 6 = ...

Open this answer on its own page →