Partial Derivatives

# Partial Derivatives of Two Variable Functions

Recall that if $y = f(x)$ is a single variable real-valued function, then the derivative of $f$ is $f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}$ (provided that this limit exists). We saw that $f'(x)$ represents the rate of change of $f(x)$. We will now extend the concept of differentiation to functions of two variables.

Consider the function $z = f(x, y)$, and suppose that we wanted to determine the rate of change at any point $P(a, b, f(a,b))$ on the surface $S$ generated by $f$. For such a function $f$, the first question that arises is "the rate of change of what variable?" If we simply say "rate of change of $f$ at the point $P(a, b, f(a))$" when dealing with two variable functions, then there is a lot of ambiguity as the rate of change will be dependent on those two variables and how we approach such a point.

Suppose that we fix one of the variables of $f(x,y)$ as a constant, … say we fix $y = b$. Then we will be looking at the cross section of the surface intersecting with the plane $y = b$, and $f(x, y) = f(x, b)$ will be a function of the single variable $x$. We can take the derivative of $f$ with respect to $x$ denoted $f_x$ as $f_x (x, b) = \lim_{h \to 0} \frac{f(x + h, b) - f(x, b)}{h}$. Of course, we can fix $y$ to be any value $b$ for which $(x, b)$ is defined, and so more generally:

(1)
\begin{align} f_x (x, y) = \lim_{h \to 0} \frac{f(x + h, y) - f(x, y)}{h} \end{align} Furthermore, we could have also fixed the variable $x = a$. Then we will be looking at the cross section of the surface $S$ intersecting with the plane $x = a$, and $f(x, y) = f(a, y)$ will be a function of the single variable $y$. We can take the derivative of $f$ with respective to $y$ denoted $f_y$ as $f_y (a, y) = \lim_{h \to 0} \frac{f(a, y + h) - f(a, y)}{h}$. Once again, we could fix $x$ to be any value $a$ for which $(a, y)$ is defined, and so more generally:

(2)
\begin{align} f_y (x, y) = \lim_{h \to 0} \frac{f(x, y + h) - f(x, y)}{h} \end{align} We note that both $f_x (a, b)$ represents the slope of the tangent of the curve of intersection between $S$ and $y = b$ at the point $P$, while $f_y (a, b)$ represents the slope of the tangent of the curve of intersection between $S$ and $x = a$ at the point $P$. The name of the functions $f_x (x, y)$ and $f_y (x, y)$ have a special name as we will define as follows.

 Definition: Let $z = f(x, y)$ be a two variable real-valued function. Then the First Partial Derivatives of $f$ are the functions $f_x$ and $f_y$ defined as $f_x (x, y) = \frac{\partial}{\partial x} f(x,y) = \lim_{h \to 0} \frac{f(x + h, y) - f(x, y)}{h}$ and $f_y (x, y) = \frac{\partial}{\partial y} f(x,y) = \lim_{h \to 0} \frac{f(x, y + h) - f(x, y)}{h}$.

There are many different notations to represent partial derivatives. Just to list a few examples, $f_x (x, y) = \frac{\partial}{\partial x} f(x,y) = \frac{\partial z}{\partial x} = D_x f$. One special type of notation we will use later is the notation $f_1 (x, y)$ which means to partial differentiate with respect to the first variable, in this case $x$.

To compute partial derivatives of functions with two variables, we will regard one of the variables as a constant and differentiate the function using single-variable differentiation rules. For example, consider the function $f(x, y) = 3x^2 y^5$.

Suppose that we wanted to find the partial derivative of $f(x,y)$ with respect to $x$, that is $\frac{\partial}{\partial x} f(x,y)$. If we fix $y$ and treat it as a constant, then we have that $\frac{\partial}{\partial x} f(x,y) = 6x y^5$.

Now suppose that we wanted to find the partial derivative of $f(x, y)$ with respect to $y$, that is $\frac{\partial}{\partial y} f(x,y)$. If we fix $x$ and treat it as a constant, then we have that $\frac{\partial}{\partial y} f(x,y) = 3x^2 (5)y^4 = 15x^2y^4$.

## Example 1

Let $z = x^2y^2 + \cos x + y$. Find $\frac{\partial z}{\partial x}$ and $\frac{\partial z}{\partial y}$.

First we will compute $\frac{\partial z}{\partial x}$. Fix $y$ and treat it like a constant. Then we have that:

(3)
\begin{align} \frac{\partial z}{\partial x} = 2xy^2 - \sin x \end{align}

Now we will compute $\frac{\partial z}{\partial y}$. Fix $x$ and treat it like a constant. Then we get that:

(4)
\begin{align} \frac{\partial z}{\partial y} = 2x^2y + 1 \end{align}

## Example 2

Let $f(x, y) = x e^x \cos y - xy^2$. Find $f_x (x, y)$ and $f_y (x, y)$.

First we will compute $f_x (x, y)$. Fix $y$ and treat it like a constant. Applying the product rule for single variable functions and we have that:

(5)
\begin{align} f_x (x, y) = (e^x + xe^x) \cos y - y^2 \end{align}

Now we will compute $f_y (x, y)$. Fix $y$ and treat it like a constant. Then we get that:

(6)
\begin{align} f_y (x, y) = - x e^x \sin y - 2xy \end{align}

# Partial Derivatives of Functions of Three or More Variables

Partial derivatives are defined similarly for functions of three or more variables, though, establishing a geometric interpretation of partial derivatives in higher dimensions is difficult.

 Definition: Let $w = f(x, y, z)$ be a three variable real-valued function. Then the First Partial Derivatives of $f$ are the functions $f_x$, $f_y$, and $f_z$ defined as $f_x (x, y, z) = \lim_{h \to 0} \frac{f(x + h, y, z) - f(x, y, z)}{h}$, $f_y (x, y, z) = \lim_{h \to 0} \frac{f(x, y + h) - f(x, y)}{h}$, and $f_z (x, y, z) = \lim_{h \to 0} \frac{f(x, y, z + h) - f(x, y, z)}{h}$.

To compute partial derivatives of functions of three variables, we will fix all but one variable and differentiate the function using single variable differentiation methods.

For $n$ variables:

 Definition: Let $z = f(x_1, x_2, ..., x_n)$ be an $n$ variable real-valued function. Then the First Partial Derivatives of $f$ are the functions $f_1$, $f_2$, …, $f_n$. For $1 ≤ j ≤ n$, the $j^{\mathrm{th}}$ partial derivative of $f$ is $f_j (x_1, x_2, ..., x_n) = \lim_{h \to 0} \frac{f(x_1, x_2, ..., x_{j-1}, x_j + h, x_{j+1}, ..., x_n) - f(x_1, x_2, ..., x_j, ..., x_n)}{h}$.

Now let's look at some examples.

## Example 3

Find all partial derivatives to the function $f(x, y, z, w) = 2x^3y^2zw^4$.

We have that:

(7)
\begin{align} f_x (x, y, z, w) = 6x^2y^2zw^4 \\ f_y (x, y, z, w) = 4x^3yzw^4 \\ f_z (x, y, z, w) = 2x^3y^2w^4 \\ f_w (x, y, z, w) = 8x^3y^2zw^3 \end{align}