8.1: Functions of Two Independent Variables
- Page ID
- 106848
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)A (real) function of one variable, \(y = f(x)\), defines a curve in the plane. The first derivative of a function of one variable can be interpreted graphically as the slope of a tangent line, and dynamically as the rate of change of the function with respect to the variable Figure \(\PageIndex{1}\).
![1v.jpg](https://chem.libretexts.org/@api/deki/files/141538/1v.jpg?revision=1&size=bestfit&width=402&height=358)
A function of two independent variables, \(z=f (x,y)\), defines a surface in three-dimensional space. For a function of two or more variables, there are as many independent first derivatives as there are independent variables. For example, we can differentiate the function \(z=f (x,y)\) with respect to \(x\) keeping \(y\) constant. This derivative represents the slope of the tangent line shown in Figure \(\PageIndex{2} \text{A}\). We can also take the derivative with respect to \(y\) keeping \(x\) constant, as shown in Figure \(\PageIndex{2} \text{B}\).
![2v.jpg](https://chem.libretexts.org/@api/deki/files/141539/2v.jpg?revision=1&size=bestfit&width=854&height=402)
For example, let’s consider the function \(z=3x^2-y^2+2xy\). We can take the derivative of this function with respect to \(x\) treating \(y\) as a constant. The result is \(6x+2y\). This is the partial derivative of the function with respect to \(x\), and it is written:
\[\left (\frac{\partial z}{\partial x} \right )_y=6x+2y \nonumber \]
where the small subscripts indicate which variables are held constant. Analogously, the partial derivate of \(z\) with respect to \(y\) is:
\[\left (\frac{\partial z}{\partial y} \right )_x=2x-2y \nonumber \]
We can extend these ideas to functions of more than two variables. For example, consider the function \(f(x,y,z)=x^2y/z\). We can differentiate the function with respect to \(x\) keeping \(y\) and \(z\) constant to obtain:
\[\left (\frac{\partial f}{\partial x} \right )_{y,z}=2x\frac{y}{z} \nonumber \]
We can also differentiate the function with respect to \(z\) keeping \(x\) and \(y\) constant:
\[\left (\frac{\partial f}{\partial z} \right )_{x,y}=-x^2y/z^2 \nonumber \]
and differentiate the function with respect to \(y\) keeping \(x\) and \(z\) constant:
\[\left (\frac{\partial f}{\partial y} \right )_{x,z}=\frac{x^2}{z} \nonumber \]
Functions of two or more variables can be differentiated partially more than once with respect to either variable while holding the other constant to yield second and higher derivatives. For example, the function \(z=3x^2-y^2+2xy\) can be differentiated with respect to \(x\) two times to obtain:
\[\left ( \frac{\partial }{\partial x}\left ( \frac{\partial z}{\partial x} \right )_{y} \right )_{y}=\left ( \frac{\partial ^2z}{\partial x^2} \right )_{y}=6 \nonumber \]
We can also differentiate with respect to \(x\) first and \(y\) second:
\[\left ( \frac{\partial }{\partial y}\left ( \frac{\partial f}{\partial x} \right )_{y} \right )_{x}=\left ( \frac{\partial ^2f}{\partial y \partial x} \right )=2 \nonumber \]
Check the videos below if you are learning this for the first time, or if you feel you need to refresh the concept of partial derivatives.
- Partial derivatives: http://patrickjmt.com/derivatives-finding-partial-derivatives (don’t get confused by the different notation!)
- Partial derivatives: http://www.youtube.com/watch?v=vxJR5graUfI
- Higher order partial derivatives: http://www.youtube.com/watch?v=3itjTS2Y9oE
If a function of two or more variables and its derivatives are single-valued and continuous, a property normally attributed to physical variables, then the mixed partial second derivatives are equal (Euler reciprocity):
\[\label{c2v:euler reciprocity} \left ( \frac{\partial ^2f}{\partial x \partial y} \right )=\left ( \frac{\partial ^2f}{\partial y \partial x} \right ) \]
For example, for \(z=3x^2-y^2+2xy\):
\[\left ( \frac{\partial ^2f}{\partial y \partial x} \right )=\left ( \frac{\partial }{\partial y}\left ( \frac{\partial f}{\partial x} \right )_{y} \right )_{x}=\left ( \frac{\partial }{\partial y}\left ( 6x+2y\right ) \right )_{x}=2 \nonumber \]
\[\left ( \frac{\partial ^2f}{\partial x \partial y} \right )=\left ( \frac{\partial }{\partial x}\left ( \frac{\partial f}{\partial y} \right )_{x} \right )_{y}=\left ( \frac{\partial }{\partial x}\left ( -2y+2x\right ) \right )_{y}=2 \nonumber \]
Another useful property of the partial derivatives is the so-called reciprocal identity, which holds when the same variables are held constant in the two derivatives:
\[\label{c2v:inverse} \left ( \frac{\partial y}{\partial x} \right )=\frac{1}{\left ( \frac{\partial x}{\partial y} \right )} \]
For example, for \(z=x^2y\):
\[\left ( \frac{\partial z}{\partial x} \right )_y=\left ( \frac{\partial }{\partial x} x^2y\right )_y=2xy \nonumber \]
\[\left ( \frac{\partial x}{\partial z} \right )_y=\left ( \frac{\partial }{\partial z} \sqrt{z/y} \right )_y=\frac{1}{2y} (z/y)^{-1/2}=\frac{1}{2xy}=\frac{1}{\left ( \frac{\partial z}{\partial x} \right )}_y \nonumber \]
Finally, let’s mention the cycle rule. For a function \(z(x,y)\):
\[\label{c2v:cycle} \left ( \frac{\partial y}{\partial x} \right )_z\left ( \frac{\partial x}{\partial z} \right )_y\left ( \frac{\partial z}{\partial y} \right )_x=-1 \]
We can construct other versions as follows:
![Screen Shot 2019-10-25 at 1.04.00 PM.png](https://chem.libretexts.org/@api/deki/files/245110/Screen_Shot_2019-10-25_at_1.04.00_PM.png?revision=1)
For example, for \(z=x^2y\):
\[\left ( \frac{\partial y}{\partial x} \right )_z=\left ( \frac{\partial }{\partial x} (z/x^2)\right )_z=-2z/x^3 \nonumber \]
\[\left ( \frac{\partial x}{\partial z} \right )_y=\left ( \frac{\partial }{\partial z} \sqrt{z/y}\right )_y=\frac{1}{2y} (z/y)^{-1/2} \nonumber \]
\[\left ( \frac{\partial z}{\partial y} \right )_x=\left ( \frac{\partial }{\partial y} x^2y\right )_x=x^2 \nonumber \]
\[\left ( \frac{\partial y}{\partial x} \right )_z\left ( \frac{\partial x}{\partial z} \right )_y\left ( \frac{\partial z}{\partial y} \right )_x=-\frac{2z}{x^3}\frac{1}{2y} \left(\frac{y}{z}\right)^{1/2}x^2=-\left(\frac{z}{y}\right)^{1/2}\frac{1}{x}=-\left(\frac{x^2y}{y}\right)^{1/2}\frac{1}{x}=-1 \nonumber \]
Before discussing partial derivatives any further, let’s introduce a few physicochemical concepts to put our discussion in context.