]> Partial derivatives

### Chapter 3: Many Variables; Section 1: Differentiation; page 2

Previous topic: page 1 Functions of Many Variables

Next topic: page 3 Derivatives of Higher Order

# Partial Derivatives

## Definition

We define the partial derivative of a function

 $y=f\left({x}_{1},..,{x}_{k},..,{x}_{n}\right)$ (3.1.2.1)

with respect to the variable xk, as the limit

 $\frac{\partial y}{\partial {x}_{k}}=\frac{\partial f}{\partial {x}_{k}}=\underset{\Delta {x}_{k}\to 0}{\mathrm{lim}}\frac{f\left({x}_{1},..,{x}_{k-1},{x}_{k}+\Delta {x}_{k},{x}_{k+1},..,{x}_{n}\right)-f\left({x}_{1},..,{x}_{k},..,{x}_{n}\right)}{\Delta {x}_{k}}$ (3.1.2.2)

In other words, this is the regular derivative of the function with respect to the variable xk, while all the other variables are kept constant. The notation of rounded "$\partial$" instead of the common "d" is used, in order to emphasize the partiality of the derivative. As it will be demonstrated, the partial derivatives differ from the regular one by their properties, and therefore the use of a different notation is essential. From the definition it follows that the number of the partial derivatives of a function is equal to the number of the independent variables. Each one of the partial derivatives is a function of these variables, or of part of them.

As an example

 $\begin{array}{l}\left\{\begin{array}{l}\text{for}\text{ }f\left(x,y,z\right)=\mathrm{ln}y\text{\hspace{0.17em}}\mathrm{exp}x+az\left(y+b\right)\\ \text{with}\text{ }a,b=\text{constants}\end{array}\\ \frac{\partial f}{\partial x}=\mathrm{ln}y\text{\hspace{0.17em}}\mathrm{exp}x\\ \frac{\partial f}{\partial y}=\frac{\mathrm{exp}x}{y}+az\\ \frac{\partial f}{\partial z}=a\left(y+b\right)\end{array}\right\}$ (3.1.2.3)

Unlike the regular derivatives, the continuity of a function is not a necessary condition for the existence of the partial derivatives. This is equivalent to the statement that the existence of all the partial derivatives alone do not imply the continuity of the function.

This is illustrated in the example of the function of two variables

 $z=\frac{{x}^{2}-{y}^{2}}{{x}^{2}+{y}^{2}}$ (3.1.2.4)

which has a point of discontinuity at  x = y = 0 , as it was shown by the analysis of (3.1.1.15) on the previous page. The corresponding partial derivatives are

 $\begin{array}{l}\frac{\partial z}{\partial x}=\frac{2x\left[\left({x}^{2}+{y}^{2}\right)-\left({x}^{2}-{y}^{2}\right)\right]}{{\left({x}^{2}+{y}^{2}\right)}^{2}}=\frac{4x{y}^{2}}{{\left({x}^{2}+{y}^{2}\right)}^{2}}\\ \frac{\partial z}{\partial y}=\frac{-2y\left[\left({x}^{2}+{y}^{2}\right)+\left({x}^{2}-{y}^{2}\right)\right]}{{\left({x}^{2}+{y}^{2}\right)}^{2}}=\frac{-4{x}^{2}y}{{\left({x}^{2}+{y}^{2}\right)}^{2}}\end{array}\right\}$ (3.1.2.5)

Both partial derivatives exist and vanish for x→0 and y→0 , independently of the limit's order of variables, in spite of the discontinuity of the function. Although this seems a bit odd, it does not contradict the previously stated property.

On the other hand, there exists a more restrictive requirement for the partial derivatives: the continuity of all the partial derivatives implies the continuity of the function.

The application of this property for the function (3.1.2.4) means that we should check, if in this example, the partial derivatives (3.1.2.5) are continuous at the origin x=y=0 . If they are, we'll have a real contradiction. This will be done by repeating the procedure already applied on the previous page, namely we'll approach the origin from different directions, by the aid of the lines (3.1.1.17): y=kx, where k is a non-vanishing finite constant. This yields

 $\begin{array}{l}\underset{x\to 0}{\mathrm{lim}}\frac{\partial z}{\partial x}=\underset{x\to 0}{\mathrm{lim}}\frac{4{k}^{2}{x}^{3}}{{\left(1+{k}^{2}\right)}^{2}{x}^{4}}\to ±\infty \\ \underset{x\to 0}{\mathrm{lim}}\frac{\partial z}{\partial x}=\underset{x\to 0}{\mathrm{lim}}\frac{-4k{x}^{3}}{{\left(1+{k}^{2}\right)}^{2}{x}^{4}}\to \mp \infty \end{array}\right\}$ (3.1.2.6)

that contradicts the previously found result of vanishing derivatives (3.1.2.5) at the origin. Therefore the partial derivatives are not continuous at the origin, and the function (3.1.2.4) itself does not have to be continuous there either.

## Total differential

In order to partially differentiate the function (3.1.2.1) with respect to xk, we used in (3.1.2.2) a partial increment of the function, where only xk was incremented, and the rest of the independent variables were not. We are going to define a total increment of the function (3.1.2.1), subject to the increments of all the independent variables:

 $\Delta y=f\left({x}_{1}+\Delta {x}_{1},\text{\hspace{0.17em}}...,\text{\hspace{0.17em}}{x}_{n}+\Delta {x}_{n}\right)-f\left({x}_{1},\text{\hspace{0.17em}}...,\text{\hspace{0.17em}}{x}_{n}\right)$ (3.1.2.7)

For the sake of simplicity, we'll use a function of two variables

 $\begin{array}{l}z=f\left(x,y\right)\text{ }\text{yielding}\\ \Delta z=f\left(x+\Delta x,y+\Delta y\right)-f\left(x,y\right)\end{array}\right\}$ (3.1.2.8)

which can be rewritten as

 $\begin{array}{l}\Delta z=\left\{\begin{array}{l}f\left(x+\Delta x,y+\Delta y\right)-f\left(x,y+\Delta y\right)\\ +f\left(x,y+\Delta y\right)-f\left(x,y\right)=\end{array}\\ =\left\{\begin{array}{l}\frac{f\left(x+\Delta x,y+\Delta y\right)-f\left(x,y+\Delta y\right)}{\Delta x}\Delta x+\\ +\frac{f\left(x,y+\Delta y\right)-f\left(x,y\right)}{\Delta y}\Delta y\end{array}\end{array}\right\}$ (3.1.2.9)

For Δx→0 and Δy→0 one obtains the following symbolic expression for the total differential of z :

 $\text{d}z=\frac{\partial f}{\partial x}\text{d}x+\frac{\partial f}{\partial y}\text{dy}$ (3.1.2.10)

The name "total" was chosen, since the differential was obtained from a total increment. By the same procedure, the total differential of the function (3.1.2.1) is

 $\text{d}y=\sum _{k=1}^{n}\frac{\partial f}{\partial {x}_{k}}\text{d}{x}_{k}$ (3.1.2.11)

The total differential has the same properties as the differential we know from the functions of one variable. It means for example that a division by another differential yields the appropriate derivative. For this reason the adjective "total" is omitted in some of the text-books.

As a physical example, we'll take the main law of thermodynamics for a system of fluids, expressed as a total differential. The internal energy of the system U can be written as a function of two variables: entropy S - related to the heat of the system and V - the volume. According to the definition (3.1.2.10), the total differential of U is

 $\text{d}U={\left(\frac{\partial U}{\partial S}\right)}_{V}\text{d}S+{\left(\frac{\partial U}{\partial V}\right)}_{S}\text{d}V$ (3.1.2.12)

where the increment of the total energy is due to the increment of the heat, and that of the mechanical work.

The main law of thermodynamics states that

 $\text{d}U=T\text{d}S-p\text{d}V$ (3.1.2.13)

meaning that

 $\begin{array}{l}T\text{\hspace{0.28em}}\left(\text{temperature}\right)={\left(\frac{\partial U}{\partial S}\right)}_{V}\\ p\text{\hspace{0.28em}}\left(\text{pressure}\right)=-{\left(\frac{\partial U}{\partial V}\right)}_{S}\end{array}\right\}$ (3.1.2.14)

## Function of functions

A function of functions with one variable is defined by

 $y=F\left[{f}_{1}\left(x\right),....,{f}_{n}\left(x\right)\right]$ (3.1.2.15)

The derivative of (3.1.2.15) was not studied so far, and we are now ready to deal with this problem. Since F is a function of the n variables fk, one obtains from (3.1.2.11)

 $\text{d}y=\sum _{k=1}^{n}\frac{\partial F}{\partial {f}_{k}}\text{d}{f}_{k}$ (3.1.2.16)

which after division by dx yields the following chain rule for the derivative:

 $\frac{\text{d}y}{\text{d}x}=\sum _{k=1}^{n}\frac{\partial F}{\partial {f}_{k}}\frac{\text{d}{f}_{k}}{\text{d}x}$ (3.1.2.17)

The following example shows the use of (3.1.2.17)

 $\begin{array}{l}y=F\left[{f}_{1}\left(x\right),{f}_{2}\left(x\right)\right]={f}_{1}{\left(x\right)}^{{f}_{2}\left(x\right)}\\ \frac{\text{d}y}{\text{d}x}=\frac{\partial F}{\partial {f}_{1}}\frac{\text{d}{f}_{1}}{\text{d}x}+\frac{\partial F}{\partial {f}_{2}}\frac{\text{d}{f}_{2}}{\text{d}x}=\\ ={f}_{2}{f}_{1}^{\left({f}_{2}-1\right)}\frac{\text{d}{f}_{1}}{\text{d}x}+{f}_{1}^{{f}_{2}}\mathrm{ln}{f}_{1}\frac{\text{d}{f}_{2}}{\text{d}x}=\\ ={f}_{1}^{\left({f}_{2}-1\right)}\left({f}_{2}\frac{\text{d}{f}_{1}}{\text{d}x}+{f}_{1}\mathrm{ln}{f}_{1}\frac{\text{d}{f}_{2}}{\text{d}x}\right)\end{array}\right\}$ (3.1.2.18)

For instance, one obtains from (3.1.2.18)

 $\frac{\text{d}}{\text{d}x}{x}^{x-1}={x}^{x-2}\left(x-1+x\mathrm{ln}x\right)={x}^{x-1}\left(\frac{x-1}{x}+\mathrm{ln}x\right)$ (3.1.2.19)

the same result as (1.3.3.13), that we obtained indirectly in chapter 1 by differentiating the logarithm of the function.

## Implicit functions

We already know from chapter1 how to obtain the derivative of an implicit function of one variable. The partial differentiation offer another way of calculating this derivative. By definition, an implicit function is presented by the general expression

 $F\left[x,y\left(x\right)\right]=0$ (3.1.2.20)

where y is the dependent variable, considered as a function of x.

In (3.1.2.20) F can be considered as a function of two variables, therefore according to the chain rule (3.1.2.16), one can write

 $\frac{\text{d}F}{\text{d}x}=\frac{\partial F}{\partial x}\frac{\text{d}x}{\text{d}x}+\frac{\partial F}{\partial y}\frac{\text{d}y}{\text{d}x}=\frac{\partial F}{\partial x}+\frac{\partial F}{\partial y}\frac{\text{d}y}{\text{d}x}=0$ (3.1.2.21)

which yields

 $\frac{\text{d}y}{\text{d}x}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial y}}$ (3.1.2.22)

Notice that (3.1.2.22) does not fulfill the arithmetic rules of the differentials. This should not be surprising, since on the right-hand side the ratio contains partial differentials.

As an example, let's obtain the derivative of the "Folium of Descartes" defined by

 $F\left(x,y\right)={x}^{3}-3axy+{y}^{3}=0$ (3.1.2.23)

The use of (3.1.2.22) yields in this case

 $\frac{\text{d}y}{\text{d}x}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial y}}=-\frac{3{x}^{2}-3ay}{3{y}^{2}-3ax}=\frac{ay-{x}^{2}}{{y}^{2}-ax}$ (3.1.2.24)

in agreement with (1.3.3.2).

An implicit function of n variables have the general form of

 $F\left[{x}_{1},....,{x}_{n},\text{\hspace{0.17em}}y\left({x}_{1},....,{x}_{n}\right)\right]=0$ (3.1.2.25)

By taking into account that a partial derivative with respect to one of the variables is equivalent to a regular derivative, with constant values of the rest of the variables, we obtain similarly to (3.1.2.21)

 $\begin{array}{l}\frac{\partial F}{\partial {x}_{k}}+\frac{\partial F}{\partial y}\frac{\partial y}{\partial {x}_{k}}=0\text{ }\text{yielding}\\ \frac{\partial y}{\partial {x}_{k}}=-\text{\hspace{0.17em}}\frac{\frac{\partial F}{\partial {x}_{k}}}{\frac{\partial F}{\partial y}}\text{ }\text{for}\text{ }k=1,....,n\end{array}\right\}$ (3.1.2.26)

For example, the partial derivatives of the implicit function z with respect to the variables x and y will be calculated for the following case:

 $\begin{array}{l}F\left(x,y,z\right)={x}^{3}y+\mathrm{cos}z-{z}^{2}=0\\ \frac{\partial z}{\partial x}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial z}}=\frac{3{x}^{2}y}{\mathrm{sin}z+2z}\\ \frac{\partial z}{\partial y}=-\frac{\frac{\partial F}{\partial y}}{\frac{\partial F}{\partial z}}=\frac{{x}^{3}}{\mathrm{sin}z+2z}\end{array}\right\}$ (3.1.2.27)

## First approximation

As known from chapter 1, the tangent line at a point x0 is used, as a first approximation (y1) of the function  y = y(x) , around this point:

 ${y}_{1}={y}_{0}+{\left(\frac{\text{d}y}{\text{d}x}\right)}_{0}\left(x-{x}_{0}\right)$ (3.1.2.28)

where the index 0, denotes at point x0. For an implicit function (3.1.2.20), one can use the relation (3.1.2.22), in order to obtain the tangent line in a symmetric form:

 ${\left(\frac{\partial F}{\partial y}\right)}_{0}\left(y-{y}_{0}\right)+{\left(\frac{\partial F}{\partial x}\right)}_{0}\left(x-{x}_{0}\right)=0$ (3.1.2.29)

The first approximation of a function of n variables

 $y=y\left({x}_{1},....,{x}_{n}\right)$ (3.1.2.30)

around the point

 ${\left({x}_{1},....,{x}_{n}\right)}_{0}=\left({x}_{1,0},....,{x}_{n,0}\right)$ (3.1.2.31)

has the form of:

 ${y}_{1}={y}_{0}+\sum _{k=1}^{n}{\left(\frac{\partial y}{\partial {x}_{k}}\right)}_{0}\left({x}_{k}-{x}_{k,0}\right)$ (3.1.2.32)

since for the point (3.1.2.31)

 $\begin{array}{l}{y}_{1}={y}_{0}\text{ }\text{and}\\ \frac{\partial {y}_{1}}{\partial {x}_{k}}={\left(\frac{\partial y}{\partial {x}_{k}}\right)}_{0}\text{ }k=1,\text{\hspace{0.17em}}...,\text{\hspace{0.17em}}n\end{array}\right\}$ (3.1.2.33)

As seen from (3.1.2.32), the first approximation itself is in general a function of n variables. Care should be taken that the function and the derivatives are continuous at the point (3.1.2.31).

In the case of a function of two variables,

 $z=z\left(x,y\right)$ (3.1.2.34)

the first approximation is the tangent plane:

 ${z}_{1}={z}_{0}+{\left(\frac{\partial z}{\partial x}\right)}_{0}\left(x-{x}_{0}\right)+{\left(\frac{\partial z}{\partial y}\right)}_{0}\left(y-{y}_{0}\right)$ (3.1.2.35)

It is called "tangent", since its derivatives are equal to these of the function at the point (x, y, z)0, but is it a plane?

A plane in a three dimensional space is defined as any linear combination of the Cartesian coordinates:

 $Ax+By+Cz=D$ (3.1.2.36)

where at least one of the constant factors of the coordinates (A,B,C) does not vanish. Indeed any intersection of (3.1.2.36) with the planes of constant x, y or z, yields a straight line, as can be easily seen. From the definition (3.1.2.36) it follows that (3.1.2.35) is a plane.

According to (3.1.2.25) and (3.1.2.26), for an implicit function of two variables

 $\begin{array}{l}F\left[x,y,z\left(x,y\right)\right]=0\\ \left\{\begin{array}{l}\frac{\partial z}{\partial x}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial z}}\\ \frac{\partial z}{\partial y}=-\frac{\frac{\partial F}{\partial y}}{\frac{\partial F}{\partial z}}\end{array}\end{array}\right\}$ (3.1.2.37)

With the help of (3.1.2.37), one can transform the expression of the tangent plane (3.1.2.35) in the following symmetric form:

 ${\left(\frac{\partial F}{\partial z}\right)}_{0}\left(z-{z}_{0}\right)+{\left(\frac{\partial F}{\partial y}\right)}_{0}\left(y-{y}_{0}\right)+{\left(\frac{\partial F}{\partial x}\right)}_{0}\left(x-{x}_{0}\right)=0$ (3.1.2.38)

A point of a function of many variables with vanishing and continuous derivatives is called a stationary point. As in the case of a function of a single variable, a stationary point indicates that for an infinitesimal deviation from this point, the function remains constant. In the case of two variables (3.1.2.34), the tangent plane at a stationary point is

 $z={z}_{0}\text{ }\text{where}\text{\hspace{0.28em}}{z}_{0}\text{\hspace{0.28em}}\text{is}\text{\hspace{0.28em}}z\text{\hspace{0.28em}}\text{at that point}$ (3.1.2.39)

as can be seen from (3.1.2.38).

The following example will be used to illustrate the tangent plane.

 $z=3\left[1-{\left(\frac{x}{4}\right)}^{2}-{\left(\frac{y}{3}\right)}^{2}\right]$ (3.1.2.40)

The section of this function with a constant z plane is

 ${\left(\frac{x}{4}\right)}^{2}+{\left(\frac{y}{3}\right)}^{2}=1-\frac{{z}_{c}}{3}\text{ }\text{with}\text{ }{z}_{c}=\text{constant}$ (3.1.2.41)

which is an ellipse for zc<3, a point for zc=3 and non existing for zc>3. Therefore

 $\begin{array}{l}x=y=0\\ z=3\end{array}\right\}\text{ }\text{is}\text{\hspace{0.17em}}\text{a}\text{\hspace{0.17em}}\text{point}\text{\hspace{0.17em}}\text{of}\text{\hspace{0.17em}}\text{maximum}$ (3.1.2.42)

The sections with constant x or y values are parabolas:

 $\begin{array}{l}z=-\frac{{y}^{2}}{3}+3\left[1-{\left(\frac{{x}_{c}}{4}\right)}^{2}\right]\text{ }{x}_{c}=\text{constant}\\ z=-\frac{3}{16}{x}^{2}+\left[3-\frac{{y}_{c}^{2}}{3}\right]\text{ }\text{\hspace{0.28em}}{y}_{c}=\text{constant}\end{array}\right\}$ (3.1.2.43)

The shape is similar to a paraboloid of revolution, except that instead of circles there are ellipses, and therefore it is called an elliptic paraboloid.

The tangent plane at point (x,y,z)0, according to (3.1.2.38) is:

 $\frac{1}{3}\left(z-{z}_{0}\right)+\frac{2{y}_{0}}{9}\left(y-{y}_{0}\right)+\frac{{x}_{0}}{8}\left(x-{x}_{0}\right)=0$ (3.1.2.44)

For the maximum (3.1.2.42), the tangent plane becomes

 $z=3$ (3.1.2.45)

which corresponds to a stationary point (3.1.2.39).

This example (3.1.2.39) and some display of the tangent planes are shown in Fig. Elliptic paraboloid.

## Exercises

Exercise 1. Calculate:

1. $\frac{\text{d}}{\text{d}x}\text{\hspace{0.17em}}\underset{v\left(x\right)}{\overset{w\left(x\right)}{\int }}f\left(u\right)\text{\hspace{0.17em}}\text{d}u$

2. $\frac{\text{d}}{\text{d}x}\underset{{x}^{\mathrm{exp}\left(-x\right)}}{\overset{{x}^{\mathrm{exp}x}}{\int }}f\left(u\right)\text{​}\text{d}u$

Exercise 2. The function u of three (3) variables is defined as:

$u\left(x,y,z\right)={x}^{2}y+{y}^{2}z-{z}^{2}x$
1. Calculate the partial derivatives

$\frac{\partial u}{\partial x},\text{\hspace{0.17em}}\frac{\partial u}{\partial y},\text{\hspace{0.17em}}\frac{\partial u}{\partial z}$

2. What is the value of the function at the point

${\left(x,y,z\right)}_{0}=\left(1,1,-1\right)$

Exercise 3. For the implicit function

$F\left(x,y\right)=\mathrm{sin}\left(x\text{ }y\right)-\mathrm{ln}\left({x}^{2}+{y}^{2}\right)=0$
1. Calculate the partial derivatives

$\frac{\partial F}{\partial x}\text{ }\text{and}\text{ }\frac{\partial F}{\partial y}$

2. What is the derivative

$\frac{\text{d}y}{\text{d}x}$

3. Obtain the symmetric form of the tangent line at point (x, y)0 !
4. What are the two values of y for x=0 ?
5. What are the tangent lines at x0=0 ?

Exercise 4. The function z of two variables x and y is presented in the implicit form:

$F\left(x,y,z\right)=x\text{​}{z}^{5}+y\text{​}{z}^{2}\text{​}-x\text{​}{y}^{2}\text{​}z-1=0$
1. Calculate $\frac{\partial F}{\partial z},\text{\hspace{0.17em}}\frac{\partial F}{\partial y}\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}\frac{\partial F}{\partial x}$

2. What are $\frac{\partial z}{\partial x}\text{ }\text{and}\text{ }\frac{\partial z}{\partial y}$

3. What is the value of z for the point (x, y)=(1, 0) ?
4. Obtain the tangent plane at

${\left(x,y\right)}_{0}=\left(1,0\right)$

Previous topic: page 1 Functions of Many Variables

Next topic: page 3 Derivatives of Higher Order