Partial Derivatives

Introduction

On to derivatives! You know that derivatives describe slope, and in two dimensions, this means the amount that a function rises or falls as we travel back and forth in the xx direction. When we get to three dimensions, though, we have to worry about which direction we're traveling in.

Roofers laying tile

Consider a roofer laying tiles, like in the picture above. We can talk about the slope of the roof, by which we mean how quickly he will rise as he walks toward the ridge of the roof. What if he walks parallel to the ridge, though? In that case, the slope is 00, which means that the slope depends on the direction of travel.

We'll start with the slope (derivative) when we travel in the direction of xx and in the direction of yy, and then in the next section, we'll discuss the derivative in an arbitrary direction.

Partial Derivatives

The partial derivative with respect to xx is the slope when we travel in the direction of xx (yy is constant). This is written fx or fx.\dfrac{\partial f}{\partial x} \textrm{ or } f_x.

Similarly, the partial derivative with respect to yy is the slope when we travel in the direction of yy. It is written fy or fy.\dfrac{\partial f}{\partial y} \textrm{ or } f_y.

Finding Partial Derivatives

To find the partial derivative with respect to one variable, treat the other variable as a constant.

Find fxf_x and fyf_y if f(x,y)=2x3x2y+2y23xf(x,y)=2x^3-x^2y+2y^2-3x.

Solution

To find fxf_x, treat yy as a constant. The first term gets differentiated as usual, the second term becomes 2xy−2xy, because x2x^2 gets differentiated as 2x2x and yy comes along for the ride as constant multiples do. The third term doesn't contain any xx's, so its derivative with respect to xx is 00. And of course, the derivative of the final term is 3−3.

fx=fx=x(2x3)x(x2y)+x(2y2)x(3x)=6x22xy3\begin{aligned} \dfrac{\partial f}{\partial x} = f_x &= \dfrac{\partial}{\partial x} (2x^3) - \dfrac{\partial}{\partial x} (x^2y) + \dfrac{\partial}{\partial x}(2y^2) - \dfrac{\partial}{\partial x}(3x)\ &= \ans{6x^2-2xy-3} \end{aligned}

Similarly, for fyf_y, hold xx constant: fy=fy=y(2x3)y(x2y)+y(2y2)y(3x)=x2+4y\begin{aligned} \dfrac{\partial f}{\partial y} = f_y &= \dfrac{\partial}{\partial y} (2x^3) - \dfrac{\partial}{\partial y} (x^2y) + \dfrac{\partial}{\partial y}(2y^2) - \dfrac{\partial}{\partial y}(3x)\ &= \ans{-x^2+4y} \end{aligned}

Let f(x,y)=x3y4x+cosyf(x,y)=x^3y-4x+\cos y.

  1. Compute fxf_x and fyf_y.
  2. Evaluate both at (1,0)(−1,0).

Solution

  1. The partial derivatives: fx=3x2y4fy=x3siny\ans{\begin{aligned} f_x &= 3x^2y-4\ f_y &= x^3-\sin y \end{aligned}}

  2. Evaluate at (1,0)(-1,0): fx(1,0)=4fy(1,0)=1\ans{\begin{aligned} f_x(-1,0) &= -4\ f_y(-1,0) &= -1 \end{aligned}}

This means that if we travel along this surface in the xx direction from this point, the slope is 4−4, and if we travel in the yy direction from this point, the slope is 1−1.

Let f(x,y)=sin(xy)f(x,y)=\sin (xy). Compute fxf_x and fyf_y.

Solution

For both of these partial derivatives, we'll need to use the Chain Rule. For instance, when differentiating with respect to xx, the derivative of the inner function is yy, and vice versa. fx=cos(xy)yfy=cos(xy)x\ans{\begin{aligned} f_x &= \cos (xy) \cdot y\ f_y &= \cos (xy) \cdot x \end{aligned}}

Let f(x,y)=x2exyf(x,y)=x^2 e^{xy}. Compute fxf_x and fyf_y.

Solution

In this example, we'll need to use the Product Rule when differentiating with respect to xx. fx=2xexy+x2yexyfy=x3exy\ans{\begin{aligned} f_x &= 2x e^{xy} + x^2y e^{xy}\ f_y &= x^3 e^{xy} \end{aligned}}

  1. Find fxf_x and fyf_y if f(x,y)=3x2+4y3f(x,y)=3x^2+4y^3.

  2. fx=6xfy=12y2\begin{aligned}f_x &= 6x\ f_y &= 12y^2\end{aligned}

  3. Find fxf_x and fyf_y if f(x,y)=y8+2x6+2xyf(x,y)=y^8+2x^6+2xy.

  4. fx=12x5+2yfy=8y7+2x\begin{aligned}f_x &= 12x^5+2y\ f_y &= 8y^7+2x\end{aligned}

  5. Find fxf_x and fyf_y if f(x,y)=ln(xy)f(x,y)=\ln\left(\dfrac{x}{y}\right).

  6. fx=1xfy=1y\begin{aligned}f_x &= \dfrac{1}{x}\ f_y &= -\dfrac{1}{y}\end{aligned}

  7. Find fxf_x and fyf_y if f(x,y)=cos(2xy)f(x,y)=\cos(2xy).

  8. fx=2ysin(2xy)fy=2xsin(2xy)\begin{aligned}f_x &= -2y\sin(2xy)\ f_y &= -2x\sin(2xy)\end{aligned}

  9. Find fxf_x and fyf_y if f(x,y)=ex2yf(x,y)=e^{x^2 y}.

  10. fx=2xyex2yfy=x2ex2y\begin{aligned}f_x &= 2xy e^{x^2y}\ f_y &= x^2 e^{x^2 y}\end{aligned}

  11. Find fxf_x and fyf_y if f(x,y)=xx2+y2f(x,y)=\dfrac{x}{x^2+y^2}.

  12. fx=x2+y2(x2+y2)2fy=2xy(x2+y2)2\begin{aligned}f_x &= \dfrac{-x^2+y^2}{(x^2+y^2)^2}\ f_y &= \dfrac{-2xy}{(x^2+y^2)^2}\end{aligned}

  13. Find fxf_x and fyf_y if f(x,y)=xyf(x,y)=\sqrt{xy}.

  14. fx=y2xyfy=x2xy\begin{aligned}f_x &= \dfrac{y}{2\sqrt{xy}}\ f_y &= \dfrac{x}{2\sqrt{xy}}\end{aligned}

Find all three partial derivatives of f(x,y,z)=3x2y+2xz+4yz2f(x,y,z) = 3x^2y + 2xz + 4yz^2.

Solution

fx=6xy+2zfy=3x2+4z2fz=2x+8yz\ans{\begin{aligned} f_x &= 6xy+2z\ f_y &= 3x^2+4z^2\ f_z &= 2x+8yz \end{aligned}}

Find all four partial derivatives of f(w,x,y,z)=cos(w+x) sin(yz)f(w,x,y,z) = \cos (w+x)\ \sin (y-z).

Solution

fw=sin(w+x) sin(yz)fx=sin(w+x) sin(yz)fy=cos(w+x) cos(yz)fz=cos(w+x) cos(yz)\ans{\begin{aligned} f_w &= -\sin (w+x)\ \sin (y-z)\ f_x &= -\sin (w+x)\ \sin (y-z)\ f_y &= \cos (w+x)\ \cos (y-z)\ f_z &= -\cos (w+x)\ \cos (y-z) \end{aligned}}

Implicit Differentiation

Finding partial derivatives using implicit differentiation works much as you'd expect.

Implicit Differentiation

Find zx\dfrac{\partial z}{\partial x} if x3+y3+z3+6xyz=1x^3+y^3+z^3+6xyz=1.

Solution

Hold yy constant and differentiate each term with respect to xx; for the terms with zz in them, tack on a zx\dfrac{\partial z}{\partial x}, and solve for that at the end.

x3+y3+z3+6xyz=1x(x3)+x(y3)+x(z3)+x(6xyz)=x(1)3x2+0+3z2zx+[(6xy)(zx)+z(6y)]=0zx=3x26yz6xy+3z2\begin{aligned} x^3+y^3+z^3+6xyz &= 1\ \dfrac{\partial }{\partial x} (x^3) + \dfrac{\partial }{\partial x} (y^3) + \dfrac{\partial }{\partial x} (z^3) + \dfrac{\partial }{\partial x} (6xyz) &= \dfrac{\partial }{\partial x} (1)\ 3x^2 + 0 + 3z^2 \cdot \dfrac{\partial z}{\partial x} + \left[(6xy)\left(\dfrac{\partial z}{\partial x}\right)+z(6y)\right] &= 0\ \ans{\dfrac{\partial z}{\partial x} = \dfrac{-3x^2-6yz}{6xy+3z^2}} \end{aligned}

  1. Find zx\dfrac{\partial z}{\partial x} and zy\dfrac{\partial z}{\partial y} if x2y+cos(xy)z3=4x^2y+\cos(xy)-z^3=4.

  2. zx=2xyysin(xy)3z2zy=x2xsin(xy)3z2\begin{aligned}\dfrac{\partial z}{\partial x} &= \dfrac{2xy-y\sin(xy)}{3z^2}\ \dfrac{\partial z}{\partial y} &= \dfrac{x^2-x\sin(xy)}{3z^2}\end{aligned}

Higher-Order Derivatives

Again, higher-order partial derivatives are not that complicated; simply differentiate the derivative with respect to the appropriate variable.

fxx=x(fx)=2fx2fyy=2fy2, etc.fxy=y(fx)=2fx yfyx=2fy x\begin{aligned} f_{xx} &= \dfrac{\partial }{\partial x} \left(\dfrac{\partial f}{\partial x}\right) = \dfrac{\partial^2 f}{\partial x^2}\ f_{yy} &= \dfrac{\partial^2 f}{\partial y^2} \textrm{, etc.}\ \ f_{xy} &= \dfrac{\partial }{\partial y} \left(\dfrac{\partial f}{\partial x}\right) = \dfrac{\partial^2 f}{\partial x\ \partial y}\ f_{yx} &= \dfrac{\partial^2 f}{\partial y\ \partial x} \end{aligned}

The order in the subscript tells us in what order to differentiate.

Find the first, second, and third order derivatives of f(x,y)=3x4y2xy+5xy3f(x,y) = 3x^4y-2xy+5xy^3.

Solution

First Order

fx=12x3y2y+5y3fy=3x42x+15xy2\begin{aligned} f_x &= 12x^3y - 2y +5y^3\ f_y &= 3x^4-2x+15xy^2 \end{aligned}

Second Order

fxx=36x2yfyy=30xyfxy=12x32+15y2fyx=12x32+15y2\begin{aligned} f_{xx} &= 36x^2y\ f_{yy} &= 30xy\ f_{xy} &= 12x^3-2+15y^2\ f_{yx} &= 12x^3-2+15y^2 \end{aligned}

Third Order

fxxx=72xyfxxy=36x2fxyx=36x2fyyx=30yfxyy=30yfyxx=36x2fyyy=30xfyxy=30y\begin{aligned} f_{xxx} &= 72xy\ f_{xxy} &= 36x^2\ f_{xyx} &= 36x^2\ f_{yyx} &= 30y\ f_{xyy} &= 30y\ f_{yxx} &= 36x^2\ f_{yyy} &= 30x\ f_{yxy} &= 30y \end{aligned}

  1. Find the four second derivatives of f(x,y)=x3+xy2+1f(x,y) = x^3+xy^2+1.

  2. fxx=6xfxy=2yfyy=2xfyx=2y\begin{aligned}f_{xx} &= 6x\ f_{xy} &= 2y\ f_{yy} &= 2x\ f_{yx} &= 2y\end{aligned}

  3. Find the four second derivatives of f(x,y)=x2y3f(x,y) = x^2y^3.

  4. fxx=2y3fxy=6xy2fyy=6x2yfyx=6xy2\begin{aligned}f_{xx} &= 2y^3\ f_{xy} &= 6xy^2\ f_{yy} &= 6x^2y\ f_{yx} &= 6xy^2\end{aligned}

  5. Find the four second derivatives of f(x,y)=(x+3y)2f(x,y) = (x+3y)^2.

  6. fxx=2fxy=6fyy=18fyx=6\begin{aligned}f_{xx} &= 2\ f_{xy} &= 6\ f_{yy} &= 18\ f_{yx} &= 6\end{aligned}

  7. Find the four second derivatives of f(x,y)=cos(xy)f(x,y) = \cos (xy).

  8. fxx=y2cos(xy)fxy=sin(xy)xycos(xy)fyy=x2cos(xy)fyx=sin(xy)xycos(xy)\begin{aligned}f_{xx} &= -y^2 \cos(xy)\ f_{xy} &= -\sin(xy)-xy\cos(xy)\ f_{yy} &= -x^2\cos(xy)\ f_{yx} &= -\sin(xy)-xy\cos(xy)\end{aligned}

  9. Find the four second derivatives of f(x,y)=xeyf(x,y) = xe^y.

  10. fxx=y2cos(xy)fxy=sin(xy)xycos(xy)fyy=x2cos(xy)fyx=sin(xy)xycos(xy)\begin{aligned}f_{xx} &= -y^2 \cos(xy)\ f_{xy} &= -\sin(xy)-xy\cos(xy)\ f_{yy} &= -x^2\cos(xy)\ f_{yx} &= -\sin(xy)-xy\cos(xy)\end{aligned}