Mathematical Analysis

Lecture 24

12.1.2 Partial derivatives

Definition 12.1.2. Let $f \colon U \to \R$ be a function on an open set $U \subseteq \R^n.$ If the following limit exists, we write

$ \ds\frac{\partial f}{\partial x_j} (x) := \lim_{h\to 0}\frac{f(x_1,\ldots,x_{j-1},x_j+h,x_{j+1},\ldots,x_n)-f(x)}{h}$

$= \ds \lim_{h\to 0}\frac{f(x+h e_j)-f(x)}{h} .\qquad \qquad \;\;\;\;\; $





12.1.2 Partial derivatives

$ \ds\frac{\partial f}{\partial x_j} (x) = \ds \lim_{h\to 0}\frac{f(x+h e_j)-f(x)}{h} $

We call $\dfrac{\partial f}{\partial x_j} (x)$ the partial derivative of $f$ with respect to $x_j$. Here $h$ is a number not a vector.

For a mapping $f \colon U \to \R^m$ we write $f = (f_1,f_2,\ldots,f_m),$ where $f_k$ are real-valued functions.

Then we take partial derivatives of the components: $\dfrac{\partial f_k}{\partial x_j}.$



12.1.2 Partial derivatives


12.1.2 Partial derivatives

Theorem 12.1.5. Suppose that $U \subseteq \R^n$ is an open set and that $f \colon U \to \R^m$ is differentiable. Then all the partial derivatives at $p$ exist and, in terms of the standard bases of $\R^n$ and $\R^m,$ $f'(p)$ is represented by the matrix

$ \begin{bmatrix} \dfrac{\partial f_1}{\partial x_1}(p) & \dfrac{\partial f_1}{\partial x_2}(p) & \ldots & \dfrac{\partial f_1}{\partial x_n}(p) \\[6pt] \dfrac{\partial f_2}{\partial x_1}(p) & \dfrac{\partial f_2}{\partial x_2}(p) & \ldots & \dfrac{\partial f_2}{\partial x_n}(p) \\ \vdots & \vdots & \ddots & \vdots \\ \dfrac{\partial f_m}{\partial x_1}(p) & \dfrac{\partial f_m}{\partial x_2}(p) & \ldots & \dfrac{\partial f_m}{\partial x_n}(p) \end{bmatrix} . $


12.1.2 Partial derivatives

Remark: The converse of the previous Theorem 12.1.5 is not true. Just because the partial derivatives exist, does not mean that the function is differentiable.

However, when the partial derivatives are continuous, the converse holds. One of the consequences of this Theorem is that if $f$ is differentiable on $U,$ then

$f' \colon U \to L(\R^n,\R^m)$ is a continuous function

$\iff$ all the $\dfrac{\partial f_k}{\partial x_j}$ are continuous functions.


Example 12.1.3.

Let $f:\R^3\to \R^3$ defined by \[ f(x,y,z):= \left( x^2+y-z, xyz^2, 2xy -y^2z \right) \]

Note that $f$ is differentiable at any \[ p = (x,y,z)\in \R^3. \]




Example 12.1.3.

$ f(x,y,z):= \left( x^2+y-z, xyz^2, 2xy -y^2z \right) $

$\Ra$ $f'(p)$ $=\begin{bmatrix} \dfrac{\partial f_1}{\partial x_1}(p) & \dfrac{\partial f_1}{\partial x_2}(p) & \dfrac{\partial f_1}{\partial x_3}(p) \\[6pt] \dfrac{\partial f_2}{\partial x_1}(p) & \dfrac{\partial f_2}{\partial x_2}(p) & \dfrac{\partial f_2}{\partial x_3}(p) \\[6pt] \dfrac{\partial f_3}{\partial x_1}(p) & \dfrac{\partial f_3}{\partial x_2}(p) & \dfrac{\partial f_3}{\partial x_3}(p) \end{bmatrix}$




Example 12.1.3.

$ f(x,y,z):= \left( x^2+y-z, xyz^2, 2xy -y^2z \right) $

$f'(p)=$ $\begin{bmatrix} \dfrac{\partial \left(x^2+y-z\right)}{\partial x}(p) & \dfrac{\partial \left(x^2+y-z\right)}{\partial y}(p) & \dfrac{\partial \left(x^2+y-z\right)}{\partial z}(p) \\[6pt] \dfrac{\partial \left(xyz^2\right)}{\partial x}(p) & \dfrac{\partial \left(xyz^2\right)}{\partial y}(p) & \dfrac{\partial \left(xyz^2\right)}{\partial z}(p) \\[6pt] \dfrac{\partial \left(2xy-y^2z\right)}{\partial x}(p) & \dfrac{\partial \left(2xy-y^2z\right)}{\partial y}(p) & \dfrac{\partial \left(2xy-y^2z\right)}{\partial z}(p) \end{bmatrix}$





Example 12.1.3.

$ f(x,y,z):= \left( x^2+y-z, xyz^2, 2xy -y^2z \right) $

$f'(p)$ $= \begin{bmatrix} 2x & 1 & -1 \\[6pt] yz^2 & xz^2 & 2xyz \\[6pt] 2y & 2x-2yz & -y^2 \end{bmatrix}.$

In particular at $p_0=(1,1,1),$ $f'(p_0)= \begin{bmatrix} 2 & 1 & -1 \\[6pt] 1 & 1 & 2 \\[6pt] 2 & 0 & -1 \end{bmatrix}.$



12.1.3 Gradients & directional derivatives

Definition 12.1.3. Let $U \subseteq \R^n$ be open and $f \colon U \to \R$ a differentiable function. We define the gradient as \begin{equation*} \nabla f (x) := \sum_{j=1}^n \frac{\partial f}{\partial x_j} (x)\, e_j . \end{equation*} The gradient gives a way to represent the action of the derivative as a dot product. That is $$f'(x)\,v = \nabla f(x) \pd v.$$


Example 12.1.4.

Let $f:\R^3\to \R$ defined by $f(x, y, z) = x^2y^3z^4.$

$\displaystyle \nabla f (x)$

$\displaystyle =\frac{\partial}{\partial x}\left(x^2y^3z^4\right)e_1$ $\displaystyle +\, \frac{\partial}{\partial y}\left(x^2y^3z^4\right)e_2 $ $\displaystyle + \, \frac{\partial}{\partial z}\left(x^2y^3z^4\right)e_3$

$\displaystyle = 2x~y^3z^4~e_1 $ $\displaystyle + \,3x^2y^2z^4~e_2 $ $\displaystyle + \,4x^2y^3z^3~e_3 \qquad \qquad$

Note $\nabla f$ is a vector. It's length and direction are independent of the choice of coordinates. $\nabla f$ (evaluated at a given point $p\in \R^3$) is in the direction of maximum increase of $f$ at $p$. For example at $(1,1,1),$ we have that

$\nabla f (1,1,1) = 2e_1 + 3 e_2 + 4e_3$ $=(2,3,4).$



12.1.3 Gradients and directional derivatives

Definition 12.1.4. Let $u \in \R^n$ be a vector such that $\snorm{u} = 1,$ and fix $x \in U\subseteq \R^n.$ We define the directional derivative as

$\ds D_u f (x) := \frac{d}{dt}\Big|_{t=0} \bigl[ f(x+tu) \bigr]\qquad \qquad\quad$

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

where the notation $\dfrac{d}{dt}\bigg|_{t=0}$ represents the derivative evaluated at $t=0.$



12.1.3 Gradients and directional derivatives

\begin{equation*} D_u f (x) := \frac{d}{dt}\Big|_{t=0} \bigl[ f(x+tu) \bigr] = \lim_{h\to 0} \frac{f(x+hu)-f(x)}{h} \end{equation*}

Taking the standard basis vector $e_j$ we find that

$\dfrac{\partial f}{\partial x_j} = D_{e_j} f.$

For this reason, sometimes the notation $\dfrac{\partial f}{\partial u}$ is used instead of $D_u f$.



Gradient & Directional derivative of $f:\R^2\to\R$

Gradient


Example 12.1.5

Let $f: \R^3\to \R$ be function defined as \[ f(x,y,z) := 3xyz+2x^2+z^2 \] and $u= (u_1,u_2,u_3)\in \R^3$ with $\norm{u}=1.$

Then

$f(x+ t u_1, y+ t u_2, z + t u_3 )$

$= 3\left( x+ t u_1 \right)\left( y+ t u_2 \right)\left( z+ t u_3 \right)+2\left( x+ t u_1 \right)^2+\left( z+ t u_3 \right)^2$




Example 12.1.5

Then

$f(x+ t u_1, y+ t u_2, z + t u_3 )$

$= 3\left( x+ t u_1 \right)\left( y+ t u_2 \right)\left( z+ t u_3 \right)+2\left( x+ t u_1 \right)^2+\left( z+ t u_3 \right)^2$

$\Ra \ds \frac{d}{dt} f(x+ t u_1, y+ t u_2, z + t u_3 ) $

$\quad =$ $3 u_1\left( y+ t u_2 \right)\left( z+ t u_3 \right)+3u_2 \left( x+ t u_1 \right) \left( z+ t u_3 \right)$

$\qquad \quad +\, 3 u_3 \left( x+ t u_1 \right) \left( y+ t u_2 \right) $ $+\, 4u_1\left( x+ t u_1 \right)$

$\qquad \qquad +\,2u_3\left( z+ t u_3 \right)$




Example 12.1.5

$\ds \frac{d}{dt} f(x+ t u_1, y+ t u_2, z + t u_3 ) $

$\quad =$ $3 u_1\left( y+ t u_2 \right)\left( z+ t u_3 \right)+3u_2 \left( x+ t u_1 \right) \left( z+ t u_3 \right)$

$\qquad \quad +\, 3 u_3 \left( x+ t u_1 \right) \left( y+ t u_2 \right) $ $+\, 4u_1\left( x+ t u_1 \right)$

$\qquad \qquad +\,2u_3\left( z+ t u_3 \right)$

Hence

$\ds D_u f (x,y,z) $ $\ds = \frac{d}{dt}\Big|_{t=0} \biggl[ f(x+ t u_1, y+ t u_2, z + t u_3 ) \biggr]$

$\ds\qquad = \left( 3yz+4x\right) u_1 + \left( 3xz\right) u_2+ \left( 3xy + 2z\right) u_3$



Example 12.1.5

$f(x,y,z) := 3xyz+2x^2+z^2$

$\ds D_u f (x,y,z) $ $\ds = \frac{d}{dt}\Big|_{t=0} \biggl[ f(x+ t u_1, y+ t u_2, z + t u_3 ) \biggr]$

$\ds\qquad = \left( 3yz+4x\right) u_1 + \left( 3xz\right) u_2+ \left( 3xy + 2z\right) u_3$

$\ds\qquad = \lim_{h\to 0} \frac{f\big((x,y,z)+h(u_1,u_2,u_3)\big)-f(x,y,z)}{h}$

Remark: Sometimes it will be easier to work with the limit.



12.1.4 The Jacobian

Definition 12.1.5. Let $U \subseteq \R^n$ and $f \colon U \to \R^n$ be a differentiable mapping. Define the Jacobian, or the Jacobian determinant, of $f$ at $x$ as \begin{equation*} J_f(x) := \det\bigl( f'(x) \bigr) . \end{equation*} Sometimes $J_f$ is written as \begin{equation*} \frac{\partial(f_1,f_2,\ldots,f_n)}{\partial(x_1,x_2,\ldots,x_n)} . \end{equation*}


Example 12.1.6.

Let $f:\R^2\to \R^2$ defined by \[ f(x,y) = \left(x \cos y, x \sin y\right). \]

$\ds \Ra \,f'(x,y) $ $\ds = \begin{bmatrix} \cos y & -x \sin y \\[6pt] \sin y & x \cos y \end{bmatrix}. $

$\ds \Ra J_f(x,y) = \text{det} \left(f'(x,y)\right) $ $\ds =x \cos^2 y + x \sin^2 y$

$\ds = x \left(\sin^2 x+ \cos^2 y\right) $ $\ds =x.\,\;$


Geometric interpretation of vector functions

If we restrict our attention to functions from $\R^n$ to itself, we can think of the components of \[ f(x) = \left(f_1(x),f_2(x),\ldots f_n(x)\right) \] as the coordinates of a point $u = f(x)$ in another "copy" of $\R^n$.

Thus if $u =\left(u_1, u_2, \ldots, u_n\right),$ \[ \Ra u_1 = f_1(x), u_2 = f_2(x), \ldots, u_n = f_n(x). \]


Geometric interpretation of vector functions

We say that $f$ maps $x$ to $u,$ and that $u$ is the image of $x$ under $f.$ If $S\subseteq D_f,$ where $D_f$ is the domain of $f,$ then the set \[ f(S) := \left\{ u : u = f(x), \,x\in S\right\} \] is the image of $S$ under $f.$

Remark: We will often denote the components of elements in $S$ by $x, y, z\ldots,$ and the components of elements in $f(S)$ by $u, v, w\ldots.$


Mappings from $\R^2 \to \R^2$

Explore $f(x,y) = \left(x \cos y, x \sin y\right)$


12.2 Continuously differentiable functions

Definition 12.2.1. Let $U \subseteq \R^n$ be open. We say $f \colon U \to \R^m$ is continuously differentiable, or $C^1(U),$ if $f$ is differentiable and $f' \colon U \to L(\R^n,\R^m)$ is continuous.





12.2 Continuously differentiable functions

Theorem 12.2.1. Let $U \subseteq \R^n$ be open and $f \colon U \to \R^m.$ The function $f$ is continuously differentiable if and only if the partial derivatives $\dfrac{\partial f_j}{\partial x_k}$ exist for all $j$ and $k$ and are continuous.





Differentiable: $f(x,y):= \sin(x-y)+\sin(x+y)$

Non-differentiable at $(0,0)$: $f(x,y):= -\sqrt{x^2+y^2}$

Non-differentiable at $(0,0)$:
$f(x,y):= x^2y/\left(x^2+y^2\right)$ for $(x,y)\neq (0,0)$ and $f(0,0)=0.$

Non-differentiable anywhere: Weierstrass in 3D 🤯

Credits