Definitions
In this section we deal with functions of more than one variable. In the single-variable case the function assigns a number (the output) to each real number (the input) in the domain of . In the multivariate case, a function of several variables, assigns a number (output) to the real numbers (input). A physical example of a function of three variables is pressure where gives the pressure at a point with coordinates .
An important interpretation of the derivative of in the single-variable case is that of rates of change: how does change with . We want to extend this interpretation to functions of several variables. Let us take the example of a function of two variables, and , i.e. . Now we can ask questions on the rate at which the function is changing at a point with coordinates when is varying but is fixed, or vice-versa. The aforementioned rates are given by partial derivatives; they give the slopes in the positive direction and positive direction. This is contrasted with the directional derivative which gives slope in any direction.
Consider a function given as follows
and suppose we want to calculate the rate of change of at with varying while holding fixed. Since we are calculating the rate at a particular point then is fixed at which renders a function of only one variable :
whose derivative is (which is equal to ). We refer to as the partial derivative of wrt and denote it by:
The partial derivative of wrt while holding fixed is or . . These are usually denoted by a 'curly dee': and denote the partial derivatives of with respect to and , respectively. This is known as the Leibniz notation. Alternative notation for and is given by and , respectively.
Note that sometimes (particularly in thermodynamics) the following notation is used to denote the partial derivatives wrt and
where, here, the subscripts denote the variable treated as a constant.
We now use the definition of the derivative of a single-variable function to define the partial derivatives of a function of two variables, . The partial derivative of with respect to while keeping constant is the function defined as follows,
and the partial derivative of wrt while keeping constant is the function defined as,
Going back to the example, the partial derivative of wrt is
which we obtain by differentiating wrt and treating as constant. Similarly, is obtained by differentiating wrt and treating constant,
To a function of one variable one can associate the graph which is a curve in the plane. For a function of two variables, we consider a surface given by , where is the height of the surface above the plane. For this eqn, gives a paraboloid as shown:
A graph of the function where (given by ) gives the height of the surface above the plane.
Contour lines are shown on the surface plot; these are the colour lines that trace circles. The contour lines or level curves of the function are two-dimensional curves satisfying where is any number. Along each contour therefore, the height of the surface is the same. The contours of the function plotted here are also shown in the plane, with each contour curve labelled with the corresponding value. Note that contours are discussed in more detail later.
The contour lines of the function given by the equation which satisfy . The contour lines are labelled with their value corresponding to the height of the surface.
Higher derivatives
For a function of two variables, there are two first-order derivatives, and . As with functions of one variable, we can compute second-order derivatives; these are denoted by,
Similarly for second-order derivatives wrt ,
We also have mixed partial derivatives denoted by,
and
Assuming that and are continuous, then the order with which we take the derivative, does not matter, i.e. . Moreover, the mixed partials are equal in higherorder derivatives, assuming the continuity condition holds true. For example, in the case of third-order partial derivatives the following mixed partials, are equal
Clairaut's theorem
This continuity condition is formally stated in Clairaut's theorem and is generalisable to higherorder partial derivatives given that the continuity condition is satisfied. This implies that partial derivatives may be computed in any order; for example, suppose we have a function then, if the fourth-order partial derivatives are continuous.
The theorum states the conditions for equality of mixed partials. If and are continuous functions on a disk , then for all points , i.e.
Gradient and Hessian
Given a function of two variables, , we define the gradient of , denoted by to be the vector of partial derivatives of :
The Hessian matrix, denoted by , is a square matrix of second-order partial derivatives of a twice-differentiable function, :
Since the second-order derivatives are independent of the order in which the derivatives are taken (see Clairaut's theorem in Subsec. 1.2.2), the Hessian matrix is a symmetric matrix. This is easily generalisable to functions of more than 2 variables: for instance, the Hessian matrix of a function is a matrix whose rows are given by and . We will make use of these definitions in the next section on Taylor expansion.