Warm-up: Evaluate the following derivatives
Before diving into partial derivatives, let's review single-variable differentiation:
Warm-up Problems
\(\frac{d}{dx}(\sin(x^3)) = \cos(x^3) \cdot 3x^2\)
\(\frac{d}{dx}(\sin(8)x^3) = \sin(8) \cdot 3x^2\)
\(\frac{d}{dy}(8\sin y) = 8\cos y\)
\(\frac{d}{dy}(27\sin y) = 27\cos y\)
Today's Focus: Finding derivatives when we have two or more variables.
Recall: Derivative and its Meaning
For a function \(y = f(x)\), the derivative \(f'(a)\) represents:
Definition: The derivative \(f'(a)\) is the slope of the tangent line at \((a, f(a))\).
It also represents the rate of change of \(y\) with respect to \(x\).
Formally: \[f'(a) = \lim_{h \to 0} \frac{f(a+h) - f(a)}{h}\]
Graph Description: The page shows a coordinate system with a blue curve \(y = f(x)\). At point \(a\) on the x-axis, there is a vertical dashed line intersecting the curve. A red tangent line touches the curve at \((a, f(a))\), illustrating the geometric meaning of the derivative as the slope of this tangent line.
Key annotations indicate: \(f'(x) > 0\) where \(f\) is increasing (tangent has positive slope), and \(f'(x) < 0\) where \(f\) is decreasing (tangent has negative slope).
Partial Derivatives of \(z = f(x,y)\)
When we have a function of two variables \(z = f(x,y)\), we can take derivatives with respect to one variable while keeping the other constant.
Definition: Partial Derivative with respect to \(x\)
\[\frac{\partial f}{\partial x} = f_x = \text{partial with respect to } x \text{ keeping } y \text{ constant}\]
Formally: \[f_x(a,b) = \lim_{h \to 0} \frac{f(a+h, b) - f(a,b)}{h}\]
Definition: Partial Derivative with respect to \(y\)
\[\frac{\partial f}{\partial y} = f_y = \text{partial with respect to } y \text{ keeping } x \text{ constant}\]
Formally: \[f_y(a,b) = \lim_{h \to 0} \frac{f(a, b+h) - f(a,b)}{h}\]
3D Visualization: The page includes a three-dimensional coordinate system showing the surface \(z = f(x,y)\). The diagram illustrates two key concepts:
The top portion shows a surface in 3D space with a point \((a,b,z)\) marked on it. Curves on the surface indicate the direction of partial derivatives.
The bottom portion shows a contour plot (level curves) in the \(xy\)-plane, with the point \((a,b)\) marked. This represents looking down at the surface from above.
Finding Partial Derivatives
Example: \(f(x,y) = x^3\sin y\)
Finding \(f_x\):
To find the partial derivative with respect to \(x\), treat \(y\) as a constant:
\[f_x = \frac{\partial}{\partial x}(x^3\sin y) = 3x^2\sin y\]
Finding \(f_y\):
To find the partial derivative with respect to \(y\), treat \(x\) as a constant:
\[f_y = \frac{\partial}{\partial y}(x^3\sin y) = x^3\cos y\]
Key Principle: When taking a partial derivative with respect to one variable, treat all other variables as constants and apply standard differentiation rules.
More Complex Examples
Example: \(f(x,y) = y^2x^3 + \sin(xy)\)
This example requires using the chain rule, since we have \(\sin(xy)\) where the argument is a function of both variables.
Finding \(f_x\):
We need to differentiate with respect to \(x\), treating \(y\) as a constant.
Recall that \(\frac{d}{dx}(f(g(x))) = f'(g(x)) \cdot g'(x)\).
\[\begin{align*}
f_x &= \frac{\partial}{\partial x}(y^2x^3 + \sin(xy)) \\
&= \frac{\partial}{\partial x}(y^2x^3) + \frac{\partial}{\partial x}(\sin(xy)) \\
&= 3x^2y^2 + \cos(xy) \cdot \frac{\partial}{\partial x}(xy) \\
&= 3x^2y^2 + \cos(xy) \cdot y \\
&= 3x^2y^2 + y\cos(xy)
\end{align*}\]
Finding \(f_y\):
We differentiate with respect to \(y\), treating \(x\) as a constant.
\[\begin{align*}
f_y &= \frac{\partial}{\partial y}(y^2x^3 + \sin(xy)) \\
&= 2yx^3 + \cos(xy) \cdot \frac{\partial}{\partial y}(xy) \\
&= 2yx^3 + \cos(xy) \cdot x \\
&= 2yx^3 + x\cos(xy)
\end{align*}\]
Higher Order Partial Derivatives
Just as we can take second derivatives in single-variable calculus, we can take second and higher order partial derivatives in multivariable calculus. For functions of two or more variables, we can take partials multiple times.
Example: \(f(x,y) = y^2x^3 + \sin(xy)\)
We previously found:
\(f_x = 3y^2x^2 + y\cos(xy)\)
\(f_y = 2yx^3 + x\cos(xy)\)
Definition: Second Order Partial Derivatives
For functions of two or more variables, we can take partials of the first partial derivatives:
\[\frac{\partial}{\partial x}(f_x) = f_{xx} \quad \text{and} \quad \frac{\partial}{\partial y}(f_x) = f_{xy}\]
\[\frac{\partial}{\partial x}(f_y) = f_{yx} \quad \text{and} \quad \frac{\partial}{\partial y}(f_y) = f_{yy}\]
Similarly, we can have \(f_{xxx}\), \(f_{xxy}\), \(f_{xyy}\), \(f_{yyy}\), etc.
Important Note: The notation \(f_{xy}\) means "first differentiate with respect to \(x\), then differentiate the result with respect to \(y\)." We work from left to right in the subscript notation, but from right to left in the \(\frac{\partial}{\partial y}\frac{\partial}{\partial x}\) notation.
Computing Second Order Partial Derivatives
Example continued: \(f(x,y) = y^2x^3 + \sin(xy)\)
With \(f_x = 3y^2x^2 + y\cos(xy)\), let's find the second order partial derivatives.
Finding \(f_{xx}\):
Take the partial derivative of \(f_x\) with respect to \(x\):
\[\begin{align*}
f_{xx} &= \frac{\partial}{\partial x}(3y^2x^2 + y\cos(xy)) \\
&= 6y^2x + y \cdot (-\sin(xy)) \cdot \frac{\partial}{\partial x}(xy) \\
&= 6y^2x - y^2\sin(xy)
\end{align*}\]
Finding \(f_{xy}\):
Take the partial derivative of \(f_x\) with respect to \(y\):
\[\begin{align*}
f_{xy} &= \frac{\partial}{\partial y}(3y^2x^2 + y\cos(xy)) \\
&= 6yx^2 + (1)\cos(xy) + y \cdot \frac{\partial}{\partial y}(\cos(xy)) \\
&= 6yx^2 + \cos(xy) - xy\sin(xy)
\end{align*}\]
Completing the Second Order Partial Derivatives
Example continued: \(f(x,y) = y^2x^3 + \sin(xy)\)
With \(f_y = 2yx^3 + x\cos(xy)\), let's find the remaining second order partial derivatives.
Finding \(f_{yx}\):
Take the partial derivative of \(f_y\) with respect to \(x\):
\[\begin{align*}
f_{yx} &= \frac{\partial}{\partial x}(2yx^3 + x\cos(xy)) \\
&= 6yx^2 + \cos(xy) - xy\sin(xy)
\end{align*}\]
Finding \(f_{yy}\):
Take the partial derivative of \(f_y\) with respect to \(y\):
\[\begin{align*}
f_{yy} &= \frac{\partial}{\partial y}(2yx^3 + x\cos(xy)) \\
&= 2x^3 - x^2\sin(xy)
\end{align*}\]
Observation:
Notice that \[f_{xy} = 6yx^2 + \cos(xy) - xy\sin(xy) = f_{yx}\]
The mixed partial derivatives are equal! This is not a coincidence.
Clairaut's Theorem
Clairaut's Theorem:
\[f_{xy} = f_{yx}\]
provided they are continuous.
Meaning: The order in which we differentiate does not matter, as long as the partial derivatives are continuous.
Generalization:
For functions of multiple variables, the order does not matter for any sequence of partial derivatives, provided they are continuous. For example:
\[f_{xyx} = (f_{xy})_x = (f_{yx})_x = f_{yxx} = (f_y)_{xx} = (f_{yx})_x = f_{yxx}\]
Similarly:
\[f_{xyy} = (f_{xy})_y = f_{yxy} = f_{yyx}\]
And:
\[f_{xyx} = f_{yxx} = f_{xxy}\]
\[f_{xyy} = f_{yxy} = f_{yyx}\]
Key Takeaway: When computing mixed partial derivatives, you can choose the order of differentiation that is most convenient, and the result will be the same (assuming continuity). The order does not matter as long as the partial derivatives are continuous.
Example with Three Variables
Example: \(f(x,y,z) = xy^2z^3\), find \(f_{xyz}\), \(f_{yzx}\), \(f_{zyx}\)
This example demonstrates Clairaut's theorem with three variables, showing that the order of differentiation does not matter.
First Partial Derivatives:
\[f_x = \frac{\partial}{\partial x}(xy^2z^3) = y^2z^3\]
\[f_y = \frac{\partial}{\partial y}(xy^2z^3) = 2xyz^3\]
\[f_z = \frac{\partial}{\partial z}(xy^2z^3) = 3xy^2z^2\]
Second Partial Derivatives:
From \(f_x = y^2z^3\):
\[f_{xx} = 0\]
\[f_{xy} = 2yz^3\] (highlighted in yellow)
\[f_{xz} = 3y^2z^2\] (highlighted in pink)
From \(f_y = 2xyz^3\):
\[f_{yx} = 2yz^3\] (highlighted in yellow)
\[f_{yy} = 2xz^3\]
\[f_{yz} = 6xyz^2\] (highlighted in cyan)
From \(f_z = 3xy^2z^2\):
\[f_{zx} = 3y^2z^2\] (highlighted in pink)
\[f_{zy} = 6xyz^2\] (highlighted in cyan)
\[f_{zz} = 6xy^2z\]
Third Partial Derivatives:
Computing \(f_{xyz}\) (starting from \(f_{xy} = 2yz^3\)):
\[f_{xyz} = \frac{\partial}{\partial z}(2yz^3) = 6yz^2\]
Computing \(f_{yzx}\) (starting from \(f_{yz} = 6xyz^2\)):
\[f_{yzx} = \frac{\partial}{\partial x}(6xyz^2) = 6yz^2\]
Computing \(f_{zyx}\) (starting from \(f_{zy} = 6xyz^2\)):
\[f_{zyx} = \frac{\partial}{\partial x}(6xyz^2) = 6yz^2\]
Verification: As predicted by Clairaut's theorem, we have:
\[f_{xyz} = f_{yzx} = f_{zyx} = 6yz^2\]
All three mixed partial derivatives are equal, regardless of the order in which we differentiate.