Skip to main content

Section 4.1 Basic Definitions

Consider a function \(f\) with domain \(D\subset\mathbb R^N\) with values in \(\mathbb R\text{.}\) For every \(i=1,\dots, n\) we can then define a function of one variable, \(t\text{,}\) by setting
\begin{equation*} g_i(t)=f(a_1,\dots,a_{i-1},a_i+t,a_{i+1},\dots,a_n)\text{.} \end{equation*}
If \(N=2\) then the graph of this function is a cross-section of the graph of \(f\) in the \(i\)-th coordinate direction as seen in Figure 4.1.
Figure 4.1. Cross-sections of the graph of a function through a given point
If \(\vect a\) is an interior point of \(D\) then \(g_i\) is defined on a small interval \(I=(-\varepsilon,\varepsilon )\text{,}\) and zero is an interior point. From the calculus of one variables we know that \(g_i'(0)\) is the slope of the graph of the function \(g_i\) at \(t=0\text{.}\) Hence \(g_i'(0)\) is the slope of the cross-section of the graph of \(f\) through \(\vect a\) in the \(x_i\)-direction. This motivates the following definition.

Definition 4.2. Partial derivative.

Suppose that \(\vect a\) is an interior point of \(D\subset\mathbb R^N\text{,}\) and that \(f\) is a function on \(D\) with values in \(\mathbb R\text{.}\) We define the partial derivative of \(f\) with respect to \(x_i\) at \(\vect a\) by
\begin{align*} \frac{\partial}{\partial x_i}f(\vect a) \amp:=g_i'(0)\\ =\lim_{t\to 0} \frac{1}{t} \Bigl(f(a_1,\dots,a_i+t,\dots,a_N)-f(a_1,\dots,a_i,\dots,a_N)\Bigr) \end{align*}
whenever the limit exists.

Warning 4.3. Notation for derivatives.

There are other possible notations for partial derivatives. We also write
\begin{align*} \frac{\partial}{\partial x_i}f(\vect a) \amp=\frac{\partial f}{\partial x_i}(\vect a)\\ \amp=f_{x_i}(\vect a)\\ \amp=\partial_{x_i}f(\vect a)\\ \amp=\partial_if(\vect a)\text{.} \end{align*}
Look at the symbol for the partial derivative carefully, and practise its writing a little bit.
\begin{equation*} \text{Write }\dfrac{\partial}{\partial x_i} \text{ and NOT } \dfrac{\delta}{\delta x_i} \text{ or } \dfrac{d}{dx_i} \end{equation*}
as it is often seen among beginning students. The last two symbols have a meaning on their own right, the first being the ‘variation’, and the other being the ‘total derivative’ of a function. An example showing the difference between partial and total derivatives will be shown in Example 4.23.
Given a function of \(N\) variables we can form a vector having as its components the partial derivatives of that function.

Definition 4.4. Gradient.

Suppose \(f\) is a function defined on \(D\subset\mathbb R^N\) having partial derivatives with respect to all \(N\) variables at the interior point \(\vect a\text{.}\) Then the vector
\begin{align*} \grad f(\vect a)\amp=\nabla f(\vect a)\\ \amp=\Bigl(\frac{\partial f}{\partial x_1}(\vect a),\dots, \frac{\partial f}{\partial x_N}(\vect a)\Bigr) \end{align*}
is called the gradient of \(f\) at \(\vect a\).
We conclude this section by some examples.

Example 4.5.

Consider \(f(x,y):=x^2-y^2\) defined on \(\mathbb R^2\text{.}\) To compute its derivatives we treat one variable as a constant, and differentiate with respect to the other:
\begin{equation*} \frac{\partial}{\partial x}f(x,y)=2x,\qquad \frac{\partial}{\partial y}f(x,y)=-2y\text{.} \end{equation*}
The gradient of the function is
\begin{equation*} \nabla f(x,y)=(2x,-2y)=2(x,-y)\text{.} \end{equation*}

Example 4.6.

Compute the partial derivatives and the gradient of the function \(f\) given by \(f(x,y,z,t):=(x^2+y^2+z^2)e^{-t}\text{.}\)
Solution.
As in the previous example we treat all variables as constants except for one. Hence the partial derivatives are
\begin{align*} \frac{\partial f}{\partial x}\amp=2xe^{-t},\amp \frac{\partial f}{\partial y}\amp=2ye^{-t},\amp \frac{\partial f}{\partial z}\amp=2ze^{-t},\amp \frac{\partial f}{\partial t}\amp=-(x^2+y^2+z^2)e^{-t}\text{.} \end{align*}
The gradient is
\begin{align*} \grad f(x,y,z,t)\amp =(2xe^{-t},2ye^{-t},2ze^{-t},-(x^2+y^2+z^2)e^{-t})\\ \amp =\bigl(2x,2y,2z,-(x^2+y^2+z^2)\bigr)e^{-t}\text{.} \end{align*}

Example 4.7.

Compute the partial derivatives of \(f(x,y):=x/y\) on its domain of definition.
Solution.
We saw in Example 3.27 that \(\mathbb R^2\) minus the \(x\)-axis is the domain of the function under consideration. Hence, if \(x\neq 0\) then
\begin{align*} \frac{\partial}{\partial x}f(x,y)\amp=\frac{1}{y},\amp \frac{\partial}{\partial y}f(x,y)\amp=-\frac{x}{y^2}\text{.} \end{align*}

Example 4.8.

Compute the gradient of \(f(x,t):=x^t\) defined for \(x\gt 0\) and \(t\in\mathbb R\text{.}\)
Solution.
We first compute the partial derivatives:
\begin{align*} \frac{\partial}{\partial x}f(x,t)\amp=tx^{t-1}\\ \frac{\partial}{\partial t}f(x,t) \amp=\frac{\partial}{\partial t}e^{t\ln x} =e^{t\ln x}\ln x =x^t\ln x\text{.} \end{align*}
Hence the gradient of \(f\) is
\begin{equation*} \grad f(x,t)=(tx^{t-1},x^t\ln x)=x^t(tx^{-1},\ln x)\text{.} \end{equation*}

Example 4.9.

Define the function \(f\) on \(\mathbb R^2\) by setting
\begin{equation*} f(s,t):= \begin{cases} \dfrac{st^2}{s^2+t^2} \amp \text{if }(s,t)\neq (0,0), \\ 0 \amp \text{if }(s,t)=(0,0) \end{cases} \end{equation*}
Determine whether \(f\) has partial derivatives at \((0,0)\text{.}\) Determine the gradient at \((0,0)\) if it exists.
Solution.
By definition of the partial derivative with respect to \(s\) we have
\begin{equation*} \frac{\partial f}{\partial s}f(0,0) =\lim_{h\to 0}\frac{1}{h}\Bigl( \frac{(0+h)0^2}{(0+h)^2+0^2}-0\Bigr) =\lim_{h\to 0}0=0 \end{equation*}
Similarly we have
\begin{equation*} \frac{\partial f}{\partial t}f(0,0) =\lim_{h\to 0}\frac{1}{h}\Bigl( \frac{0(0+h)^2}{0^2+(0+h)^2}-0\Bigr) =\lim_{h\to 0}0=0\text{.} \end{equation*}
Hence both partial derivatives exist, and thus \(\grad f(0,0)=(0,0)\text{.}\) Look at the cross-sections through the graph of \(f\) shown in Figure 3.29 along the coordinate axis to visualise the result.

Example 4.10.

Consider the function \(f\) on \(\mathbb R^2\) defined by
\begin{equation*} f(x,y):= \begin{cases} \dfrac{xy^2}{x^2+y^4} \amp \text{if }(x,y)\neq (0,0), \\ 0 \amp \text{if }(x,y)=(0,0). \end{cases} \end{equation*}
Determine whether \(f\) has partial derivatives at \((0,0)\text{,}\) and determine them if possible.
Solution.
By the definition of partial derivatives we have
\begin{equation*} \frac{\partial f}{\partial x}f(0,0) =\lim_{t\to 0}\frac{1}{t}\Bigl( \frac{t0^2}{t^2+0^4}-0\Bigr) =\lim_{t\to 0}0=0 \end{equation*}
and
\begin{equation*} \frac{\partial f}{\partial y}f(0,0) =\lim_{t\to 0}\frac{1}{t}\Bigl( \frac{0t^2}{0^2+t^4}-0\Bigr) =\lim_{t\to 0}0=0\text{.} \end{equation*}
Hence both partial derivatives exist and are zero.

Remark 4.11.

For functions of one variable we know that differentiability at a point implies continuity of the function at that point. Note however, that the existence of all partial derivatives of a function of several variables does not imply the continuity of the function at the corresponding point: The function considered in the previous example has partial derivatives at \((0,0)\text{,}\) but is discontinuous at \((0,0)\) as shown in Example 3.30.