3.2: Differentiation of Bivariate Functions
- Page ID
- 55642
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\ket}[1]{\left| #1 \right>}\)
\(\newcommand{\bra}[1]{\left< #1 \right|}\)
\(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
\(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
\(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
\(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
\(\newcommand{\expect}[1]{\langle #1 \rangle}\)
\(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)
Let us briefly consider differentiation of bivariate functions. For simplicity, we restrict ourselves to estimation of the first derivative, i.e., the gradient.
Example 3.2.1 first-order gradient
Following the procedure for estimating the first derivative of univariate functions, we first construct a polynomial interpolant and then evaluate its derivative. In particular, we consider a linear interpolant on a triangle. Recall the second form of linear interpolant, \[(\mathcal{I} f)(\boldsymbol{x})=f\left(\bar{x}^{\mathbf{1}}\right)+b^{\prime}\left(x-\bar{x}^{1}\right)+c^{\prime}\left(y-\bar{y}^{1}\right) .\] The partial derivative in the \(x\)-direction is \[\frac{\partial(\mathcal{I} f)}{\partial x}=b^{\prime}=\frac{1}{A}\left[\left(f\left(\overline{\boldsymbol{x}}^{2}\right)-f\left(\overline{\boldsymbol{x}}^{1}\right)\right)\left(\bar{y}^{3}-\bar{y}^{1}\right)-\left(f\left(\overline{\boldsymbol{x}}^{3}\right)-f\left(\overline{\boldsymbol{x}}^{1}\right)\right)\left(\bar{y}^{2}-\bar{y}^{1}\right)\right],\] where we recall that \(A\) is twice the area of the triangle, i.e., \(A=\left(x_{2}-x_{1}\right)\left(y_{3}-y_{1}\right)-\left(x_{3}-x_{1}\right)\left(y_{2}-y_{1}\right)\). Similarly, the derivative in the \(y\)-direction is \[\frac{\partial(\mathcal{I} f)}{\partial y}=c^{\prime}=\frac{1}{A}\left[\left(f\left(\overline{\boldsymbol{x}}^{3}\right)-f\left(\overline{\boldsymbol{x}}^{1}\right)\right)\left(\bar{x}^{2}-\bar{x}^{1}\right)-\left(f\left(\overline{\boldsymbol{x}}^{2}\right)-f\left(\overline{\boldsymbol{x}}^{1}\right)\right)\left(\bar{x}^{3}-\bar{x}^{1}\right)\right] .\] In general, a directional derivative in the direction \(s=\left(s_{x}, s_{y}\right)\) is \[\frac{\partial(\mathcal{I} f)}{\partial s}=s_{x} \frac{\partial(\mathcal{I} f)}{\partial x}+s_{y} \frac{\partial(\mathcal{I} f)}{\partial y}=s_{x} b^{\prime}+s_{y} c^{\prime}\] Because the gradient approximation is constructed from a linear function, the gradient estimate is constant over the triangle. The approximation is first-order accurate.

