# 6.3: Partial Derivatives - Mathematics

Now that we have examined limits and continuity of functions of two variables, we can proceed to study derivatives. This carries over into differentiation as well.

## Derivatives of a Function of Two Variables

When studying derivatives of functions of one variable, we found that one interpretation of the derivative is an instantaneous rate of change of (y) as a function of (x.) Leibniz notation for the derivative is (dy/dx,) which implies that (y) is the dependent variable and (x) is the independent variable. For a function (z=f(x,y)) of two variables, (x) and (y) are the independent variables and (z) is the dependent variable. This raises two questions right away: How do we adapt Leibniz notation for functions of two variables? Also, what is an interpretation of the derivative? The answer lies in partial derivatives.

Definition: partial derivatives

Let (f(x,y)) be a function of two variables. Then the partial derivative of (f) with respect to (x), written as (∂f/∂x,), or (f_x,) is defined as

[dfrac{∂f}{∂x}=f_x(x,y)=lim_{h→0}dfrac{f(x+h,y)−f(x,y)}{h} label{pd1}]

The partial derivative of (f) with respect to (y), written as (∂f/∂y), or (f_y,) is defined as

[dfrac{∂f}{∂y}=f_y(x,y)=lim_{k→0}dfrac{f(x,y+k)−f(x,y)}{k}. label{pd2}]

This definition shows two differences already. First, the notation changes, in the sense that we still use a version of Leibniz notation, but the (d) in the original notation is replaced with the symbol (∂). (This rounded (“d”) is usually called “partial,” so (∂f/∂x) is spoken as the “partial of (f) with respect to (x).”) This is the first hint that we are dealing with partial derivatives. Second, we now have two different derivatives we can take, since there are two different independent variables. Depending on which variable we choose, we can come up with different partial derivatives altogether, and often do.

Example (PageIndex{1}): Calculating Partial Derivatives from the Definition

Use the definition of the partial derivative as a limit to calculate (∂f/∂x) and (∂f/∂y) for the function

[f(x,y)=x^2−3xy+2y^2−4x+5y−12. onumber]

Solution

First, calculate (f(x+h,y).)

[egin{align*} f(x+h,y)&=(x+h)^2−3(x+h)y+2y^2−4(x+h)+5y−12 onumber &=x^2+2xh+h^2−3xy−3hy+2y^2−4x−4h+5y−12. end{align*} ]

Next, substitute this into Equation ef{pd1} and simplify:

[egin{align*} dfrac{∂f}{∂x}&=lim_{h→0}dfrac{f(x+h,y)−f(x,y)}{h} onumber &=lim_{h→0}dfrac{(x^2+2xh+h^2−3xy−3hy+2y^2−4x−4h+5y−12)−(x^2−3xy+2y^2−4x+5y−12)}{h} onumber &=lim_{h→0}dfrac{x^2+2xh+h^2−3xy−3hy+2y^2−4x−4h+5y−12−x^2+3xy−2y^2+4x−5y+12}{h} onumber &=lim_{h→0}dfrac{2xh+h^2−3hy−4h}{h} onumber &=lim_{h→0}dfrac{h(2x+h−3y−4)}{h} onumber &=lim_{h→0}(2x+h−3y−4) onumber &=2x−3y−4. end{align*}]

To calculate (dfrac{∂f}{∂y}), first calculate (f(x,y+h):)

[egin{align*} f(x+h,y)&=x^2−3x(y+h)+2(y+h)^2−4x+5(y+h)−12 onumber &=x^2−3xy−3xh+2y^2+4yh+2h^2−4x+5y+5h−12. end{align*}]

Next, substitute this into Equation ef{pd2} and simplify:

[ egin{align*} dfrac{∂f}{∂y}&=lim_{h→0}dfrac{f(x,y+h)−f(x,y)}{h} onumber &=lim_{h→0}dfrac{(x^2−3xy−3xh+2y^2+4yh+2h^2−4x+5y+5h−12)−(x^2−3xy+2y^2−4x+5y−12)}{h} onumber &=lim_{h→0}dfrac{x^2−3xy−3xh+2y^2+4yh+2h^2−4x+5y+5h−12−x^2+3xy−2y^2+4x−5y+12}{h} onumber &=lim_{h→0}dfrac{−3xh+4yh+2h^2+5h}{h} onumber &=lim_{h→0}dfrac{h(−3x+4y+2h+5)}{h} onumber &=lim_{h→0}(−3x+4y+2h+5) onumber &=−3x+4y+5 end{align*}]

Exercise (PageIndex{1})

Use the definition of the partial derivative as a limit to calculate (∂f/∂x) and (∂f/∂y) for the function

[f(x,y)=4x^2+2xy−y^2+3x−2y+5. onumber]

Hint

Use Equations ef{pd1} and ef{pd2} from the definition of partial derivatives.

(dfrac{∂f}{∂x}=8x+2y+3)

(dfrac{∂f}{∂y}=2x−2y−2)

The idea to keep in mind when calculating partial derivatives is to treat all independent variables, other than the variable with respect to which we are differentiating, as constants. Then proceed to differentiate as with a function of a single variable. To see why this is true, first fix (y) and define (g(x)=f(x,y)) as a function of (x). Then

[egin{align} g′(x)&=lim_{h→0}dfrac{g(x+h)−g(x)}{h} onumber [6pt] &=lim_{h→0}dfrac{f(x+h,y)−f(x,y)}{h} onumber [6pt] &=dfrac{∂f}{∂x}. onumber end{align}]

The same is true for calculating the partial derivative of (f) with respect to (y). This time, fix (x) and define (h(y)=f(x,y)) as a function of (y). Then

[egin{align} h′(x)&=lim_{k→0}dfrac{h(x+k)−h(x)}{k} onumber [6pt] &=lim_{k→0}dfrac{f(x,y+k)−f(x,y)}{k} onumber [6pt] &=dfrac{∂f}{∂y}. onumber end{align}]

All differentiation rules apply.

Example (PageIndex{2}): Calculating Partial Derivatives

Calculate (∂f/∂x) and (∂f/∂y) for the following functions by holding the opposite variable constant then differentiating:

1. (f(x,y)=x^2−3xy+2y^2−4x+5y−12)
2. (g(x,y)=sin(x^2y−2x+4))

Solution:

a. To calculate (∂f/∂x), treat the variable (y) as a constant. Then differentiate (f(x,y)) with respect to (x) using the sum, difference, and power rules:

[egin{align*}dfrac{∂f}{∂x}&=dfrac{∂}{∂x}left[x^2−3xy+2y^2−4x+5y−12 ight] onumber [6pt] &=dfrac{∂}{∂x}[x^2]−dfrac{∂}{∂x}[3xy]+dfrac{∂}{∂x}[2y^2]−dfrac{∂}{∂x}[4x]+dfrac{∂}{∂x}[5y]−dfrac{∂}{∂x} onumber [6pt] &=2x−3y+0−4+0−0 onumber & =2x−3y−4. onumber end{align*}]

The derivatives of the third, fifth, and sixth terms are all zero because they do not contain the variable (x), so they are treated as constant terms. The derivative of the second term is equal to the coefficient of (x), which is (−3y). Calculating (∂f/∂y):

[egin{align*} dfrac{∂f}{∂y}&=dfrac{∂}{∂y}left[x^2−3xy+2y^2−4x+5y−12 ight] onumber [6pt] &=dfrac{∂}{∂y}[x^2]−dfrac{∂}{∂y}[3xy]+dfrac{∂}{∂y}[2y^2]−dfrac{∂}{∂y}[4x]+dfrac{∂}{∂y}[5y]−dfrac{∂}{∂y} onumber [6pt] &=−3x+4y−0+5−0 onumber &=−3x+4y+5. onumber end{align*} ]

These are the same answers obtained in Example (PageIndex{1}).

b. To calculate (∂g/∂x,) treat the variable y as a constant. Then differentiate (g(x,y)) with respect to (x) using the chain rule and power rule:

[egin{align*}dfrac{∂g}{∂x}&=dfrac{∂}{∂x}left[sin(x^2y−2x+4) ight] onumber [6pt] & =cos(x^2y−2x+4)dfrac{∂}{∂x}[x^2y−2x+4] onumber [6pt] & =(2xy−2)cos(x^2y−2x+4). onumber end{align*}]

To calculate (∂g/∂y,) treat the variable (x) as a constant. Then differentiate (g(x,y)) with respect to (y) using the chain rule and power rule:

[ egin{align*} dfrac{∂g}{∂y}&=dfrac{∂}{∂y}left[sin(x^2y−2x+4) ight] onumber [6pt] &=cos(x^2y−2x+4)dfrac{∂}{∂y}[x^2y−2x+4] onumber [6pt] &=x^2cos(x^2y−2x+4). onumber end{align*} ]

Exercise (PageIndex{2})

Calculate (∂f/∂x) and (∂f/∂y) for the function

[f(x,y)= an(x^3−3x^2y^2+2y^4) onumber]

by holding the opposite variable constant, then differentiating.

Hint

Use Equations ef{pd1} and ef{pd1} from the definition of partial derivatives.

(dfrac{∂f}{∂x}=(3x^2−6xy^2)sec^2(x^3−3x^2y^2+2y^4))

(dfrac{∂f}{∂y}=(−6x^2y+8y^3)sec^2(x^3−3x^2y^2+2y^4))

How can we interpret these partial derivatives? Recall that the graph of a function of two variables is a surface in (R^3). If we remove the limit from the definition of the partial derivative with respect to (x), the difference quotient remains:

[dfrac{f(x+h,y)−f(x,y)}{h}.]

This resembles the difference quotient for the derivative of a function of one variable, except for the presence of the (y) variable. Figure (PageIndex{1}) illustrates a surface described by an arbitrary function (z=f(x,y).) In Figure (PageIndex{1}), the value of (h) is positive. If we graph (f(x,y)) and (f(x+h,y)) for an arbitrary point ((x,y),) then the slope of the secant line passing through these two points is given by

[dfrac{f(x+h,y)−f(x,y)}{h}.]

This line is parallel to the (x)-axis. Therefore, the slope of the secant line represents an average rate of change of the function (f) as we travel parallel to the (x)-axis. As (h) approaches zero, the slope of the secant line approaches the slope of the tangent line.

If we choose to change (y) instead of (x) by the same incremental value (h), then the secant line is parallel to the (y)-axis and so is the tangent line. Therefore, (∂f/∂x) represents the slope of the tangent line passing through the point ((x,y,f(x,y))) parallel to the (x)-axis and (∂f/∂y) represents the slope of the tangent line passing through the point ((x,y,f(x,y))) parallel to the (y)-axis. If we wish to find the slope of a tangent line passing through the same point in any other direction, then we need what are called directional derivatives.

We now return to the idea of contour maps, which we introduced in Functions of Several Variables. We can use a contour map to estimate partial derivatives of a function (g(x,y)).

Example (PageIndex{3}): Partial Derivatives from a Contour Map

Use a contour map to estimate (∂g/∂x) at the point ((sqrt{5},0)) for the function

[g(x,y)=sqrt{9−x^2−y^2}. onumber ]

Solution

Figure (PageIndex{2}) represents a contour map for the function (g(x,y)). The inner circle on the contour map corresponds to (c=2) and the next circle out corresponds to (c=1). The first circle is given by the equation (2=sqrt{9−x^2−y^2}); the second circle is given by the equation (1=sqrt{9−x^2−y^2}). The first equation simplifies to (x^2+y^2=5) and the second equation simplifies to (x^2+y^2=8.) The (x)-intercept of the first circle is ((sqrt{5},0)) and the (x)-intercept of the second circle is ((2sqrt{2},0)). We can estimate the value of (∂g/∂x) evaluated at the point ((sqrt{5},0)) using the slope formula:

[ egin{align*} left.dfrac{∂g}{∂x} ight|_{(x,y) = (sqrt{5},0)} ≈ dfrac{g(sqrt{5},0)−g(2sqrt{2},0)}{sqrt{5}−2sqrt{2}} = dfrac{2−1}{sqrt{5}−2sqrt{2}} =dfrac{1}{sqrt{5}−2sqrt{2}} ≈−1.688. end{align*}]

To calculate the exact value of (∂g/∂x) evaluated at the point ((sqrt{5},0)), we start by finding (∂g/∂x) using the chain rule. First, we rewrite the function as

[g(x,y)=sqrt{9−x^2−y^2}=(9−x^2−y^2)^{1/2}]

and then differentiate with respect to (x) while holding (y) constant:

[ egin{align*} dfrac{∂g}{∂x} &=dfrac{1}{2}(9−x^2−y^2)^{−1/2}(−2x) [5pt]&=−dfrac{x}{sqrt{9−x^2−y^2}}. end{align*}]

Next, we evaluate this expression using (x=sqrt{5}) and (y=0):

[ dfrac{∂g}{∂x}∣_{(x,y) = (sqrt{5},0)} =−dfrac{sqrt{5}}{sqrt{9−(sqrt{5})^2−(0)^2}} =−dfrac{sqrt{5}}{sqrt{4}} =−dfrac{sqrt{5}}{2} ≈−1.118.]

The estimate for the partial derivative corresponds to the slope of the secant line passing through the points ((sqrt{5},0,g(sqrt{5},0))) and ((2sqrt{2},0,g(2sqrt{2},0))). It represents an approximation to the slope of the tangent line to the surface through the point ((sqrt{5},0,g(sqrt{5},0)),) which is parallel to the (x)-axis.

Exercise (PageIndex{3})

Use a contour map to estimate (∂f/∂y) at point ((0,sqrt{2})) for the function

[ f(x,y)=x^2−y^2. onumber]

Compare this with the exact answer.

Hint

Create a contour map for (f) using values of (c) from (−3) to (3). Which of these curves passes through point ((0,sqrt{2})?)

Using the curves corresponding to (c=−2) and (c=−3,) we obtain

[ left. dfrac{∂f}{∂y} ight∣_{(x,y)=(0,sqrt{2})}≈dfrac{f(0,sqrt{3})−f(0,sqrt{2})}{sqrt{3}−sqrt{2}}=dfrac{−3−(−2)}{sqrt{3}−sqrt{2}}⋅dfrac{sqrt{3}+sqrt{2}}{sqrt{3}+sqrt{2}}=−sqrt{3}−sqrt{2}≈−3.146. onumber]

[ left. dfrac{∂f}{∂y} ight|_{(x,y)=(0,sqrt{2})}=(−2y|_{(x,y)=(0,sqrt{2})}=−2sqrt{2}≈−2.828. onumber]

## Functions of More Than Two Variables

Suppose we have a function of three variables, such as (w=f(x,y,z).) We can calculate partial derivatives of (w) with respect to any of the independent variables, simply as extensions of the definitions for partial derivatives of functions of two variables.

Definition: Partial Derivatives

Let (f(x,y,z)) be a function of three variables. Then, the partial derivative of (f) with respect to (x), written as (∂f/∂x,) or (f_x,) is defined to be

[dfrac{∂f}{∂x}=f_x(x,y,z)=lim_{h→0}dfrac{f(x+h,y,z)−f(x,y,z)}{h}. label{PD2a}]

The partial derivative of (f) with respect to (y), written as (∂f/∂y), or (f_y), is defined to be

[dfrac{∂f}{∂y}=f_y(x,y,z)=lim_{k→0}dfrac{f(x,y+k,z)−f(x,y,z)}{k.} label{PD2b}]

The partial derivative of (f) with respect to (z), written as (∂f/∂z), or (f_z), is defined to be

[dfrac{∂f}{∂z}=f_z(x,y,z)=lim_{m→0}dfrac{f(x,y,z+m)−f(x,y,z)}{m}. label{PD2c}]

We can calculate a partial derivative of a function of three variables using the same idea we used for a function of two variables. For example, if we have a function (f) of (x,y), and (z), and we wish to calculate (∂f/∂x), then we treat the other two independent variables as if they are constants, then differentiate with respect to (x).

Example (PageIndex{4}): Calculating Partial Derivatives for a Function of Three Variables

Use the limit definition of partial derivatives to calculate (∂f/∂x) for the function

[ f(x,y,z)=x^2−3xy+2y^2−4xz+5yz^2−12x+4y−3z. onumber]

Then, find (∂f/∂y) and (∂f/∂z) by setting the other two variables constant and differentiating accordingly.

Solution:

We first calculate (∂f/∂x) using Equation ef{PD2a}, then we calculate the other two partial derivatives by holding the remaining variables constant. To use the equation to find (∂f/∂x), we first need to calculate (f(x+h,y,z):)

[egin{align*} f(x+h,y,z)&=(x+h)^2−3(x+h)y+2y^2−4(x+h)z+5yz^2−12(x+h)+4y−3z onumber &=x^2+2xh+h^2−3xy−3xh+2y^2−4xz−4hz+5yz^2−12x−12h+4y−3z onumber end{align*} ]

and recall that (f(x,y,z)=x^2−3xy+2y^2−4zx+5yz^2−12x+4y−3z.) Next, we substitute these two expressions into the equation:

[egin{align*} dfrac{∂f}{∂x} &=lim_{h→0} left[dfrac{x^2+2xh+h^2−3xy−3hy+2y^2−4xz−4hz+5yz^2−12x−12h+4y−3zh−x^2−3xy+2y^2−4xz+5yz^2−12x+4y−3z}{h} ight] onumber &=lim_{h→0} left[dfrac{2xh+h^2−3hy−4hz−12h}{h} ight] onumber &=lim_{h→0} left[dfrac{h(2x+h−3y−4z−12)}{h} ight] onumber &=lim_{h→0}(2x+h−3y−4z−12) onumber &=2x−3y−4z−12. end{align*} ]

Then we find (∂f/∂y) by holding (x) and (z) constant. Therefore, any term that does not include the variable (y) is constant, and its derivative is zero. We can apply the sum, difference, and power rules for functions of one variable:

[ egin{align*} &dfrac{∂}{∂y}left[x^2−3xy+2y^2−4xz+5yz^2−12x+4y−3z ight] onumber &=dfrac{∂}{∂y}[x^2]−dfrac{∂}{∂y}[3xy]+dfrac{∂}{∂y}[2y^2]−dfrac{∂}{∂y}[4xz]+dfrac{∂}{∂y}[5yz^2]−dfrac{∂}{∂y}[12x]+dfrac{∂}{∂y}[4y]−dfrac{∂}{∂z}[3z] onumber &=0−3x+4y−0+5z^2−0+4−0 onumber &=−3x+4y+5z^2+4. end{align*}]

To calculate (∂f/∂z,) we hold (x) and (y) constant and apply the sum, difference, and power rules for functions of one variable:

[egin{align*} &dfrac{∂}{∂z}[x^2−3xy+2y^2−4xz+5yz^2−12x+4y−3z] onumber &=dfrac{∂}{∂z}[x^2]−dfrac{∂}{∂z}[3xy]+dfrac{∂}{∂z}[2y^2]−dfrac{∂}{∂z}[4xz]+dfrac{∂}{∂z}[5yz^2]−dfrac{∂}{∂z}[12x]+dfrac{∂}{∂z}[4y]−dfrac{∂}{∂z}[3z] onumber &=0−0+0−4x+10yz−0+0−3 onumber &=−4x+10yz−3 end{align*}]

Exercise (PageIndex{4})

Use the limit definition of partial derivatives to calculate (∂f/∂x) for the function

[f(x,y,z)=2x^2−4x^2y+2y^2+5xz^2−6x+3z−8. onumber]

Then find (∂f/∂y) and (∂f/∂z) by setting the other two variables constant and differentiating accordingly.

Hint

Use the strategy in the preceding example.

(dfrac{∂f}{∂x}=4x−8xy+5z^2−6,dfrac{∂f}{∂y}=−4x^2+4y,dfrac{∂f}{∂z}=10xz+3)

Example (PageIndex{5}): Calculating Partial Derivatives for a Function of Three Variables

Calculate the three partial derivatives of the following functions.

1. (f(x,y,z)=x^2y−4xz+y^2x−3yz)
2. (g(x,y,z)=sin(x^2y−z)+cos(x^2−yz))

Solution

In each case, treat all variables as constants except the one whose partial derivative you are calculating.

a.

[egin{align*} dfrac{∂f}{∂x}&=dfrac{∂}{∂x}left[dfrac{x^2y−4xz+y^2}{x−3yz} ight] onumber [6pt] &=dfrac{dfrac{∂}{∂x}(x^2y−4xz+y^2)(x−3yz)−(x^2y−4xz+y^2)dfrac{∂}{∂x}(x−3yz)}{(x−3yz)^2} onumber [6pt]&=dfrac{(2xy−4z)(x−3yz)−(x^2y−4xz+y^2)(1)}{(x−3yz)^2} onumber [6pt]&=dfrac{2x^2y−6xy^2z−4xz+12yz^2−x^2y+4xz−y^2}{(x−3yz)^2} onumber [6pt] &=dfrac{x^2y−6xy^2z−4xz+12yz^2+4xz−y^2}{(x−3yz)^2} onumber end{align*}]

[egin{align*} dfrac{∂f}{∂y}&=dfrac{∂}{∂y}left[dfrac{x^2y−4xz+y^2}{x−3yz} ight] onumber [6pt] &=dfrac{dfrac{∂}{∂y}(x^2y−4xz+y^2)(x−3yz)−(x^2y−4xz+y^2)dfrac{∂}{∂y}(x−3yz)}{(x−3yz)^2} onumber [6pt] &=dfrac{(x^2+2y)(x−3yz)−(x^2y−4xz+y^2)(−3z)}{(x−3yz)^2} onumber [6pt] & =dfrac{x^3−3x^2yz+2xy−6y^2z+3x^2yz−12xz^2+3y^2z}{(x−3yz)^2} onumber [6pt] &=dfrac{x^3+2xy−3y^2z−12xz^2}{(x−3yz)^2} onumber end{align*}]

[egin{align*} dfrac{∂f}{∂z}&=dfrac{∂}{∂z}left[dfrac{x^2y−4xz+y^2}{x−3yz} ight] onumber [6pt] &=dfrac{dfrac{∂}{∂z}(x^2y−4xz+y^2)(x−3yz)−(x^2y−4xz+y^2)dfrac{∂}{∂z}(x−3yz)}{(x−3yz)^2} onumber [6pt] & =dfrac{(−4x)(x−3yz)−(x^2y−4xz+y^2)(−3y)}{(x−3yz)^2} onumber [6pt] &=dfrac{−4x^2+12xyz+3x^2y^2−12xyz+3y^3}{(x−3yz)^2} onumber [6pt] &=dfrac{−4x^2+3x^2y^2+3y^3}{(x−3yz)^2} onumber end{align*}]

b.

[egin{align*} dfrac{∂f}{∂x}&=dfrac{∂}{∂x} left[sin(x^2y−z)+cos(x^2−yz) ight] onumber [6pt] &=(cos(x^2y−z))dfrac{∂}{∂x}(x^2y−z)−(sin(x^2−yz))dfrac{∂}{∂x}(x^2−yz) onumber [6pt] &=2xycos(x^2y−z)−2xsin(x^2−yz) onumber end{align*}]

[egin{align*} dfrac{∂f}{∂y}&=dfrac{∂}{∂y}[sin(x^2y−z)+cos(x^2−yz)] onumber [6pt] &=(cos(x^2y−z))dfrac{∂}{∂y}(x^2y−z)−(sin(x^2−yz))dfrac{∂}{∂y}(x^2−yz) onumber [6pt] &=x^2cos(x^2y−z)+zsin(x^2−yz) onumber end{align*}]

[egin{align*} dfrac{∂f}{∂z}&=dfrac{∂}{∂z}[sin(x^2y−z)+cos(x^2−yz)] onumber [6pt] &=(cos(x^2y−z))dfrac{∂}{∂z}(x^2y−z)−(sin(x^2−yz))dfrac{∂}{∂z}(x^2−yz) onumber [6pt] &=−cos(x^2y−z)+ysin(x^2−yz) onumber end{align*} ]

Exercise (PageIndex{5})

Calculate (∂f/∂x, ∂f/∂y,) and (∂f/∂z) for the function

[f(x,y,z)=sec(x^2y)− an(x^3yz^2). onumber]

Hint

Use the strategy in the preceding example.

(dfrac{∂f}{∂x}=2xysec(x^2y) an(x^2y)−3x^2yz^2sec^2(x^3yz^2))

(dfrac{∂f}{∂y}=x^2sec(x^2y) an(x^2y)−x^3z^2sec^2(x^3yz^2))

(dfrac{∂f}{∂z}=−2x^3yzsec^2(x^3yz^2))

## Higher-Order Partial Derivatives

Consider the function

[f(x,y)=2x^3−4xy^2+5y^3−6xy+5x−4y+12.]

Its partial derivatives are

[dfrac{∂f}{∂x}=6x^2−4y^2−6y+5]

and

[dfrac{∂f}{∂y}=−8xy+15y^2−6x−4.]

Each of these partial derivatives is a function of two variables, so we can calculate partial derivatives of these functions. Just as with derivatives of single-variable functions, we can call these second-order derivatives, third-order derivatives, and so on. In general, they are referred to as higher-order partial derivatives. There are four second-order partial derivatives for any function (provided they all exist):

[egin{align*} dfrac{∂^2f}{∂x^2}&=dfrac{∂}{∂x}left[dfrac{∂f}{∂x} ight] [5pt] dfrac{∂^2f}{∂x,∂y} &=dfrac{∂}{∂y}left[dfrac{∂f}{∂x} ight] [5pt] dfrac{∂^2f}{∂y,∂x}&=dfrac{∂}{∂x}left[dfrac{∂f}{∂y} ight] [5pt] dfrac{∂^2f}{∂y^2}&=dfrac{∂}{∂y}left[dfrac{∂f}{∂y} ight].end{align*}]

An alternative notation for each is (f_{xx},f_{xy},f_{yx},) and (f_{yy}), respectively. Higher-order partial derivatives calculated with respect to different variables, such as (f_{xy}) and (f_{yx}), are commonly called mixed partial derivatives.

Example (PageIndex{6}): Calculating Second Partial Derivatives

Calculate all four second partial derivatives for the function

[f(x,y)=xe^{−3y}+sin(2x−5y).label{Ex6e1}]

Solution:

To calculate (dfrac{∂^2f}{∂x^2}) and (dfrac{∂^2f}{∂x∂y}), we first calculate (∂f/∂x):

[dfrac{∂f}{∂x}=e^{−3y}+2cos(2x−5y). label{Ex6e2}]

To calculate (dfrac{∂^2f}{∂x^2}), differentiate (∂f/∂x) (Equation ef{Ex6e2}) with respect to (x):

[egin{align*} dfrac{∂^2f}{∂x^2}&=dfrac{∂}{∂x}left[dfrac{∂f}{∂x} ight] onumber [6pt] &=dfrac{∂}{∂x}[e^{−3y}+2cos(2x−5y)] onumber [6pt] &=−4sin(2x−5y). onumber end{align*} onumber]

To calculate (dfrac{∂^2f}{∂x∂y}), differentiate (∂f/∂x) (Equation ef{Ex6e2}) with respect to (y):

[egin{align*} dfrac{∂^2f}{∂x,∂y}&=dfrac{∂}{∂y}left[dfrac{∂f}{∂x} ight] onumber [6pt] &=dfrac{∂}{∂y}[e^{−3y}+2cos(2x−5y)] onumber [6pt] &=−3e^{−3y}+10sin(2x−5y). onumber end{align*} onumber]

To calculate (dfrac{∂^2f}{∂x∂y}) and (dfrac{∂^2f}{∂y^2}), first calculate (∂f/∂y):

[dfrac{∂f}{∂y}=−3xe^{−3y}−5cos(2x−5y). label{Ex6e5} ]

To calculate (dfrac{∂^2f}{∂y∂x}), differentiate (∂f/∂y) (Equation ef{Ex6e5}) with respect to (x):

[egin{align*} dfrac{∂^2f}{∂y,∂x}&=dfrac{∂}{∂x} left[dfrac{∂f}{∂y} ight] onumber [6pt] &=dfrac{∂}{∂x}[−3xe^{−3y}−5cos(2x−5y)] onumber [6pt] &=−3e^{−3y}+10sin(2x−5y). onumber end{align*} onumber]

To calculate (dfrac{∂^2f}{∂y^2}), differentiate (∂f/∂y) (Equation ef{Ex6e5}) with respect to (y):

[egin{align*} dfrac{∂^2f}{∂y^2}&=dfrac{∂}{∂y}left[dfrac{∂f}{∂y} ight] onumber [6pt] &=dfrac{∂}{∂y}[−3xe^{−3y}−5cos(2x−5y)] onumber [6pt] &=9xe^{−3y}−25sin(2x−5y). onumber end{align*} onumber ]

Exercise (PageIndex{6})

Calculate all four second partial derivatives for the function

[f(x,y)=sin(3x−2y)+cos(x+4y). onumber]

Hint

Follow the same steps as in the previous example.

(dfrac{∂^2f}{∂x^2}=−9sin(3x−2y)−cos(x+4y))

(dfrac{∂^2f}{∂x,∂y}=6sin(3x−2y)−4cos(x+4y))

(dfrac{∂^2f}{∂y,∂x}=6sin(3x−2y)−4cos(x+4y))

(dfrac{∂^2f}{∂y^2}=−4sin(3x−2y)−16cos(x+4y))

At this point we should notice that, in both Example and the checkpoint, it was true that (dfrac{∂^2f}{∂x∂y}=dfrac{∂^2f}{∂y∂x}). Under certain conditions, this is always true. In fact, it is a direct consequence of the following theorem.

Equality of Mixed Partial Derivatives (Clairaut’s Theorem)

Suppose that (f(x,y)) is defined on an open disk (D) that contains the point ((a,b)). If the functions (f_{xy}) and (f_{yx}) are continuous on (D), then (f_{xy}=f_{yx}).

Clairaut’s theorem guarantees that as long as mixed second-order derivatives are continuous, the order in which we choose to differentiate the functions (i.e., which variable goes first, then second, and so on) does not matter. It can be extended to higher-order derivatives as well. The proof of Clairaut’s theorem can be found in most advanced calculus books.

Two other second-order partial derivatives can be calculated for any function (f(x,y).) The partial derivative (f_{xx}) is equal to the partial derivative of (f_x) with respect to (x), and (f_{yy}) is equal to the partial derivative of (f_y) with respect to (y).

Lord Kelvin and the Age of Earth

During the late 1800s, the scientists of the new field of geology were coming to the conclusion that Earth must be “millions and millions” of years old. At about the same time, Charles Darwin had published his treatise on evolution. Darwin’s view was that evolution needed many millions of years to take place, and he made a bold claim that the Weald chalk fields, where important fossils were found, were the result of (300) million years of erosion. At that time, eminent physicist William Thomson (Lord Kelvin) used an important partial differential equation, known as the heat diffusion equation, to estimate the age of Earth by determining how long it would take Earth to cool from molten rock to what we had at that time. His conclusion was a range of 20 to 400 million years, but most likely about 50 million years. For many decades, the proclamations of this irrefutable icon of science did not sit well with geologists or with Darwin.

• Read Kelvin’s paper on estimating the age of the Earth.

Kelvin made reasonable assumptions based on what was known in his time, but he also made several assumptions that turned out to be wrong. One incorrect assumption was that Earth is solid and that the cooling was therefore via conduction only, hence justifying the use of the diffusion equation. But the most serious error was a forgivable one—omission of the fact that Earth contains radioactive elements that continually supply heat beneath Earth’s mantle. The discovery of radioactivity came near the end of Kelvin’s life and he acknowledged that his calculation would have to be modified.

Kelvin used the simple one-dimensional model applied only to Earth’s outer shell, and derived the age from graphs and the roughly known temperature gradient near Earth’s surface. Let’s take a look at a more appropriate version of the diffusion equation in radial coordinates, which has the form

[dfrac{∂T}{∂t}=Kleft[dfrac{∂^2T}{∂^2r}+dfrac{2}{r}dfrac{∂T}{∂r} ight] label{kelvin1}].

Here, (T(r,t)) is temperature as a function of (r) (measured from the center of Earth) and time (t. K) is the heat conductivity—for molten rock, in this case. The standard method of solving such a partial differential equation is by separation of variables, where we express the solution as the product of functions containing each variable separately. In this case, we would write the temperature as

[T(r,t)=R(r)f(t).]

1. Substitute this form into Equation ef{kelvin1} and, noting that (f(t)) is constant with respect to distance ((r)) and (R(r)) is constant with respect to time ((t)), show that [dfrac{1}{f}dfrac{∂f}{∂t}=dfrac{K}{R}left[dfrac{∂^2R}{∂r^2}+dfrac{2}{r}dfrac{∂R}{∂r} ight]. ]
2. This equation represents the separation of variables we want. The left-hand side is only a function of (t) and the right-hand side is only a function of (r), and they must be equal for all values of (r) and (t). Therefore, they both must be equal to a constant. Let’s call that constant (−λ^2). (The convenience of this choice is seen on substitution.) So, we have [dfrac{1}{f}dfrac{∂f}{∂t}=−λ^2 ext{and} dfrac{K}{R}left[dfrac{∂^2R}{∂r^2}+dfrac{2}{r}dfrac{∂R}{∂r} ight]=−λ^2.]
3. Now, we can verify through direct substitution for each equation that the solutions are (f(t)=Ae^{−λ^2t}) and (R(r)=Bleft(dfrac{sin αr}{r} ight)+Cleft(dfrac{cos αr}{r} ight)), where (α=λ/sqrt{K}). Note that (f(t)=Ae^{+λn^2t}) is also a valid solution, so we could have chosen (+λ^2)for our constant. Can you see why it would not be valid for this case as time increases?
4. Let’s now apply boundary conditions.
1. The temperature must be finite at the center of Earth, (r=0). Which of the two constants, (B) or (C), must therefore be zero to keep (R) finite at (r=0)? (Recall that (sin(αr)/r→α=) as (r→0), but (cos(αr)/r) behaves very differently.)
2. Kelvin argued that when magma reaches Earth’s surface, it cools very rapidly. A person can often touch the surface within weeks of the flow. Therefore, the surface reached a moderate temperature very early and remained nearly constant at a surface temperature (T_s). For simplicity, let’s set (T=0) at (r=R_E) and find α such that this is the temperature there for all time (t). (Kelvin took the value to be (300K≈80°F). We can add this (300K) constant to our solution later.) For this to be true, the sine argument must be zero at (r=R_E). Note that α has an infinite series of values that satisfies this condition. Each value of (α) represents a valid solution (each with its own value for (A)). The total or general solution is the sum of all these solutions.
3. At (t=0,) we assume that all of Earth was at an initial hot temperature (T_0) (Kelvin took this to be about (7000K).) The application of this boundary condition involves the more advanced application of Fourier coefficients. As noted in part b. each value of (α_n) represents a valid solution, and the general solution is a sum of all these solutions. This results in a series solution: [T(r,t)=left(dfrac{T_0R_E}{π} ight)sum_ndfrac{(−1)^{n−1}}{n}e^{−λn^2t}dfrac{sin(α_nr)}{r}, ext{where}; α_n=nπ/R_E].

Note how the values of (α_n) come from the boundary condition applied in part b. The term (dfrac{−1^{n−1}}{n}) is the constant (A_n) for each term in the series, determined from applying the Fourier method. Letting (β=dfrac{π}{R_E}), examine the first few terms of this solution shown here and note how (λ^2) in the exponential causes the higher terms to decrease quickly as time progresses:

[T(r,t)=dfrac{T_0R_E}{πr}left(e^{−Kβ^2t}(sinβr)−dfrac{1}{2}e^{−4Kβ^2t}(sin2βr)+dfrac{1}{3}e^{−9Kβ^2t}(sin3βr)−dfrac{1}{4}e^{−16Kβ^2t}(sin4βr)+dfrac{1}{5}e^{−25Kβ^2t}(sin5βr)... ight).]

Near time (t=0,) many terms of the solution are needed for accuracy. Inserting values for the conductivity (K) and (β=π/R_E) for time approaching merely thousands of years, only the first few terms make a significant contribution. Kelvin only needed to look at the solution near Earth’s surface (Figure (PageIndex{6})) and, after a long time, determine what time best yielded the estimated temperature gradient known during his era ((1°F) increase per (50ft)). He simply chose a range of times with a gradient close to this value. In Figure (PageIndex{6}), the solutions are plotted and scaled, with the (300−K) surface temperature added. Note that the center of Earth would be relatively cool. At the time, it was thought Earth must be solid. Epilog

On May 20, 1904, physicist Ernest Rutherford spoke at the Royal Institution to announce a revised calculation that included the contribution of radioactivity as a source of Earth’s heat. In Rutherford’s own words:

“I came into the room, which was half-dark, and presently spotted Lord Kelvin in the audience, and realized that I was in for trouble at the last part of my speech dealing with the age of the Earth, where my views conflicted with his. To my relief, Kelvin fell fast asleep, but as I came to the important point, I saw the old bird sit up, open an eye and cock a baleful glance at me.

Then a sudden inspiration came, and I said Lord Kelvin had limited the age of the Earth, provided no new source [of heat] was discovered. That prophetic utterance referred to what we are now considering tonight, radium! Behold! The old boy beamed upon me.”

Rutherford calculated an age for Earth of about 500 million years. Today’s accepted value of Earth’s age is about 4.6 billion years.

## Key Concepts

• A partial derivative is a derivative involving a function of more than one independent variable.
• To calculate a partial derivative with respect to a given variable, treat all the other variables as constants and use the usual differentiation rules.
• Higher-order partial derivatives can be calculated in the same way as higher-order derivatives.

## Key Equations

• Partial derivative of (f) with respect to (x)

(dfrac{∂f}{∂x}=displaystyle{lim_{h→0}dfrac{f(x+h,y)−f(x,y)}{h}})

• Partial derivative of (f) with respect to (y)

(dfrac{∂f}{∂y}=displaystyle{lim_{k→0}dfrac{f(x,y+k)−f(x,y)}{k}})

## Glossary

higher-order partial derivatives
second-order or higher partial derivatives, regardless of whether they are mixed partial derivatives
mixed partial derivatives
second-order or higher partial derivatives, in which at least two of the differentiation are with respect to different variables
partial derivative
a derivative of a function of more than one independent variable in which all the variables but one are held constant

Determine the first partial derivatives of the function $f(x, y) = left<eginfrac<2x^3-y^3> & mathrm : (x, y) eq (0, 0)) 0 & mathrm (x, y) = (0, 0) end ight.$ , and determine if these partial derivatives are continuous at $(0, 0)$ .

Notice that in this example, $f$ is defined for all $(x, y) in mathbb^2$ , however, this function is a piecewise function, so we will deal with the partial derivatives of each piece of $f$ individually.

First suppose that $(x, y) eq (0, 0)$ . Then we can compute the partial derivatives of $f$ normally by applying the quotient rule:

Now suppose that $(x, y) = (0, 0)$ . We cannot use the partial derivative formulas above because we would get division by $, so instead, we will use the formal definition of the partial derivative at$(0, 0)$. We will now determine whether or not these partial derivatives are continuous at$(0, 0) in mathbb^2$. To show that, we must show whether or not$lim_ <(x, y) o (0, 0)>frac (x, y) = 2$and whether or not$lim_ <(x, y) o (0, 0)>frac (x, y) = -frac<1><3>$. First let's determine if$frac$is continuous at$(0, 0)$. Now notice that if we evaluate this limit along the line$x = 0$then we get that$lim_ <(x, y) o (0, 0)>frac (x, y) = 0$(which already tells us that our partial derivative is discontinuous), but also, if we evaluate this limit along the line$y = 0$then we get that$lim_ <(x, y) o (0, 0)>frac (x, y) = 2$. Since we have two different limits, we conclude that$lim_ <(x, y) o (0, 0)>frac (x, y)$does not exist. Therefore we have that$frac$is discontinuous at$(0, 0)$. Now let's determine if$frac$is continuous at$(0, 0)$. Now notice that if we evaluate this limit along the line$x = 0$we get that$lim_ <(x, y) o (0, 0)>frac (x, y) = - frac<1><3>$. However, if we evaluate this limit along the line$y = 0$we get that$lim_ <(x, y) o (0, 0)>frac (x, y) = 0$. Since we have two different limits, we conclude that$lim_ <(x, y) o (0, 0)>frac (x, y)$does not exist. Therefore we have that$frac$is discontinuous at$(0, 0)$. Note that from Example 1 above, that a function can be differentiable even though its partial derivatives may be discontinuous. ## Business Calculus with Excel A standard technique in mathematics courses is to try to break a complicated problem into smaller and easier problems. For functions of several variables this can be done by looking at the variables one at a time, and treating the other variables as constants. Then we are back to considering functions of a single variable. We start by returning to Example 5 from the previous section, and seeing what information can be obtained by looking at one variable at a time. ###### Example 6.2.1 . Optimizing Revenue with Two Products. I have a company that produces 2 products, widgets and gizmos. The two demand functions are: This gives me the following revenue function: Look at the functions of one variable obtained by treating either QG or QW as a constant. Use this information to find where we maximize revenue. Solution: In terms of the last example, we want to start with a table and a wire frame chart.  The wires are obtained by intersecting the graph of the function with a plane where QW or QG is held constant. Thus, when we treat either QW or QG as a constant we effectively are looking at one of the wires of the wire frame. To illustrate this, we will look at the wires corresponding to (QW=400) and (QG=300 ext<.>) When (QG=300 ext<,>) our revenue function simplifies to Thus, the wire corresponding to (QG=300) is a parabola that bends down. To find the vertex of the parabola, we take the derivative of our function of QW and set it equal to zero. This derivative is zero when (QW=400 ext<.>) That is the only possible place on this wire where we can have a maximum. This derivative is zero when (QG=250 ext<.>) That is the only possible place on this wire where we can have a maximum. Putting the information together, the maximum must occur at (250,400). Putting these values back in the original equation gives a maximum of$5250 for the revenue function.

The procedure we used in the first example of replacing one variable with a constant and then taking the derivative of the resulting single variable function is a bit cumbersome. We can simplify the process by taking the derivative of the original function with respect to one variable while treating the other variables as constants. This is referred to as taking a partial derivative. There is also a change in notation. The familiar derivative of (f) with respect to (x) uses the symbol (frac f) while the partial derivative with respect to (x) uses the symbol (frac f ext<,>) or (f_x ext<.>) Similarly, the partial derivative with respect to (y) uses the symbol(frac f ext<,>) or (f_y ext<.>)

###### Example 6.2.2 . Finding and Interpreting Partial Derivatives.

Find the partial derivatives of (f(x,y)=x^2+ 2xy+3y^2-4x-3y) at ((x,y)=(3.5,-0.5) ext<.>) Explain what the partial derivatives mean in terms of the graph.

Solution: It is useful to look at a picture with the graph, the two curves obtained by keeping (x=3.5) and (y=1.5 ext<,>) and the tangent lines to those curves. We also want to look at the slices corresponding keeping (x=-3.5) and (y=.5 ext<.>)  The yellow curve is obtained by fixing (y) and letting (x) vary. The blue curve is obtained by fixing (y) and letting (x) vary. We now take the partial derivatives with respect to both variables.

The partial derivatives give the slopes of the purple and red lines above. At the point ((3.5,-0.5) ext<,>) the (yellow) curves obtained by treating y as a constant and letting (x) vary has a (magenta) tangent line with a slope of (2 ext<,>) the value (frac f(3.5,-0.5) ext<.>) At the point ((3.5,-0.5) ext<,>) the (blue) curves obtained by treating (x) as a constant and letting (y) vary has a (red) tangent line with a slope of 1, the value (frac f(3.5,-0.5) ext<.>)

For functions of one variable, we had two main uses of the derivative. One was to identify candidate points for maxima and minima. We will look at critical points and extrema in the next section. The other use of the derivative was to produce a linear approximation or tangent line. We can generalize the tangent line for one variable to a tangent plane for two variables. For a function (f(x) ext<,>) we used the value of the point, ((x_0,f(x_0))) and the slope (f(x_0)) to get the equation of the tangent line approximation near (x_0 ext<.>)

For a function, (f(x,y) ext<,>) of two variables, we simply use partials for the slopes.

###### Example 6.2.3 . Approximating with a Tangent Plane.

The general Cobb-Douglas production function determines the Production (P), in terms of the variables Labor (L) and Capital (C):

or using short-hand notation:

where (c ext<,>) (alpha ext<,>) and (eta) are constants. For our widget factory, this becomes

with labor production and capital in the appropriate units. Find (Production(81,16) ext<.>) Use a linear approximation to estimate (Production(85,14) ext<.>)

Solution: We answer the first question by substituting the values into the equation.

To produce the tangent plane we take the partial derivatives and evaluate them at our base point.

This gives us our tangent plane.

Substituting in values gives our estimate.

In the case of the last example, evaluating the linear approximation was nicer than evaluating the function directly because the 4th roots of 16 and 81 are whole numbers, while the 4th roots of 85 and 14 are harder to compute. For real world functions, evaluating functions may involve a substantial investment of time and money, depending on the nature of the function.

In this section we have focused on functions of 2 variables since their graphs are surfaces in 3 dimensions, which is a familiar concept. For real world functions, we are often concerned with functions of many variables. The concept of partial derivative easily extends, with one variable and multiple parameters. Finding the linear approximation also extends without difficulty. We simply have a linear term for each variable.

### Exercises Exercises: Wire Frames, Partial Derivatives, and Tangent Planes Problems

For exercises 1-7, for the given functions and points (P_1) and (P_2 ext<:>)

Give the 2 functions of one variable through (P_1) obtained by holding each variable constant.

Find the partial derivatives of the original function.

Evaluate the partial derivatives at (P_1 ext<.>)

Give the equation of the tangent plane through (P_1 ext<.>)

The approximation at (P_2) obtained from the tangent plane.

The function is (f(x,y)=x^2+3xy+4y^2 ext<,>) (P_1=(4,2) ext<,>) and (P_2=(3,2.5) ext<.>)

Give the 2 functions of one variable through (P_1) obtained by holding each variable constant.

Find the partial derivatives of the original function.

Evaluate the partial derivatives at (P_1 ext<.>)

Give the equation of the tangent plane through (P_1 ext<.>)

We need (f(4,2)=16+24+16=56) for the equation of the tangent plane.

The approximation at (P_2) obtained from the tangent plane.

The function is (f(x,y)=(x+3y)/(x^2+y^2 ) ext<,>) (P_1=(2,3) ext<,>) and (P_2=(3,2.5) ext<.>)

The function is (f(x,y)=(x^2)(x+2^y) ext<,>) (P_1=(3,-1) ext<,>) and (P_2=(3,0) ext<.>)

Give the 2 functions of one variable through (P_1) obtained by holding each variable constant.

Find the partial derivatives of the original function.

Evaluate the partial derivatives at (P_1 ext<.>)

Give the equation of the tangent plane through (P_1 ext<.>)

We need (f(3,-1)=9*frac<7><2>=frac<63><2>) for the equation of the tangent plane

The approximation at (P_2) obtained from the tangent plane.

The function is the revenue function for selling widgets and gizmos with demand price functions

and, (P_1=(QuanityGizmos,QuantityWidgets)=(1000,500) ext<,>) and (P_2=(1050,575) ext<.>)

The function is the revenue function for selling widgets and gizmos with demand price functions

and, (P_1=(QuanityGizmos,QuantityWidgets)=(800,400) ext<,>) and (P_2=(750,425) ext<.>)

For the sake of notation we will use the following abbreviations:

and, (P_1=(QG,QW)=(800,400) ext<,>) and (P_2=(750,425) ext<.>)

We need to find the Revenue function to solve the problem:

Give the 2 functions of one variable through (P_1) obtained by holding each variable constant.

This function gives us information about the revenue in terns of Widgets near a production level of 400 widgets and 800 gizmos. We can use Wolfram Alpha to graph this. Assuming there are 800 gizmos the widget influence on the revenue looks like this The slope is about (m = 4 ext<.>)

The revenue generated by the gizmos assuming the number of widgets = 400 and the number of gizmos is near 800 gives the following picture The slope is about (m=8 ext<.>)

Find the partial derivatives of the original function.

In part a we saw that the revenue function seems to be growing faster for the gizmo variable, then for the widget variable. To get more information we can compute the partial derivatives (b) and then evaluate them at (P_1) (c).

Note that the first part requires a product rule and then a chain rule to deal with the exponential part of the formula.

Evaluate the partial derivatives at (P_1 ext<.>)

The estimates we observed in part a were fairly close to the actual rates of change.

Give the equation of the tangent plane through (P_1 ext<.>)

We need to find (Rev(800,400) ext<.>) Using Wolfram Alpha (or calculator) we get

The approximation at (P_2) obtained from the tangent plane.

The estimated revenue when (P_2=(750,425)) is given by

In this case the change in production would result in a loss in revenue. This is mainly due to the impact of the lower production in gizmos.

The function is the Cobb-Douglas production function in a widget factory,

where labor is in workers, capital equipment is in units of \$20,000, and production is in units of 200 widgets produced per month. In the ((Labor,Capital)) plane, let (P_1=(100,30) ext<,>) and (P_2=(110,25) ext<.>)

The function is the Cobb-Douglas production function in a country,

where labor is in millions of workers, capital equipment is in units of billions of dollars, and production is in units of billions of dollars per year. In the ((Labor,Capital)) plane, let (P_1=(300,30) ext<,>) and (P_2=(310,32) ext<.>)

Give the 2 functions of one variable through (P_1) obtained by holding each variable constant.

## 6.3: Partial Derivatives - Mathematics

The Maple commands for computing partial derivatives are D and diff . The diff command can be used on both expressions and functions whereas the D command can be used only on functions. The commands below show examples of first order and second order partials in Maple.

Note in the above D command that the 1 in the square brackets means x and the 2 means y . The next example shows how to evaluate the mixed partial derivative of the function given above at the point .

To find a point, , where the tangent plane is horizontal, you would need to solve where both first order partials are equal to zero simultaneously.

The horizontal plane at that point would simply be . Below is how to plot the surface and the horizontal tangent plane.

To find the tangent plane to the sphere at the point and is positive, you would first need to find the coordinating value for the ordered pair. Below is how you would do this in Maple as well as find and plot the tangent plane implicitly.

at the point using the diff command and then again using the D command.

a) Find the plane tangent to the given surface at . b) Plot the surface and the tangent plane on the same graph and rotate the 3-D plot to show the point of tangency. Use plotting ranges and . c) Find the point where the tangent plane to the given surface would be horizontal. d) Plot the surface and the horizontal tangent plane on the same graph and rotate the 3-D plot to show the point of tangency. Use the same plotting ranges as above.

## Bezier triangle partial derivatives Hello I am trying to compute the partial derivatives of a bezier triangle (in u and v directions).

The section that interest me is " Derivatives [triangles]:"

question 1 : In the equations. does "p" refer to the actual control points of the triangle?

If this is the case, it seems like the derivative takes into account only 6 of the 10 control points of the patch. Is this normal?

the coefficients computed are for i+j+k=2 so if I plug theses values in the bernstein polynomial definition I get the following coefficients :

i=0, j=0, k=2 ---> w * w
i=0, j=2, k=0 ---> v * v
i=2, j=0, k=0 ---> u * u
i=1, j=1, k=0 ---> 2 * u * v
i=1, j=0, k=1 ---> 2 * u * w
i=0, j=1, k=1 ---> 2 * v * w

question 2 : this seems to contradict another section of the article where a bernstein of degree two is used for indices 110, 101, 011 and there is no x2 multiplication. Is this normal?

Hopefully someone can clarify this. I really need theses derivatives. According to the terminology used so far, I’d say yes.

I found an old paper by Sederberg, which has a graphical explanation for the definition of directional derivatives (Fig. 14). The figure depicts the construction of the derivative patch in w-direction (w=const). The construction for the patches in u- and v-direction is similar. Though, it has a little error in there, I think. The top and top left control points are substituted, but I think you can get the gist.

It’s expected that the degree of the “derivative patch” goes down, so 6 points instead of 10 seems right. If you derive a polynomial of degree n the outcome is a polynomial of degree n-1.

This is indeed a little strange. I’d have expected the factor 2, too.
Well, after all, this article seems not to be peer-reviewed, so little errors might be possible. I’d suggest to pick up a book of Farin, e.g. “Curves and Surfaces for CAGD: A Practical Guide” (Chapter 17) if you want to learn more. I manually derived the position equation to find the partial derivatives.

For n=3 the code looks like this :

float3 bezierTriangle(float3 uvw, float3 points)
<
return
uvw.x * uvw.x * uvw.x * points[P300] +
uvw.y * uvw.y * uvw.y * points[P030] +
uvw.z * uvw.z * uvw.z * points[P003] +
3.0f * uvw.x * uvw.x * uvw.y * points[P210] +
3.0f * uvw.y * uvw.y * uvw.z * points[P021] +
3.0f * uvw.z * uvw.z * uvw.x * points[P102] +
3.0f * uvw.y * uvw.y * uvw.x * points[P120] +
3.0f * uvw.z * uvw.z * uvw.y * points[P012] +
3.0f * uvw.x * uvw.x * uvw.z * points[P201] +
6.0f * uvw.x * uvw.y * uvw.z * points[P111]
>

. And the derivatives in u and v are :

float3 bezierTriangle_du(float3 uvw, float3 points)
<
return
3.0f * uvw.x * uvw.x * (points[P300] - points[P201]) +
3.0f * uvw.y * uvw.y * (points[P120] - points[P021]) +
3.0f * uvw.z * uvw.z * (points[P102] - points[P003]) +
6.0f * uvw.x * uvw.y * (points[P210] - points[P111]) +
6.0f * uvw.x * uvw.z * (points[P201] - points[P102]) +
6.0f * uvw.y * uvw.z * (points[P111] - points[P012])
>

float3 bezierTriangle_dv(float3 uvw, float3 points)
<
return
3.0f * uvw.x * uvw.x * (points[P210] - points[P201]) +
3.0f * uvw.y * uvw.y * (points[P030] - points[P021]) +
3.0f * uvw.z * uvw.z * (points[P012] - points[P003]) +
6.0f * uvw.x * uvw.y * (points[P120] - points[P111]) +
6.0f * uvw.x * uvw.z * (points[P111] - points[P102]) +
6.0f * uvw.y * uvw.z * (points[P021] - points[P012])
>

As we can see, the derivatives for a degree 3 Bezier triangle is a degree 2 Bezier triangle. But the control points are not like they describe in the article.

We actually use 9 of the 10 initial control points to make 6 new ones.

I guess it could be written like this :

I also compared the results of adding a a factor 2 to the original N-Patch normal equation. Obviously, it still works without it but I think I looks better with the factor 2.

## Partial Derivative Calculator

Partial Derivative Calculator computes derivatives of a function with respect to given variable utilizing analytical differentiation and displays a step-by-step solution. It gives chance to draw graphs of the function and its derivatives. Calculator maintenance derivatives up to 10th order, as well as complex functions. Derivatives being computed by parsing the function, utilizing differentiation rules and simplifying the result.

### How to Use Partial Derivative Calculator

1. Enter every needed function to differentiate
2. Enter differentiation variable if it is different from the the default value
3. Choose degree of differentiation
4. Click Compute button
5. Derivative of the function will be computed and displayed on the screen
6. Click on Show a step by step solution if there is a desire to observe the differentiation steps
7. Click on Draw graph to display graphs of the function and its derivative

This calculator can take the partial derivative of regular functions, as well as trigonometric functions.

• Member Info
• Member Type:
• Other
• Native Language:
• American English
• Home Country:
• United States
• Current Location:
• United States

My research showed only that it's called "the curved d" or sometimes "the curly d."

It is not the lower case delta (the Greek letter).

• Member Info
• Member Type:
• Interested in Language
• Native Language:
• American English
• Home Country:
• United States
• Current Location:
• United States

## Options

There are several ways to use this dictionary. The most common way is by word input (you must know which language the word is in) but you can also use your browser's search box and bookmarklets (or favelets).

Look at the complete list of languages: Available language pairs

There are two Japanese-English (and Japanese-French) dictionaries and one contains Kanji and Kana (Kana in English and French pair due to improved searching). For the same reason the Chinese dictionary contains traditional and simplified Chinese terms on one side and Pinyin and English terms on the other.

### Browser integration (Search plugins)

Perhaps the best way to enable dictionary search is through integration into the search field of your browser. To add EUdict alongside Google, Yahoo!, Amazon and other search engines in Mozilla Firefox or Internet Explorer, simply click on link after the title Browser integration, select appropriate language pair and confirm your decision. And you're ready to go select EUdict from the drop-down list in search field (Firefox) or address bar (IE), input a word and press Enter. In Chrome, first click on a language pair and change the search keyword in the field 'Keyword' to a keyword (eg: 'eudict'). Afterwards, you simply type the chosen keyword in the address bar to start the search in the chosen dictionary.

### Bookmarklets

There is a way to enable word translation from any page: Bookmarklets. A bookmarklet is a small JavaScript code stored as a bookmark in your browser.

### Tips and tricks

If you want to type a character which isn't on your keyboard, simply pick it from a list of special characters. If you are unable to add a bookmarklet in Mozilla Firefox according to the instructions above, there is another way right click on a link and select Bookmark this link… Now you can drag this link from Bookmarks to the Bookmarks Toolbar.

Instead of clicking the Search button, just press Enter. Although EUdict can't translate complete sentences, it can translate several words at once if you separate them with spaces or commas. Sometimes you can find translation results directly from Google by typing: eudict word. If you are searching for a word in Japanese (Kanji) dictionary and not receiving any results, try without Kana (term in brackets). If you are searching for a word in the Chinese dictionary and not receiving any results, try without Pinyin (term in brackets). Disable spellchecking in Firefox by going to Tools → Options → Advanced → Check my spelling as I type. Why not add a EUdict search form to your web site? Form

## Partial Derivatives of a unit vector to provide more background, I'm trying to find the derivative of the constraint function:

C(p1,p2,p3) = arccos( PerpDot(n1,n2) ) - theta

where n1 = ((p2 - p1)/||p2 - p1||) and n2 = ((p3 - p1)/||p3 - p1||)

the theta term disappears in the derivative, and the derivative of arccos(x) is -1/(sqrt(1 - x^2)). So, all that remains is to figure out the derivative of the PerpDot.

If i understand correctly, perpdot is really just the inner product in 2D:
perpdot(a,b) = dot(a^T,b)

The function is a constraint function which describes the error between a current angle and some desired angle. I'm trying to understand this paper: http://graphics.ethz.ch/ Let p2 = (x,y) and p1 = (a,b), where x and y are the variables and where a and b are constants. Then n = (y-b,-(x-a))/pow((x-a)^2+(y-b)^2,1/2).

The derivative with respect to x is the vector

and the derivative with respect to y is the vector

The first derivative of n with respect to (x,y) is written as a matrix whose columns are dn/dx and dn/dy. Is my simplification (translating everything to locate p1 at the origin) valid? Also, do you know of a good book/site for learning this sort of thing? I've found many engineering tutorials, but they never follow through all the way to show how the derivatives are actually computed!

In the paper I mentioned they derive the gradient of the normalized cross product n = (p1 x p2)/||p1 x p2||

I'm trying to do the same thing, but in 2D, so I need the gradient of the normalized perpdot am I on the right track? I feel a bit stupid.. this math seems like it makes perfect sense, but it's still over my head I'm afraid! Basically in a partial derivative you're just treating all the variables except for one as constants. For example, the partial derivative of f(x,y,z) = xyz with respect to x is just yz.

Just expand out this perpdot thing by substitution using its definition and it might become a lot clearer. perpdot(a,b) = a.y * b.x - a.x * b.y, I think. So if b is a constant, the derivative with respect to a.x is -b.y. I'm a bit confused about vector-valued functions -- it seems like i should just treat each vector as two separate variables, but I'm not sure that this is correct.

In the paper I linked to they're using the gradient of a function wrt a _vector_, not a component of a vector: is this just shorthand for finding the gradient wrt each of the vector's components?

thanks so much for the info. You must distiguish between scalar and vector valued functions. E.g.

C1(p1,p2) = p1 * p2 is a scalar valued function
C2(p1,p2) = p1 x p2 is a vector valued function

Since p1 and p2 are functions of the time you can find the Jacobians by inspection

dC2/dt = p1 x v2 + v1 x p2 = p1 x v2 - p2 x v1 = P1 * v2 - P2 * v1 where P_i is the cross-matrix of p_i

You see that the "gradient" for the vector valued functions is a vector. While the so called "vector gradient" is a matrix (tensor) often refered to as Jacobian.

Regarding your specific constraint funtions. If it is from the "Position Based Dynamics" paper there is a derivation in the appendix of the paper.

I also found it very difficult to find material about this topic and I can recommend only a few things

a) The math reference of E. Guendelman was very helpful
http://graphics.stanford.edu/

b) This paper of R. Bridson has some information in the appendix
http://www.cs.ubc.ca/

Scalar fields
Vector fields
Jacobian

This should get you a little further. Mostly it behaves like normal analysis. The tricky part is the multiplication order and you often have to use the transpose. See section "2 Multivariable" in the Guendelman math reference.

## Partial Differentiation Questions and Answers – Variable Treated as Constant

This set of Differential and Integral Calculus Multiple Choice Questions & Answers (MCQs) focuses on “Variable Treated as Constant”.

1. If z=3xy+4x 2 , what is the value of (frac<∂z><∂x>)?
a) 3y+8x
b) 3x+4x 2
c) 3xy+8x
d) 3y+3x+8x

2. The value of (frac<∂z><∂y>)=8x 2 +6xy 2 +4. What is the function z expressed as?
a) z=8x 3 +2x 2 y 2 +4x
b) z=8x 2 y+2xy 3 +4y
c) z=8y+2xy 2 +4y
d) z=16x+6y 2

4. Volume of an object expressed in spherical coordinates is given by (V = int_0^<2>>∫_0^<3>>∫_0^1r cos∅ dr d∅ dθ.) The value of the integral is _______
a) (frac><2>)
b) (frac<1> <√2>π)
c) (frac> <2>π)
d) (frac><8>π)

6. What is the value of (frac<∂^2z><∂x∂y>) for the z=3x 2 y+5y?
a) 3xy
b) 6x
c) 3x+5
d) 6xy

8. Given (∫_0^8x^<3>>dx,) find the error in approximating the integral using Simpson’s 1/3 Rule with n=4.
a) 1.8
b) 2.9
c) 0.3
d) 0.35

9. The determinant of the matrix whose eigen values are 6, 4, 3 is given by ___________
a) 3
b) 24
c) 72
d) 13