Partial Differentiation

Page
Partial Differentiation – HMC Calculus Tutorial

Suppose you want to forecast the weather this weekend in Los Angeles. You construct a formula for the temperature as a function of several environmental variables, each of which is not entirely predictable. Now you would like to see how your weather forecast would change as one particular environmental factor changes, holding all the other factors constant. To do this investigation, you would use the concept of a partial derivative.

Let the temperature $T$ depend on variables $x$ and $y$, $T = f(x,y)$. The rate of change of $f$ with respect to $x$, holding $y$ constant, is called the partial derivative of $f$ with respect to $x$ and is denoted by $f_{x}(x,y)$. Similarly, the rate of change of $f$ with respect to $y$ is called the partial derivative of $f$ with respect to $y$ and is denoted by $f_{y}(x,y)$.

We define

$$ f_{x}(x,y) = \lim_{h \rightarrow 0} \frac{f(x+h,y)-f(x,y)}{h} \phantom{.} $$ $$ f_{y}(x,y) = \lim_{h \rightarrow 0} \frac{f(x,y+h)-f(x,y)}{h}. $$

Do you see the similarity beween these and the limit
definition of a function of one variable?

Example

$\qquad\qquad \begin{array}{rcl@{\qquad}rcl} \displaystyle \mathrm{Let~}f(x,y) & = & xy^{2} & & & \\ \mathrm{Then~}f_{x}(x,y) & = & \lim\limits_{h \rightarrow 0} \frac{(x+h)y^{2}-xy^2}{h} & f_{y}(x,y) & = & \lim\limits_{h \rightarrow 0} \frac{x(y+h)^{2}-xy^2}{h}\\ & = & \lim\limits_{h \rightarrow 0} \frac{hy^{2}}{h} & & = & \lim\limits_{h \rightarrow 0} \frac{2xyh+ xh^{2}}{h} \\ & = & y^{2}. & & = & \lim\limits_{h \rightarrow 0} (2xy + xh) \\ & & & & = & 2xy. \end{array}$

In practice, we use our knowledge of single-variable calculus to compute partial derivatives. To calculate $f_{x}(x,y)$, you view $y$ as a constant and differentiate $f(x,y)$ with respect to $x$: $$ f_{x}(x,y) =y^{2} \mathrm{~as~expected~since~} \frac{d}{dx}[x]= 1. $$ Similarly, $$ f_{y}(x,y) = 2xy \mathrm{~since~} \frac{d}{dy}\left[y^{2}\right]= 2y. $$

Let $f(x,y)= 3x^{2}+ e^{-xy^{2}}$,

Then $$ f_{x}(x,y) = 6x -y^{2}e^{-xy^{2}} \quad \left( \mathrm{since~} \frac{d}{dx}\left[ 3x^{2}\right] = 6x \mathrm{~and~} \frac{d}{dx}\left[ e^{-cx}\right] = -ce^{-cx} \right) $$ $$ f_{y}(x,y) = -2xye^{-xy^{2}} \quad \left( \mathrm{since~} \frac{d}{dy}\left[ c \right] = 0 \mathrm{~and~}\frac{d}{dy}\left [ e^{-cy^{2}}\right] = -2cye^{-cy^{2}}\right). $$

Let $f(x,y)= y\cos (xy)$,

Then

$\quad \displaystyle f_{x}(x,y) = -y^{2}\sin (xy) $

$\quad \displaystyle f_{y}(x,y) = \cos (xy) -xy\sin (xy) \mathrm{~using~the~product~rule}. $

Notation

  • Let $z = f(x,y)$.

    The partial derivative $f_{x}(x,y)$ can also be written as $$ \frac{\partial f}{\partial x}(x,y) \mathrm{~or~} \frac{\partial z}{\partial x}. $$ Similarly, $f_{y}(x,y)$ can also be written as $$ \frac{\partial f}{\partial y}(x,y) \mathrm{~or~} \frac{\partial z}{\partial y}. $$

  • The partial derivative $f_{y}(x,y)$ evaluated at the point $(x_{0},y_{0})$ can be expressed in several ways: $$ f_{x}(x_{0},y_{0}) \mathrm{,~} \left. \frac{\partial f}{\partial x} \right|_{(x_{0},y_{0})} \mathrm{,~or~} \frac{\partial f}{\partial x}(x_{0},y_{0}) . $$

    There are analogous expressions for $f_{y}(x_{0},y_{0})$.

Geometrical Meaning

Suppose the graph of $z = f(x,y)$ is the surface shown. Consider the partial derivative of $f$ with respect to $x$ at a point $(x_{0},y_{0})$.

Holding $y$ constant and varying $x$, we trace out a curve that is the intersection of the surface with the vertical plane $y= y_{0}$.

The partial derivative $f_{x}(x_{0},y_{0})$ measures the change in $z$ per unit increase in $x$ along this curve. That is, $f_{x}(x_{0},y_{0})$ is just the slope of the curve at $(x_{0},y_{0})$. The geometrical interpretation of $f_{y}(x_{0},y_{0})$ is analogous.

Notes

  • Functions of More than Two Variables

    For $g(x,y,z)$, the partial derivative $g_{x}(x,y,z)$ is calculated by holding $y$ and $z$ constant and differentiating with respect to $x$. The partial derivatives $g_{y}(x,y,z)$ and $g_{z}(x,y,z)$ are calculated in an analagous manner.

Let $f(x,y,z) = x^{2}z-3xy^{4}$,

Then $$ f_{x}(x,y,z) = 2xz-3y^{4} $$ $$ f_{y}(x,y,z) = -12xy^{3} $$ $$ f_{z}(x,y,z) = x^{2}. $$

  • Higher-Order Partial Derivatives

    For a function $f(x,y)$, the partial derivatives $\frac{\partial f}{\partial x}$ and $\frac{\partial f}{\partial y}$ are themselves functions of $x$ and $y$, so we can take partial derivatives of them:

    $$ f_{xx}= \frac{\partial}{\partial x} \left( \frac{\partial f}{\partial x} \right) = \frac{\partial^{2} f}{\partial x^{2}} \qquad f_{xy} = \frac{\partial}{\partial y} \left( \frac{\partial f}{\partial x} \right) = \frac{\partial^{2} f}{\partial y \partial x} \phantom{.} $$ $$ f_{yy} = \frac{\partial}{\partial y} \left( \frac{\partial f}{\partial y} \right) = \frac{\partial^{2} f}{\partial y^{2}} \qquad f_{yx} = \frac{\partial}{\partial x} \left( \frac{\partial f}{\partial y} \right) = \frac{\partial^{2} f}{\partial x \partial y}. $$ Higher-order partial derivatives (e.g. $f_{xxy}$) can also be calculated. Using the subscript notation, the order of differentiation is from left to right.

    $f_{xy}$ and $f_{yx}$ are called mixed second-order partial derivatives. If $f$, $f_{x}$, $f_{y}$, $f_{xy}$, and $f_{yx}$ are continuous on an open region, then $f_{xy} = f_{yx}$ at each point in the region, so the order in which the differentiation is done does not matter.

Let $f(x,y) = x^{2}-4xy^{3}$,

Then $$ f_{x}(x,y) = 2x – 4y^{3} $$ $$ f_{y}(x,y) = -12xy^{2} $$ $$ f_{xy}(x,y) = f_{yx}(x,y) = -12y^{2} $$ $$ f_{xx}(x,y) = 2 $$ $$ f_{yy}(x,y) = -24xy. $$

Higher-order partial derivatives can be computed as well!


Key Concepts

Consider a function $f(x,y)$.

$$ f_{x}(x,y) $$ $\quad = \quad$ rate of change of $f$
with respect to $x$
$\quad = \quad$ $$ \lim_{h \rightarrow 0} \frac{f(x+h, y)- f(x,y)}{h} \phantom{.} $$
$$ f_{y}(x,y) $$ $\quad = \quad$ rate of change of $f$
with respect to $y$
$\quad = \quad$ $$ \lim_{h \rightarrow 0} \frac{f(x, y+h)- f(x,y)}{h}. $$

To calculate $f_{x}(x,y)$, differentiate $f$ with respect to $x$ holding $y$ constant. Similarly, to calculate $f_{y}(x,y)$, differentiate $f$ with respect to $y$ holding $x$ constant.


[I’m ready to take the quiz.] [I need to review more.]