Learning Outcomes
- Calculate the partial derivatives of a function of two variables.
- Calculate the partial derivatives of a function of more than two variables.
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 [latex]y[/latex] as a function of [latex]x[/latex]. Leibniz notation for the derivative is [latex]dy/dx[/latex], which implies that [latex]y[/latex] is the dependent variable and [latex]x[/latex] is the independent variable. For a function [latex]z=f\,(x,\ y)[/latex] of two variables, [latex]x[/latex] and [latex]y[/latex] are the independent variables and [latex]z[/latex] is the dependent variable. This raises two questions right away: How do we adaptLeibniz notation for functions of two variables? Also, what is an interpretation of the derivative? The answer lies in partial derivatives.
Definition
Let [latex]f\,(x,\ y)[/latex] be a function fo two variables. Then thepartial derivative of [latex]f[/latex] with respect to [latex]x[/latex], written as [latex]\partial f/\partial x[/latex], or [latex]f_x[/latex], is defined as
[latex]\large{\frac{\partial f}{\partial x}=\lim_{h\to{0}}\frac{f\,(x+h,\ y)-f\,(x,\ y)}{h}}[/latex].
The partial derivative of [latex]f[/latex] with respect to [latex]y[/latex], written as [latex]\partial f/\partial y[/latex], or [latex]f_y[/latex], is defined as
[latex]\large{\frac{\partial f}{\partial y}=\lim_{k\to{0}}\frac{f\,(x,\ y+k)-f\,(x,\ y)}{k}}[/latex].
This definition shows two differences already. First, the notation changes, in the sense that we still use a version of Leibniz notation, but the [latex]d[/latex] in the original notation is replaced with the symbol [latex]\partial[/latex]. (This rounded “[latex]d[/latex]” is usually called “partial,” so [latex]\partial f/\partial x[/latex] is spoken as the “partial of [latex]f[/latex] with respect to [latex]x[/latex].”)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: Calculating Partial Derivatives from the Definition
Use the definition of the partial derivative as a limit to calculate [latex]\partial f/\partial x[/latex] and [latex]\partial f/\partial y[/latex] for the function
[latex]f\,(x,\ y)=x^{2}-3xy+2y^{2}-4x+5y-12[/latex].
Show Solution
TRY IT
Use the definition of the partial derivative as a limit to calculate [latex]\partial f/\partial x[/latex] and [latex]\partial f/\partial y[/latex] for the function
[latex]f\,(x,\ y)=4x^{2}+2xy-y^{2}+3x-2y+5.[/latex]
Show Solution
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 [latex]y[/latex] and define [latex]g\,(x)=f\,(x,\ y)[/latex] as a function of [latex]x[/latex]. Then
[latex]g'\,(x)=\displaystyle\lim_{h\to 0}\frac{g\,(x+h)-g\,(x)}{h}=\displaystyle\lim_{h\to 0}\frac{f\,(x+h,\ y)-f\,(x,\ y)}{h}=\frac{\partial f}{\partial x}.[/latex]
The same is true for calculating the partial derivative of [latex]f[/latex] with respect to [latex]y[/latex]. This time, fix [latex]x[/latex] and define [latex]h\,(y)=f\,(x,\ y)[/latex] as a function of [latex]y.[/latex] Then
[latex]h'\,(x)=\displaystyle\lim_{k\to 0}\frac{h\,(x+h)-h\,(x)}{k}=\displaystyle\lim_{k\to 0}\frac{f\,(x,\ y+k)-f\,(x,\ y)}{k}=\frac{\partial f}{\partial y}.[/latex]
All differentiation rules from the Introduction to Derivatives apply.
Example: Calculating Partial Derivatives
Calculate [latex]\partial f/\partial x[/latex] and [latex]\partial f/\partial y[/latex] for the following functions by holding the opposite variable constant then differentiating:
- [latex]f\,(x,\ y)=x^{2}-3xy+2y^{2}-4x+5y-12[/latex].
- [latex]g\,(x,\ y)=\sin{(x^{2}y-2x+4)}[/latex]
Show Solution
TRY IT
Calculate [latex]\partial f/\partial x[/latex] and [latex]\partial f/\partial y[/latex] for the function [latex]f\,(x,\ y)=\tan{(x^{3}-3x^{2}y^{2}+2y^{4})}[/latex] by holding the opposite variable constant, then differentiating.
Show Solution
Watch the following video to see the worked solution to the above Try It
Try It
How can we interpret these partial derivatives? Recall that the graph of a function of two variables is a surface in [latex]\mathbb{R}^{3}[/latex]. If we remove the limit from the definition of the partial derivative with respect to [latex]x[/latex], the difference quotient remains:
[latex]\LARGE{\frac{f\,(x+h,\ y)-f\,(x,\ y)}{h}}[/latex].
This resembles the difference quotient for the derivative of a function of one variable, except for the presence of the [latex]y[/latex] variable.variable. Figure 1 illustrates a surface described by an arbitrary function [latex]z=f\,(x,\ y)[/latex].
Figure 1.Secant line passing through the points [latex]\small{(x,y,f(x,y))}[/latex] and[latex]\small{(x+h,y,f(x+h,y))}[/latex].
In Figure 1, the value of [latex]h[/latex] is positive. If we graph [latex]f\,(x,\ y)[/latex] and [latex]f\,(x+h,\ y)[/latex] for an arbitrary point [latex](x,\ y)[/latex], then the slope of the secant line passing through these two points is given by
[latex]\LARGE{\frac{f\,(x+h,\ y)-f\,(x,\ y)}{h}}[/latex].
This line is parallel to the [latex]x[/latex]-axis. Therefore, the slope of the secant line represents an average rate of change of the function [latex]f[/latex] as we travel parallel to the [latex]x[/latex]-axis. As [latex]h[/latex] approaches zero, the slope of the secant line approaches the slope of the tangent line.
If we chose to change [latex]y[/latex] instead of [latex]x[/latex] by the same incremental value [latex]h[/latex], then the secant line is parallel to the [latex]y[/latex]-axisw and so is the tangent line. Therefore, [latex]\partial f/\partial x[/latex] represents the slope of the tangent line passing through the point [latex](x,\ y,\ f\,(x,\ y))[/latex] parallel to the [latex]x[/latex]-axis and [latex]\partial f/\partial y[/latex] represents the slope of the tangent line passing through the point[latex](x,\ y,\ f\,(x,\ y))[/latex] parallel to the [latex]y[/latex]-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 calleddirectional derivatives, which we discuss in Directional Derivatives and the Gradient.
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 [latex]g\,(x,\ y)[/latex].
Example: Partial DErivatives from a Contour Map
Use a contour map to estimate [latex]\partial g/\partial x[/latex] at the point [latex](\sqrt{5},\ 0)[/latex] for the function
[latex]g\,(x,\ y)=\sqrt{9-x^{2}-y^{2}}[/latex].
Show Solution
TRY IT
Use a contour map to estimate [latex]\partial f/\partial y[/latex] at point [latex](0,\ \sqrt{2})[/latex] for the function
[latex]f\,(x,\ y)=x^{2}-y^{2}[/latex].
Compare this with the exact answer.
Show Solution
Functions of More Than Two Variables
Suppose we have a function of three variables, such as [latex]w=f\,(x,\ y,\ z)[/latex]. We can calculate partial derivatives of [latex]w[/latex] with respect to any of the independent variables, simply as extensions of the definitions for partial derivatives of functions of two variables.
Definition
Let [latex]f\,(x,\ y,\ z)[/latex] be a function of three variables. Then, thepartial derivative of [latex]f[/latex] with respect to [latex]x[/latex], written as [latex]\partial f/\partial x[/latex], or [latex]f_x[/latex], is defined to be
[latex]\large{\frac{\partial f}{\partial x}=\displaystyle\lim_{h\to 0}\frac{f\,(x+h,\ y,\ z)-f\,(x,\ y,\ z)}{h}}[/latex].
Thepartial derivative of [latex]f[/latex] with respect to [latex]y[/latex], written as [latex]\partial f/\partial y[/latex], or [latex]f_y[/latex], is defined to be
[latex]\large{\frac{\partial f}{\partial y}=\displaystyle\lim_{k\to 0}\frac{f\,(x,\ y+k,\ z)-f\,(x,\ y,\ z)}{k}}[/latex].
Thepartial derivativeof [latex]f[/latex] with respect to [latex]z[/latex], written as [latex]\partial f/\partial z[/latex], or [latex]f_z[/latex], is defined to be
[latex]\large{\frac{\partial f}{\partial z}=\displaystyle\lim_{m\to 0}\frac{f\,(x,\ y,\ z+m)-f\,(x,\ y,\ z)}{m}}[/latex].
We can calculate a partial derivative of a function of three variables using the same idea we used for a function of two variables. Fore example, if we have a function [latex]f[/latex] of [latex]x,\ y[/latex], and [latex]z[/latex], and we wish to calculate [latex]\partial f/\partial x[/latex], then we create the other two independent variables as if they are constants, then differentiate with respect to [latex]x[/latex].
Example: Calculating partial derivatives for a Function of Three Variables
Use the limit definition of partial derivatives to calculate [latex]\partial f/\partial x[/latex] for the function
[latex]\large{f\,(x,\ y,\ z)=x^{2}-3xy+2y^{2}-4xz+5yz^{2}-12x+4y-3z}[/latex].
Then, find [latex]\partial f/\partial y[/latex] and [latex]\partial f/\partial z[/latex] by setting the other two variables constant and differentiating accordingly.
Show Solution
TRY IT
Use the limit definition of partial derivatives to calculate [latex]\partial f/\partial x[/latex] for the function
[latex]f\,(x,\ y,\ z)=2x^{2}-4x^{2}+2y^{2}+5xz^{2}-6x+3z-8[/latex].
Then, find [latex]\partial f/\partial y[/latex] and [latex]\partial f/\partial z[/latex] by setting the other two variables constant and differentiating accordingly.
Show Solution
Example: Calculating Partial Derivatives for a Function of Three Variables
Calculate the three partial derivatives of the following functions.
- [latex]f\,(x,\ y,\ z)=\frac{x^{2}y-4xz+y^{2}}{x-3yz}[/latex]
- [latex]g\,(x,\ y,\ z)=\sin{(x^{2}y-z)}+\cos{(x^{2}-yz)}[/latex]
Show Solution
TRY IT
Calculate [latex]\partial f/\partial x,\ \partial f/\partial y[/latex], and [latex]\partial f/\partial z[/latex] for the function [latex]f\,(x,\ y,\ z)=\sec{(x^{2}y)}-\tan{(x^{3}yz^{2}})[/latex].
Show Solution
Watch the following video to see the worked solution to the above Try It