# 4 Partial derivatives

## 4.1 Limits and continuity

The following definition is from Stewart.

**Definition 4.1 **Let \(f: \mathbb{R}^n \to \mathbb{R}^m\) be a function. Then we say that the limit of \(f(x)\) as \(x\) approaches \(a\) is \(L\) and we write

\[\lim_{x \to a} f(x) = L\]

if for every number \(\epsilon > 0\) there is a corresponding number \(\delta > 0\) such that \(|f(x,y) - L| < \epsilon\) if \(| x - a| < \delta\).

Finding if a function has limit as a point in higher dimension is not as simple as the case for 1 dimension.

Determining whether a multivariable function has a limit sometimes is an art and it requires a lot of experiences and practice. However, there are certain rules that could help us.

**Theorem 4.1 **Let \(L,M\) and \(k\) be real numbers and that
\[\begin{equation*}
\lim_{x \to a} f(x,y) = L \,, \qquad
\lim_{x \to a} g(x,y) = M \,.
\end{equation*}\]
We then have

\(\displaystyle \lim_{x \to a} (f(x) + g(x)) = L + M\),

\(\displaystyle \lim_{x \to a} (k f(x)) = kL\),

\(\displaystyle \lim_{x \to a} (f(x) g(x)) = LM\),

\(\displaystyle \lim_{x \to a} \frac{f(x)}{g(x)} = \frac{L}{M}\) if \(M \not= 0\),

\(\displaystyle \lim_{x \to a} {f(x)^p} = L^p\) for \(p>0\),

**Strategy to find out that a two-variable function does NOT have a limit.**

If \(\lim_{(x,y) \to (a,b)} f(x,y) = L_1\) as \((x,y) \to (a,b)\) along a path \(C_1\), and \(\lim_{(x,y) \to (a,b)} f(x,y) = L_2\) as \((x,y) \to (a,b)\) along a path \(C_2\), where \(L_1 \neq L_2\), then \(\lim_{(x,y) \to (a,b)} f(x,y)\) does not exist.

**Example 4.1 **\(\lim_{(x,y)\to (0,0)} \frac{x^2 - y^2}{x^2 + y^2}\) does not exist.

\(\lim_{(x,y)\to (0,0)} \frac{xy}{x^2 + y^2}\) does not exist.

\(\lim_{(x,y)\to (0,0)} \frac{xy^2}{x^4 + y^4}\) does not exist.

\(\lim_{(x,y)\to (0,0)} \frac{3x^2y}{x^2 + y^2} = 0\).

## 4.2 Partial derivatives

given a function \(f:\mathbb{R}^n \to \mathbb{R}^m\), the partial derivative with respect to the \(j\)th variable \(x_j\) of the \(i\)th output at \(a \in \mathbb{R}^n\) is \[\begin{equation*} \frac{ \partial }{\partial x_j} f_{i}(a) = \lim_{h\to 0} \frac{ f(a_1, \dots, a_{i-1}, a_i + h , a_{i+1}, \dots, a_n) - f(a_1, \dots, a_{i-1}, a_i , a_{i+1}, \dots, a_n)}{h} \,. \end{equation*}\]

**Notations.**
The partial derivatives sometimes have different notations:
\[\begin{equation*}
\partial_j f_i (a) =
\partial_{x_j} f_i (a) =
\frac{ \partial }{\partial x_j} f_{i}(a) .
\end{equation*}\]
From here, one can define higher partial derivatives such as the following

\[\begin{equation*} \partial^3_{1 2 3} f_i (a) = \frac{\partial}{\partial x_1} \frac{\partial}{\partial x_2} \frac{\partial}{\partial x_3} f_i (a)\,. \end{equation*}\]

Note that the power over the symbol \(\partial\) represents the order of derivatives.

#### Some important notations

Let \(f:D \to \mathbb{R}\) be a function. We write the following, if exist, \[\begin{equation*} \nabla f = \begin{bmatrix} \partial_{x_1} f\\ \vdots \\ \partial_{x_n} f\\ \end{bmatrix} \end{equation*}\]

\[\begin{equation*} \Delta f = \partial_{x_1}^2 f + \dots \partial_{x_n}^2 f \,. \end{equation*}\]

## 4.3 Differentiability

**Definition 4.2 (Differentiability) **Let \(f:\mathbb{R}^n \to \mathbb{R}^m\).
\(f\) is said to be differentiable at \(a \in \mathbb{R}^n\) if
there exists a linear transformation \([Df]_a\) such that for every vector \(\mathbf{h} \in \mathbb{R}^n\)
\[\lim_{|\mathbf{h}| \to 0} \frac{ f(a + \mathbf{h}) - f(a) - [Df]_a \mathbf{h}}{| \mathbf{h} |} = 0 . \]

For \(f:\mathbb{R}^n \to \mathbb{R}^m\), \([Df]_a\) is a \(m\times n\) matrix given by \[[Df]_a = \left[ \frac{\partial }{\partial x_j} f_i (a)\right].\]

This is called the *Jacobian matrix* of \(f\) at \(a\).

For some good intuition, please go to https://mathinsight.org/differentiability_multivariable_definition.

**Theorem 4.2 **Let \(f:\mathbb{R}^n \to \mathbb{R}^m\).
If the partial derivatives \(\partial_j f_i\) exist near \(a\in \mathbb{R}^n\) and are continuous
at \(a\), then \(f\) is differentiable at \(a\).

**Theorem 4.3 **Let \(f:\mathbb{R}^n \to \mathbb{R}^m\).
If \(f\) is differentiable at \(a\) then \(f\) is continuous at \(a\).

## 4.4 Chain rule

**Theorem 4.4 **Let \(f: \mathbb{R}^n \to \mathbb{R}^l, g: \mathbb{R}^m \to \mathbb{R}^n\) be
differentiable functions.
Then,
\[ [D (f\circ g)]_a = [Df]_{g(a)} [Dg]_a. \]

Here’s a special case

**Theorem 4.5 **Let \(f: \mathbb{R}^n \to \mathbb{R}, g: \mathbb{R}^m \to \mathbb{R}^n\) be
differentiable functions.
Then,
\[z(y_1, \dots, y_m) = (f\circ g)(y_1, \dots, y_m)\]
is differentiable and
\[\begin{equation*}
\frac{\partial z}{\partial y_i} = \sum_{j=1}^n \frac{\partial f}{\partial x_j} \frac{\partial g_j}{\partial y_i} \,.
\end{equation*}\]

## 4.5 Directional derivative

**Definition 4.3 **Let \(\mathbf{u} \in \mathbb{R}^n\). The directional derivative of \(f:\mathbb{R}^n \to \mathbb{R}\) at \(a\in \mathbb{R}^n\)
in the direction of \(\mathbf{u}\) is the following limit (if exists)
\[\begin{equation*}
D_{\mathbf{u}} f(a) = \lim_{h \to 0} \frac{ f( a + h \mathbf{u}) - f(a)}{h}\,.
\end{equation*}\]

How can one compute directional derivative?

**Theorem 4.6 **If \(f:\mathbb{R}^n \to \mathbb{R}\) is differentiable then
\[\begin{equation*}
D_{\mathbf{u}} f(a) = \nabla f(a) \cdot \mathbf{u} \,.
\end{equation*}\]

## 4.6 Tangent planes

Let’s think about tangent planes in a more systematic way, based on the definition of a plane learned in the first chapter.

Recall the \(c\)-level surface of a function \(f(x,y,z)\) is the collection \[\begin{equation*} \{ (x,y,z) | f(x,y,z) = c \} \,. \end{equation*}\]

**Definition 4.4 **The tangent plane at the point \(P(x_0, y_0, z_0)\) on the \(c\)-level surface of a differentiable \(f\)
is the plane through \(P_0\), normal to \(\nabla f (x_0, y_0, z_0)\).