${}$
Chapter 4: Partial Differentiation
${}$
Section 4.1: FirstOrder Partial Derivatives
${}$

Essentials



What is a Partial Derivative?


${}$
•

For the function $f\left(x\,y\right)$, the first partial derivative with respect to $x$ is the rate of change of $f$ along the cross section $y\=c$. On this cross section, $y$ is held constant, and the derivative of $f$ is taken with respect to $x$. See Figure 4.1.1.

${}$
•

For the function $f\left(x\,y\right)$, the first partial derivative with respect to $y$ is the rate of change of $f$ along the cross section $x\=c$. On this cross section, $x$ is held constant, and the derivative of $f$ is taken with respect to $y$. See Figure 4.1.2.

${}$
$x$ =
=

Figure 4.1.1 First partial with respect to $x$: Slope of the tangent line along cross section $y\=c$




${}$
$y$ =
=

Figure 4.1.2 First partial with respect to $y$: Slope of the tangent line along cross section $x\=c$






${}$
Table 4.1.1 contains the formal definitions for the first partial derivatives of $f\left(x\,y\right)$, and uses the subscript notations ${f}_{x}$ and ${f}_{y}$, to denote the first partials with respect to $x$ and $y$, respectively.
${f}_{x}\left(x\,y\right)\=\underset{h\to 0}{lim}\frac{f\left(x\+h\,y\right)f\left(x\,y\right)}{h}$

${f}_{y}\left(x\,y\right)\=\underset{k\to 0}{lim}\frac{f\left(x\,y\+k\right)f\left(x\,y\right)}{k}$

Table 4.1.1 Formal definitions of the first partial derivatives with respect to $x$ and $y$



${}$


Notations for FirstOrder Partial Derivatives


${}$
•

Recall the two most prevalent notations for ordinary derivatives, listed in Table 4.1.2.

Leibniz

Newton

$\frac{\mathrm{df}}{\mathrm{dx}}$

$f\prime \left(x\right)$

Table 4.1.2 Notations for ordinary derivatives



${}$
•

The advantage of the Newtonian notation is that a derivative, evaluated at $x\=a$, can easily be expressed as $f\prime \left(a\right)$, whereas in the notation of Leibniz, it becomes the much more involved $\genfrac{}{}{0ex}{}{\frac{\mathrm{df}}{\mathrm{dx}}}{\phantom{x\=a}}\genfrac{}{}{0ex}{}{\phantom{\mathrm{f(x)}}}{a\=a}$. Much the same issues prevail for the three common notations used for partial derivatives.

•

The $\frac{d}{\mathrm{dx}}$ operator of Leibniz becomes $\frac{\partial}{\partial x}$ for partial differentiation. The prime of Newtonian notation becomes the subscript seen in Table 4.1.1. And then there's the $\mathrm{D}$operator notation, an alternate form of the Leibniz notation. Of the three, once again the Newtonian notation is the clearest and most compact for expressing the evaluation of a partial derivative at some fixed point. Table 4.1.3 clarifies these issues.

Notation

at $\left(x\,y\right)$

at $\left(x\,y\right)\=\left(a\,b\right)$

Leibniz

$\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$

$\genfrac{}{}{0ex}{}{\frac{\partial f}{\partial x}}{\phantom{x\=a}}\genfrac{}{}{0ex}{}{\phantom{\mathrm{f(x)}}}{\left(x\,y\right)\=\left(a\,b\right)}$ and $\genfrac{}{}{0ex}{}{\frac{\partial f}{\partial y}}{\phantom{x\=a}}\genfrac{}{}{0ex}{}{\phantom{\mathrm{f(x)}}}{\left(x\,y\right)\=\left(a\,b\right)}$

Doperator

${\mathrm{D}}_{1}f$ and ${\mathrm{D}}_{2}f$

$\genfrac{}{}{0ex}{}{{\mathrm{D}}_{1}f}{\phantom{x\=a}}\genfrac{}{}{0ex}{}{\phantom{\mathrm{f(x)}}}{\left(x\,y\right)\=\left(a\,b\right)}$ and $\genfrac{}{}{0ex}{}{{\mathrm{D}}_{2}f}{\phantom{x\=a}}\genfrac{}{}{0ex}{}{\phantom{\mathrm{f(x)}}}{\left(x\,y\right)\=\left(a\,b\right)}$

Subscript

${f}_{x}$ and ${f}_{y}$

${f}_{x}\left(a\,b\right)$ and ${f}_{y}\left(a\,b\right)$

Table 4.1.3 Notations for first partial derivatives



•

The subscripts 1 and 2 on the Doperator refer to the "first" and "second" variables, respectively, in the definition of the function $f\left(x\,y\right)$. The first variable is the first argument, here $x$; the second, is the second argument, here $y$.

•

Sometimes the Leibniz usage is abused when evaluating at a point by writing $\frac{\partial}{\partial x}f\left(a\,b\right)$. In a certain sense, if it is clear that $f$ is really a function of $x$ and $y$, and that $\left(a\,b\right)$ is a point of evaluation, then it is possible to allow this notation to mean "first differentiate, then evaluate." However, this ambiguity will not appear in the remainder of this work. The alert reader will already realize there is a bias towards the subscript notation, which will be even more apparent throughout the remainder of this work.

${}$


FirstOrder Partial Derivatives in Maple


${}$
•

All derivatives in Maple are partial derivatives! The underlying diff command differentiates an expression with respect to a stated variable, holding all other variables constant. The Doperator uses a numeric subscript to indicate the variable of differentiation, and again, holds all other variables constant.

•

However, there are several options for obtaining a partial derivative in a syntaxfree way. All these possibilities are summarized in Table 4.1.4, where, for the sake of clarity, $G$ is the name of an expression in the variables $x$ and $y$ and $g$ is the name of a function of $x$ and $y$.

Mathematical
Notation

Maple Implementation

Comments

Expressions

${}$
${}$
$\frac{\partial G}{\partial x}$

$\mathrm{diff}\left(G\,x\right)$

Type the diff command.

$\frac{\partial}{\partial x}G$

•

Calculus palette: Partial derivative operator
(Template must be used  $\frac{\partial G}{\partial x}$ will not work.)


Context Panel (for the expression):
Differentiate≻With Respect To≻$x$

${}$

Functions

${}$
${}$
${}$
${}$
${}$
${}$
${}$
$\frac{\partial g}{\partial x}$

$\mathrm{diff}\left(g\left(x\,y\right)\,x\right)$

•

Type the diff command.
(Arguments of $g$ must be included.)


$\frac{\partial}{\partial x}g\left(xcomma;y\right)$

•

Calculus palette: Partial derivative operator

•

(Template must be used  $\frac{\partial g\left(x\,y\right)}{\partial x}$ will not work; arguments of $g$ must be included.)${}$


Context Panel (for the name $g$):
Differentiate≻Parameter 1

•

The result is a function, not an expression.


${\mathrm{D}}_{1}\left(g\right)$

•

The subscript must be a tableindex, not a literal.

•

The subscript 1 refers to the first argument of $g$;
a subscript of 2 would refer to the second.

•

The result is a function, not an expression.


${\mathrm{D}}_{1}\left(g\right)\left(x\,y\right)$

•

Returns the expression for the partial derivative.


Table 4.1.4 Mathematical notation for, and Maple implementation of, first partial derivatives



Table 4.1.5 details the mathematical notation for, and Maple implementation of, partial derivatives that are to be evaluated at some point $\left(x\,y\right)\=\left(a\,b\right)$.
Mathematical
Notation

Maple Implementation

Comments

Expressions

${}$
${}$
$\genfrac{}{}{0ex}{}{\frac{\partial G}{\partial x}}{\phantom{x\=a}}\genfrac{}{}{0ex}{}{\phantom{\mathrm{f(x)}}}{\left(x\,y\right)\=\left(a\,b\right)}$

$\mathrm{eval}\left(\mathrm{diff}\left(G\,x\right)\,\left[x\=a\,y\=b\right]\right)$


$\genfrac{}{}{0ex}{}{\frac{\partial}{\partial x}\mathrm{G}}{\phantom{xequals;a}}\genfrac{}{}{0ex}{}{\phantom{\mathrm{f(x)}}}{xequals;acomma;yequals;b}$

•

Expression palette: Evaluation template

•

Calculus palette:
Partialderivative operator


•

Context Panel (for the expression): Differentiate≻With Respect To≻$x$

•

Context Panel: Evaluate at a Point≻$x\=a\,y\=b$


${}$
${G}_{x}\left(a\,b\right)$

${G}_{x}\left(x\,y\right)\=\frac{\partial}{\partial x}G$
${G}_{x}\left(a\,b\right)$

•

Context Panel: Assign Function


Functions

${}$
${}$
$\genfrac{}{}{0ex}{}{\frac{\partial g}{\partial x}}{\phantom{x\=a}}\genfrac{}{}{0ex}{}{\phantom{\mathrm{f(x)}}}{\left(x\,y\right)\=\left(a\,b\right)}$

$\mathrm{eval}\left(\mathrm{diff}\left(g\left(x\,y\right)\,x\right)\,\left[x\=a\,y\=b\right]\right)$


$\genfrac{}{}{0ex}{}{\frac{\partial}{\partial x}g\left(xcomma;y\right)}{\phantom{xequals;a}}\genfrac{}{}{0ex}{}{\phantom{\mathrm{f(x)}}}{xequals;acomma;yequals;b}$

•

Expression palette: Evaluation template

•

Calculus palette:
Partialderivative operator


${\mathrm{D}}_{1}\left(g\right)\left(a\,b\right)$

•

The subscript must be a tableindex, not a literal, that is, not an Atomic Identifier.


${}$
${g}_{x}\left(a\,b\right)$

${\mathrm{D}}_{1}\left(g\right)$
${g}_{x}\left(a\,b\right)$

•

Context Panel: Assign to a Name≻g__x
(The double underscore creates the function name ${g}_{x}$ as an Atomic Identifier.)


Table 4.1.5 Evaluating partial derivatives at a point



•

To implement subscripts as differentiation operators, the name of the function (or expression) and the name for the derivative must be different. Maple does not see the names $f$ and ${f}_{x}$ as sufficiently distinct for these purposes. Hence, if the names are to be related, as in $f$ and ${f}_{x}$, then the subscripted name has to be an Atomic Identifier. It would "work" to use $f$ for the function (or expression) and $F$ for the derivative, without making $F$ an Atomic Identifier, but since there are two possible first partials, a third name would be required! The use of the Atomic Identifier for the subscripted name of the function representing the partial derivative seems to be the best choice.




Examples


${}$
For each $f$ and $\left(a\,b\right)$ in Examples 4.1.(15), obtain ${f}_{x}$ and ${f}_{y}$ both at $\left(x\,y\right)$ and at $\left(a\,b\right)$.
Example 4.1.1

$f\=x\mathrm{sin}\left(y\right)plus;y\mathrm{sin}\left(x\right)$; $\left(a\,b\right)\=\left(\mathrm{\π}\/3\,\mathrm{\π}\/6\right)$

Example 4.1.2

$f\=x{y}^{2}3y2$; $\left(a\,b\right)\=\left(3\,2\right)$

Example 4.1.3

$f\=\mathrm{sin}\left(xy\right)\mathrm{cos}\left(xsol;y\right)$; $\left(a\,b\right)\=\left(1\,1\right)$

Example 4.1.4

$f\={e}^{{x}^{2}\/y}\mathrm{ln}\left({y}^{2}sol;x\right)$; $\left(a\,b\right)\=\left(2\,2\right)$

Example 4.1.5

$f\=\{\begin{array}{cc}\frac{xy\left({x}^{2}{y}^{2}\right)}{{x}^{2}plus;{y}^{2}}& \left(xcomma;y\right)\ne \left(0comma;0\right)\\ 0& \left(xcomma;y\right)equals;\left(0comma;0\right)\end{array}$; $\left(a\,b\right)\=\left(0\,0\right)$



${}$

${}$
<< Chapter Overview Table of Contents Next Section >>
${}$${}$
© Maplesoft, a division of Waterloo Maple Inc., 2021. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
${}$
For more information on Maplesoft products and services, visit www.maplesoft.com
${}$
${}$
${}$
${}$
${}$
${}$
${}$
