Lecture 12: Section 14.3 Partial Derivatives

In Calculus I, we developed a complete theory for the rate of change of a function of a single variable, $y=f(x)$. The derivative $f'(x)$ told us everything about how $y$ changes when $x$ changes. But most phenomena in the world depend on multiple variables. The volume of a cylinder depends on its radius and height; the temperature on a metal plate depends on the $(x,y)$ coordinates. How do we measure the rate of change of a function like $z=f(x,y)$ when there are multiple inputs that can vary?

The answer is to simplify. We measure the rate of change with respect to one variable at a time, while holding all other variables constant. This simple, powerful idea is the basis of partial derivatives.


Topic 1: Intuition from a Table of Values

Imagine a heated metal plate. The temperature $T$ at any point $(x,y)$ is given by a function $T(x,y)$. The table below shows some sample temperature values in degrees Celsius.

$x$ (cm)
1.0 1.5 2.0 2.5
$y$ (cm) 1.0 40 46 50 52
2.0 45 52 58 62
3.0 48 56 64 70

Suppose we are at the point $(1.5, 2.0)$ where the temperature is $52^\circ\text{C}$. We want to know how the temperature is changing at this point.

Taking the limit as $\Delta x \to 0$ and $\Delta y \to 0$ would give us the instantaneous rates of change, which we call the partial derivatives.


Topic 2: The Geometric Interpretation

The most powerful way to understand partial derivatives is geometrically. The graph of a function $z=f(x,y)$ is a surface in 3D space.

The interactive graph below shows the surface $f(x,y) = 4 - x^2 - \frac{1}{2}y^2$. You can move the point and see the two slicing planes and the two tangent lines whose slopes are the partial derivatives.

Move the sliders for a and b to see how the slopes change. Click on and off of the planes x = a and y = b to see the "slicing" effect.


Topic 3: Definition and Calculation of Partial Derivatives

The intuition from the table and the graph leads us to the formal limit definition.

Definition of Partial Derivatives

For a function $f(x,y)$, the partial derivatives with respect to $x$ and $y$ are:

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

Notation: We use several notations interchangeably. For $z=f(x,y)$: $f_x = f_x(x,y) = \frac{\partial f}{\partial x} = \frac{\partial z}{\partial x}$ and $f_y = f_y(x,y) = \frac{\partial f}{\partial y} = \frac{\partial z}{\partial y}$. The symbol $\partial$ is called "del" and is used to distinguish partial derivatives from ordinary single-variable derivatives ($d/dx$).

Note how the definitions mirror the process: to find $f_x$, we hold $y$ constant and find the limit as only $x$ changes. To find $f_y$, we hold $x$ constant and find the limit as only $y$ changes.

The Computational Rule

The definitions look complicated, but the calculation is straightforward. By holding one variable constant, we are effectively reducing the problem to single-variable calculus.

  • To find $f_x$: Treat the variable $y$ as a constant and differentiate with respect to $x$ as usual.
  • To find $f_y$: Treat the variable $x$ as a constant and differentiate with respect to $y$ as usual.

Example 1: Finding Equations of Tangent Lines

Let $f(x,y) = 4 - x^2 - \frac{1}{2}y^2$. Find the equations of the tangent lines to the surface at the point $(1, 2)$ in the x and y directions.

Solution:

First, we need the z-coordinate of the point on the surface: $z_0 = f(1, 2) = 4 - (1)^2 - \frac{1}{2}(2)^2 = 4 - 1 - 2 = 1$. So, our point of tangency is $P(1, 2, 1)$.

Next, we compute the partial derivatives:

$$ f_x(x,y) = -2x \quad \text{and} \quad f_y(x,y) = -y $$

Now, we evaluate them at our point $(1, 2)$ to find the slopes:

$$ f_x(1, 2) = -2(1) = -2 $$ $$ f_y(1, 2) = -2 $$

Tangent Line in the x-direction (Plane $y=2$)

The slope of the tangent line in the x-direction is $m_x = f_x(1, 2) = -2$. This line lies in the plane $y=2$. We can use the familiar point-slope formula $z - z_0 = m(x - x_0)$:

$$ z - 1 = -2(x - 1) $$

Tangent Line in the y-direction (Plane $x=1$)

The slope in the y-direction is $m_y = f_y(1, 2) = -2$. To express this as a 3D line, we need a point and a direction vector. The point is $P(1, 2, 1)$. The direction vector $\vec{v}$ describes the motion along the line: since $x$ is fixed, the x-component is 0. For every 1 unit we move in the y-direction, we move $m_y = -2$ units in the z-direction. So, $\vec{v} = \langle 0, 1, -2 \rangle$. The parametric equations are:

$$ \vec{r}(t) = \langle 1, 2, 1 \rangle + t \langle 0, 1, -2 \rangle $$ $$ x(t) = 1, \quad y(t) = 2 + t, \quad z(t) = 1 - 2t $$

Example 2: A Simple Polynomial

Let $f(x,y) = x^2 + xy + y^2$. Find the partial derivatives $f_x(1,1)$ and $f_y(1,1)$.

Solution:

First, find the general partial derivative $f_x(x,y)$. We treat $y$ as a constant (so the derivative of the $y^2$ term is zero).

$$ f_x(x,y) = \frac{\partial}{\partial x}(x^2 + xy + y^2) = 2x + (1)y + 0 = 2x+y $$

Now, find $f_y(x,y)$ by treating $x$ as a constant (so the derivative of the $x^2$ term is zero).

$$ f_y(x,y) = \frac{\partial}{\partial y}(x^2 + xy + y^2) = 0 + x(1) + 2y = x+2y $$

Finally, evaluate these at the point $(1,1)$:

$$ f_x(1,1) = 2(1)+1 = 3 $$ $$ f_y(1,1) = 1+2(1) = 3 $$

This means at the point $(1,1,3)$ on the surface, the slope of the tangent line in the x-direction is 3, and the slope of the tangent line in the y-direction is also 3.

Example 3: Trig Functions

Find $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$ for $f(x,y) = \sin(x)\cos(y)$.

Solution:

For $\frac{\partial f}{\partial x}$, we treat $\cos(y)$ as a constant coefficient.

$$ \frac{\partial f}{\partial x} = \frac{\partial}{\partial x}(\sin(x)\cos(y)) = \cos(y) \cdot \frac{d}{dx}(\sin x) = \cos(y)\cos(x) $$

For $\frac{\partial f}{\partial y}$, we treat $\sin(x)$ as a constant coefficient.

$$ \frac{\partial f}{\partial y} = \frac{\partial}{\partial y}(\sin(x)\cos(y)) = \sin(x) \cdot \frac{d}{dy}(\cos y) = \sin(x)(-\sin y) = -\sin(x)\sin(y) $$

Example 4: Using the Chain Rule

Find $f_x$ and $f_y$ for $f(x,y) = \ln(x^2+y^2)$.

Solution:

To find $f_x$, we treat $y$ as a constant. We need the chain rule. The outer function is $\ln(u)$ and the inner is $u=x^2+y^2$.

$$ f_x(x,y) = \frac{1}{x^2+y^2} \cdot \frac{\partial}{\partial x}(x^2+y^2) = \frac{1}{x^2+y^2} \cdot (2x+0) = \frac{2x}{x^2+y^2} $$

Similarly for $f_y$, we treat $x$ as constant.

$$ f_y(x,y) = \frac{1}{x^2+y^2} \cdot \frac{\partial}{\partial y}(x^2+y^2) = \frac{1}{x^2+y^2} \cdot (0+2y) = \frac{2y}{x^2+y^2} $$

Check Your Understanding #1

Find the partial derivatives $f_x$ and $f_y$ for the function $f(x,y) = \frac{x}{y}$.


Topic 4: Higher-Order Partial Derivatives

Just as we could take second, third, and higher derivatives in Calculus I, we can do the same with partial derivatives. Since we have two first-order partial derivatives ($f_x, f_y$), we can find four second-order partial derivatives.

Second Partial Derivatives

  1. $(f_x)_x = f_{xx} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial x}\right) = \frac{\partial^2 f}{\partial x^2}$ (Differentiate w.r.t. $x$ twice)
  2. $(f_y)_y = f_{yy} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial y}\right) = \frac{\partial^2 f}{\partial y^2}$ (Differentiate w.r.t. $y$ twice)
  3. $(f_x)_y = f_{xy} = \frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right) = \frac{\partial^2 f}{\partial y \partial x}$ (Differentiate w.r.t. $x$ first, then $y$)
  4. $(f_y)_x = f_{yx} = \frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right) = \frac{\partial^2 f}{\partial x \partial y}$ (Differentiate w.r.t. $y$ first, then $x$)

The derivatives $f_{xy}$ and $f_{yx}$ are called the mixed partial derivatives. Note the order in the Leibniz notation is the reverse of the subscript notation.

A surprising and useful result is that for most functions we encounter, the order of differentiation in the mixed partials does not matter.

Clairaut's Theorem

Suppose $f$ is defined on a disk $D$ that contains the point $(a,b)$. If the functions $f_{xy}$ and $f_{yx}$ are both continuous on $D$, then

$$ f_{xy}(a,b) = f_{yx}(a,b) $$

Example 5: Verifying Clairaut's Theorem

Let $f(x,y) = x^3y^2 - 2x^2y^3$. Find the mixed partials $f_{xy}$ and $f_{yx}$.

Solution:

First, find the first partial derivatives:

$$ f_x = 3x^2y^2 - 4xy^3 $$ $$ f_y = 2x^3y - 6x^2y^2 $$

Now, find the mixed partials:

$$ f_{xy} = \frac{\partial}{\partial y}(f_x) = \frac{\partial}{\partial y}(3x^2y^2 - 4xy^3) = 6x^2y - 12xy^2 $$ $$ f_{yx} = \frac{\partial}{\partial x}(f_y) = \frac{\partial}{\partial x}(2x^3y - 6x^2y^2) = 6x^2y - 12xy^2 $$

As expected, they are equal.

Example 6: Verifying with a Trig Function

Let $f(x,y) = \cos(xy)$. Find $f_{xy}$ and $f_{yx}$.

Solution:

First, find $f_x$ and $f_y$ using the Chain Rule.

$$ f_x = -\sin(xy) \cdot \frac{\partial}{\partial x}(xy) = -\sin(xy) \cdot y = -y\sin(xy) $$ $$ f_y = -\sin(xy) \cdot \frac{\partial}{\partial y}(xy) = -\sin(xy) \cdot x = -x\sin(xy) $$

Now, find the mixed partials using the Product Rule.

$$ f_{xy} = \frac{\partial}{\partial y}(-y\sin(xy)) = (-1)(\sin(xy)) + (-y)(\cos(xy) \cdot x) = -\sin(xy) - xy\cos(xy) $$ $$ f_{yx} = \frac{\partial}{\partial x}(-x\sin(xy)) = (-1)(\sin(xy)) + (-x)(\cos(xy) \cdot y) = -\sin(xy) - xy\cos(xy) $$

Again, the mixed partials are equal.

Check Your Understanding #2

Find all four second partial derivatives for the function $f(x,y) = e^{x^2y}$.


Final Practice

Final Practice Problem #1

Find the first partial derivatives of the function $f(x,y,z) = x\sin(yz)$.

Final Practice Problem #2

Find the first partial derivatives of the function $g(x,y) = \arctan(y/x)$.

Final Practice Problem #3

Find $f_{xxy}$ for $f(x,y) = x^2 e^{xy}$.


Conclusion

Partial derivatives are the foundation of differentiation in multiple dimensions. By holding all but one variable constant, we reduce a complex problem to the familiar rules of single-variable calculus. This allows us to measure the rate of change of a multivariable function along specific directions parallel to the coordinate axes. This concept is the first crucial step toward understanding the more general idea of how a function changes as we move in any direction, which we will explore in future lectures.

Learning Objectives

After this lecture, you should be able to:

  • Interpret the partial derivatives $f_x$ and $f_y$ numerically from a table of values and geometrically as the slopes of tangent lines to surface traces.
  • Compute first-order partial derivatives by treating all other variables as constants.
  • Calculate higher-order partial derivatives, including mixed partials.
  • State and apply Clairaut's Theorem to verify that $f_{xy} = f_{yx}$ for continuous functions.
  • Combine the rules of partial differentiation with the product, quotient, and chain rules.