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. The definitions extend naturally from what we did with two variables.
partial derivatives of functions of three variables
Let [latex]f(x,y,z)[/latex] be a function of three variables. Then:
[latex]\\[/latex]
The partial derivative with respect to [latex]x[/latex] is
[latex]\dfrac{\partial f}{\partial x}=\underset{h\to 0}{\text{lim}}\dfrac{f(x+h,y,z)-f(x,y,z)}{h}[/latex].
The partial derivative with respect to [latex]y[/latex] is
[latex]\dfrac{\partial f}{\partial y}=\underset{k\to 0}{\text{lim}}\dfrac{f(x,y+k,z)-f(x,y,z)}{k}[/latex].
The partial derivative with respect to [latex]z[/latex] is
[latex]\dfrac{\partial f}{\partial z}=\underset{m\to 0}{\text{lim}}\dfrac{f(x,y,z+m)-f(x,y,z)}{m}[/latex].
The computation technique is identical to what you used with two variables. To calculate [latex]\frac{\partial f}{\partial x}[/latex], treat [latex]y[/latex] and [latex]z[/latex] as constants and differentiate with respect to [latex]x[/latex]. The same principle applies for the other partial derivatives—just hold the other variables constant and differentiate with respect to the variable of interest.
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
We first calculate [latex]\partial f/\partial x[/latex] using our definition, then we calculate the other two partial derivatives by holding the remaining variables constant. To use the equation to find [latex]\partial f/\partial x[/latex], we first need to calculate [latex]f\,(x+h,\ y,\ z)[/latex]:
[latex]\begin{array}{ccc}\hfill {f\,(x+h,\ y,\ z)} & =\hfill & {(x+h)^{2}-3(x+h)y+2y^{2}-4(x+h)z+5yz^{2}-12(x+h)+4y-3z}\hfill \\ \hfill & =\hfill & {x^{2}+2xh+h^{2}-3xy-3xh+2y^{2}-4xz-4hz+5yz^{2}-12x-12h+4y-3z} \hfill \\ \hfill \end{array}[/latex]
and recall that [latex]f\,(x,\ y,\ z)=x^{2}-3xy+2y^{2}-4xz+5yz^{2}-12x+4y-3z[/latex]. Next, we substitute these two expressions into the equation:
[latex]\begin{array}{ccc}\hfill {\frac{\partial f}{\partial x}} & =\hfill & {\displaystyle\lim_{h\to 0}\left[\frac{x^{2}+2xh+h^{2}-3xy-3xh+2y^{2}-4xz-4hz+5yz^{2}-12x-12h+4y-3z}{h} \\ - \frac{x^{2}-3xy+2y^{2}-4xz+5yz^{2}-12x+4y-3z}{h}\right]}\hfill \\ \hfill & =\hfill & {\displaystyle\lim_{h\to 0}\left[\frac{2xh+h^{2}-3hy-4hz-12h}{h}\right]}\hfill \\ \hfill & =\hfill & {\displaystyle\lim_{h\to 0}\left[\frac{h(2x+h-3y-4z-12)}{h}\right]}\hfill \\ \hfill & =\hfill & {\displaystyle\lim_{h\to 0}(2x+h-3y-4z-12)}\hfill \\ \hfill & =\hfill & {2x-3y-4z-12.} \hfill \\ \hfill \end{array}[/latex]
Then we find [latex]\partial f/\partial y[/latex] by holding [latex]x[/latex] and [latex]z[/latex] constant. Therefore, any term that does not include the variable [latex]y[/latex] is constant, and its derivative is zero. We can apply the sum, difference, and power rules for functions of one variable:
[latex]\begin{alignat}{2} &\frac{\partial}{\partial y}\left[x^{2}-3xy+2y^{2}-4xz+5yz^{2}-12x+4y-3z\right] \\ \hspace{2cm}&=\frac{\partial}{\partial y}\left[x^{2}\right]-\frac{\partial}{\partial y}\left[3xy\right]+\frac{\partial}{\partial y}\left[2y^{2}\right]-\frac{\partial}{\partial y}\left[4xz\right]+\frac{\partial}{\partial y}\left[5yz^{2}\right]-\frac{\partial}{\partial y}\left[12x\right]+\frac{\partial}{\partial y}\left[4y\right]-\frac{\partial}{\partial y}\left[3z\right] &\quad\\ &=0-3x+4y-0+5z^2-0+4-0\\ &=-3x+4y+5z^2+4.\\ \end{alignat}[/latex]
To calculate [latex]\partial f/\partial z[/latex], we hold [latex]x[/latex] and [latex]y[/latex] constant and apply the sum, difference, and power rules for functions of one variable:
[latex]\begin{alignat}{2} &\frac{\partial}{\partial z}\left[x^{2}-3xy+2y^{2}-4xz+5yz^{2}-12x+4y-3z\right] \\ \hspace{2cm}&=\frac{\partial}{\partial z}\left[x^{2}\right]-\frac{\partial}{\partial z}\left[3xy\right]+\frac{\partial}{\partial z}\left[2y^{2}\right]-\frac{\partial}{\partial z}\left[4xz\right]+\frac{\partial}{\partial z}\left[5yz^{2}\right]-\frac{\partial}{\partial z}\left[12x\right]+\frac{\partial}{\partial z}\left[4y\right]-\frac{\partial}{\partial y}\left[3z\right] &\quad\\ &=0-0+0-4x+10yz-0+0-3\\ &=-4z+10yz-3.\\ \end{alignat}[/latex]
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
In each case, treat all variables as constants except the one whose partial derivative you are calculating.
[latex]\begin{array}{ccc}1. \hspace{1cm} {\frac{\partial f}{\partial x}} & =\hfill & {\frac{\partial}{\partial x}\bigg[\frac{x^{2}y-4xz+y^{2}}{x-3yz}\bigg]}\hfill \\ \hfill & =\hfill & {\frac{\frac{\partial}{\partial x}(x^{2}y-4xz+y^{2})(x-3yz)-(x^{2}y-4xz+y^{2})\frac{\partial}{\partial x}(x-3yz)}{(x-3yz)^{2}}}\hfill \\ \hfill & =\hfill & {\frac{(2xy-4z)(x-3yz)-(x^{2}y-4xz+y^{2})(1)}{(x-3yz)^{2}}}\hfill \\ \hfill & =\hfill & {\frac{2x^{2}y-6xy^{2}z-4xz+12yz^{2}-x^{2}y+4xz-y^{2}}{(x-3yz)^{2}}} \hfill \\ \hfill & =\hfill & {\frac{x^{2}y-6xy^{2}z-4xz+12yz^{2}+4xz-y^{2}}{(x-3yz)^{2}}}\hfill \\ \hfill {\frac{\partial f}{\partial y}} & =\hfill & {\frac{\partial}{\partial y}\bigg[\frac{x^{2}y-4xz+y^{2}}{x-3yz}\bigg]}\hfill \\ \hfill & =\hfill & {\frac{\frac{\partial}{\partial y}(x^{2}y-4xz+y^{2})(x-3yz)-(x^{2}y-4xz+y^{2})\frac{\partial}{\partial y}(x-3yz)}{(x-3yz)^{2}}}\hfill \\ \hfill & =\hfill & {\frac{(x^{2}+2y)(x-3yz)-(x^{2}y-4xz+y^{2})(-3z)}{(x-3yz)^{2}}}\hfill \\ \hfill & =\hfill & {\frac{x^{3}-3x^{2}yz+2xy-6y^{2}z+3x^{2}yz-12xz^{2}+3y^{2}z}{(x-3yz)^{2}}}\hfill \\ \hfill & =\hfill & {\frac{x^{3}+2xy-3y^{2}z-12xz^{2}}{(x-3yz)^{2}}}\hfill \\ \hfill {\frac{\partial f}{\partial z}} & =\hfill & {\frac{\partial}{\partial z}\bigg[\frac{x^{2}y-4xz+y^{2}}{x-3yz}\bigg]}\hfill \\ \hfill & =\hfill & {\frac{\frac{\partial}{\partial z}(x^{2}y-4xz+y^{2})(x-3yz)-(x^{2}y-4xz+y^{2})\frac{\partial}{\partial z}(x-3yz)}{(x-3yz)^{2}}} \hfill \\ \hfill & =\hfill & {\frac{(-4x)(x-3yz)-(x^{2}y-4xz+y^{2})(-3y)}{(x-3yz)^{2}}} \hfill \\ \hfill & =\hfill & {\frac{-4x^{2}+12xyz+3x^{2}y^{2}-12xyz+3y^{3}}{(x-3yz)^{2}}}\hfill \\ \hfill & =\hfill & {\frac{-4x^{2}+3x^{2}y^{2}+3y^{3}}{(x-3yz)^{2}}} \hfill \\ \hfill \end{array}[/latex]
[latex]\begin{array}{ccc}2. \hspace{1cm} {\frac{\partial f}{\partial x}} & =\hfill & {\frac{\partial}{\partial x}\left[\sin{(x^{2}y-z)}+\cos{(x^{2}-yz)}\right]}\hfill \\ \hfill & =\hfill & {(\cos{(x^{2}y-z)})\frac{\partial}{\partial x}(x^{2}y-z)-(\sin{(x^{2}-yz)})\frac{\partial}{\partial x}(x^{2}-yz)}\hfill \\ \hfill & =\hfill & {2xy\cos{(x^{2}y-z)}-2x\sin{(x^{2}-yz)}} \hfill \\ \hfill {\frac{\partial f}{\partial y}} & =\hfill & {\frac{\partial}{\partial y}\left[\sin{(x^{2}y-z)}+\cos{(x^{2}-yz)}\right]}\hfill \\ \hfill & =\hfill & {(\cos{(x^{2}y-z)})\frac{\partial}{\partial y}(x^{2}y-z)-(\sin{(x^{2}-yz)})\frac{\partial}{\partial y}(x^{2}-yz)}\hfill \\ \hfill & =\hfill & {x^{2}\cos{(x^{2}y-z)}+z\sin{(x^{2}-yz)}} \hfill \\ \hfill {\frac{\partial f}{\partial z}} & =\hfill & {\frac{\partial}{\partial z}\left[\sin{(x^{2}y-z)}+\cos{(x^{2}-yz)}\right]}\hfill \\ \hfill & =\hfill & {(\cos{(x^{2}y-z)})\frac{\partial}{\partial z}(x^{2}y-z)-(\sin{(x^{2}-yz)})\frac{\partial}{\partial z}(x^{2}-yz)} \hfill \\ \hfill & =\hfill & {-\cos{(x^{2}y-z)}+y\sin{(x^{2}-yz)}} \hfill \\ \hfill \end{array}[/latex]