4.4 Partial derivatives


surface1


Figure 4.5: The surface z = f(x,y) =\mathop{ sin}\nolimits (x)\mathop{sin}\nolimits (y).


surface2


Figure 4.6: The surface z = f(x,y) =\mathop{ sin}\nolimits (\sqrt{{x}^{2 } + {y}^{2}}).

In Figs. 4.5 and 4.6 we show an example of functions of more than one variable. Clearly it is very easy to pick out the minima and maxima, since we can make a very visual representation of such a function as a surface by the identification of the “height” z with the output of the function. In more than two dimensions, i.e., when we have a function that takes three or more arguments, and returns one value, we can’t use the visual analogy. So how do we deal with that? We need to generalise derivatives to more than one dimension.


small˙square


Figure 4.7: A small square δx by δy on the surface of a 2D function.

Let us study the situation in two dimensions, and generalise to three and more dimensions later. We shall look at a very small part of the surface, as in Fig. 4.7. The change in the function due to taking small steps in both variables simultaneously (the most general one possible), is

f(x + δx,y + δy) − f(x,y) = δx{f(x + δx,y) − f(x,y)\over δx} + δy{f(x + δx,y + δy) − f(x + δx,y)\over δy} + ...,
(4.2)

where, just as in one dimension, the three dots denote terms of higher power in the small numbers δx and δy. The expression is not symmetric under the interchange of x and y, and we need to take one more step. The second term can be transformed back to refer to x rather than x + δx by making an error proportional to δx. But that corresponds to a term δxδy which is much smaller than the two terms already there if δx and δy are small. Thus

f(x + δx,y + δy) − f(x,y) = δx{f(x + δx,y) − f(x,y)\over δx} + δy{f(x,y + δy) − f(x,y)\over δy} + ...,
(4.3)

This show that a general change in the function can be expanded into a change in the individual variables, keeping the other fixed. In the limit of δx and δy going to zero this gives rise to the partial derivatives, denoted by a curly . In mathematical notation

\begin{eqnarray} {f(x + δx,y) − f(x,y)\over δx} → {∂f\over ∂x} = {d\over dx}{\left (f(x,y)\right )}_{\text{$y$ fixed}},& & %&(4.4) \\ {f(x,y + δy) − f(x,y)\over δy} → {∂f\over ∂y} = {d\over dy}{\left (f(x,y)\right )}_{\text{$x$ fixed}}.& & %&(4.5) \\ \end{eqnarray}

Example 4.16: 

Given u(x,y) = {x}^{3} + {x}^{2}y + xy + {y}^{3}, find {∂u\over ∂x} and {∂u\over ∂y}.

Solution: 

\begin{eqnarray*} {∂u\over ∂x}& =& 3{x}^{2} + 2xy + y + 0,%& \\ {∂u\over ∂y}& =& 0 + {x}^{2} + x + 3{y}^{2}. %& \\ & & %& \\ \end{eqnarray*}

where the terms are the partial derivatives of each of the four terms in the function.

From f(x + δx,y + δy) − f(x,y) ≈ {∂f\over ∂x}δx + {∂f\over ∂y}δy we obtain that when both partial derivatives are zero we have an extremum (minimum or maximum or ...), where the function is “flat” in first approximation. We thus need to solve a simultaneous set of equations for such a thing to occur.


cuboid


Figure 4.8: A cuboid a × b × c.

Example 4.17: 

Calculate the minimum surface area for a cuboid of size a × b × c, Fig. 4.8, for fixed volume V .

Solution: 

The volume V is simply abc. The surface is the area of the six rectangular sides, S = 2ab + 2ac + 2bc. The only problem is the constraint of constant volume. We can use that to eliminate one of the three variables from the problem, we choose c: c = V∕(ab). Thus

S = 2ab + {2V \over b} + {2V \over a} .
(4.6)

Now differentiate this with respect to a and b, and find

\begin{eqnarray} {∂S\over a} & =& 2b −{2V \over {a}^{2}} ,%& \\ {∂S\over b} & =& 2a −{2V \over {b}^{2}} .%&(4.7) \\ \end{eqnarray}

These must both equal zero, and we get the equations

\begin{eqnarray} 2b& =& {2V \over {a}^{2}} ,%& \\ 2a& =& {2V \over {b}^{2}} .%&(4.8) \\ \end{eqnarray}

Substitute the first equation into the l.h.s. of the second equation, and find

a = −V {a}^{4},
(4.9)

which can be rewritten as a(1 − V {a}^{3}) = 0. Clearly the solution a = 0 is nonsensical (since b must be infinite), and we find

\class{boxed}{a = b = c = {V }^{1∕3}, }

and the minimum surface is found for a cube.

4.4.1 Multiple partial derivatives

Multiple partial derivatives are defined straightforwardly as the partial derivative of the partial derivative,

\begin{eqnarray*} {{∂}^{2}f\over ∂{x}^{2}}& =& {∂\over ∂x}\left ({∂f\over ∂x}\right ), %& \\ {{∂}^{3}f\over ∂{x}^{3}}& =& {∂\over ∂x}\left ({{∂}^{2}f\over ∂{x}^{2}}\right ).%& \\ \end{eqnarray*}

Slightly more complicated are the mixed ones,

\begin{eqnarray*} {{∂}^{2}f\over ∂x∂y}& =& {∂\over ∂x}\left ({∂f\over ∂y}\right ),%& \\ {{∂}^{2}f\over ∂y∂x}& =& {∂\over ∂y}\left ({∂f\over ∂x}\right ). %& \\ \end{eqnarray*}

Even though this looks complicated, it can be shown that the order of differentiation actually doesn’t matter!

Example 4.18: 

Find all first and second derivatives of f(x,y) = x\mathop{sin}\nolimits y +\mathop{ cos}\nolimits (x − y).

Solution: 

\begin{eqnarray*} {∂f\over ∂x}& =& \mathop{sin}\nolimits y −\mathop{ sin}\nolimits (x − y), %& \\ {∂f\over ∂y}& =& x\mathop{cos}\nolimits y +\mathop{ sin}\nolimits (x − y), %& \\ {{∂}^{2}f\over ∂{x}^{2}}& =& 0 −\mathop{ cos}\nolimits (x − y), %& \\ {{∂}^{2}f\over ∂{y}^{2}} & =& −x\mathop{sin}\nolimits y −\mathop{ cos}\nolimits (x − y),%& \\ {{∂}^{2}f\over ∂y∂x}& =& \mathop{cos}\nolimits y +\mathop{ cos}\nolimits (x − y), %& \\ {{∂}^{2}f\over ∂x∂y}& =& \mathop{cos}\nolimits y +\mathop{ cos}\nolimits (x − y), %& \\ \end{eqnarray*}

where the last two terms have been calculated in the order indicated in the denominator, and we see the equality alluded to above.