Skip to main content
Mathematics LibreTexts

11.2: Partial Derivatives

  • Page ID
    104878
  • \( \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}\)

    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 \(y\) as a function of \(x.\) Leibniz notation for the derivative is \(dy/dx,\) which implies that \(y\) is the dependent variable and \(x\) is the independent variable. For a function \(z=f(x,y)\) of two variables, \(x\) and \(y\) are the independent variables and \(z\) is the dependent variable. This raises two questions right away: How do we adapt Leibniz notation for functions of two variables? Also, what is an interpretation of the derivative? The answer lies in partial derivatives.

    Definition: Partial Derivatives

    Let \(f(x,y)\) be a function of two variables. Then the partial derivative of \(f\) with respect to \(x\), written as \(∂f/∂x\) or \(f_x,\) is defined as

    \[\dfrac{∂f}{∂x}=f_x(x,y)=\lim_{h→0}\dfrac{f(x+h,y)−f(x,y)}{h} \label{pd1}\]

    The partial derivative of \(f\) with respect to \(y\), written as \(∂f/∂y\), or \(f_y,\) is defined as

    \[\dfrac{∂f}{∂y}=f_y(x,y)=\lim_{k→0}\dfrac{f(x,y+k)−f(x,y)}{k}. \label{pd2}\]

    This definition shows two differences already. First, the notation changes, in the sense that we still use a version of Leibniz notation, but the \(d\) in the original notation is replaced with the symbol \(∂\). (This rounded \(“d”\) is usually called “partial,” so \(∂f/∂x\) is spoken as the “partial of \(f\) with respect to \(x\).”) 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 \(\PageIndex{1}\): Calculating Partial Derivatives from the Definition

    Use the definition of the partial derivative as a limit to calculate \(∂f/∂x\) and \(∂f/∂y\) for the function

    \[f(x,y)=x^2−3xy+2y^2−4x+5y−12. \nonumber\]

    Solution

    First, calculate \(f(x+h,y).\)

    \[\begin{align*} f(x+h,y) &=(x+h)^2−3(x+h)y+2y^2−4(x+h)+5y−12 \\ &=x^2+2xh+h^2−3xy−3hy+2y^2−4x−4h+5y−12. \end{align*} \]

    Next, substitute this into Equation \ref{pd1} and simplify:

    \[\begin{align*} \dfrac{∂f}{∂x} &=\lim_{h→0}\dfrac{f(x+h,y)−f(x,y)}{h} \\
    &=\lim_{h→0}\dfrac{(x^2+2xh+h^2−3xy−3hy+2y^2−4x−4h+5y−12)−(x^2−3xy+2y^2−4x+5y−12)}{h} \\ &=\lim_{h→0}\dfrac{x^2+2xh+h^2−3xy−3hy+2y^2−4x−4h+5y−12−x^2+3xy−2y^2+4x−5y+12}{h} \\
    &=\lim_{h→0}\dfrac{2xh+h^2−3hy−4h}{h}\\
    &=\lim_{h→0}\dfrac{h(2x+h−3y−4)}{h} \\
    &=\lim_{h→0}(2x+h−3y−4) \\
    &=2x−3y−4. \end{align*}\]

    To calculate \(\dfrac{∂f}{∂y}\), first calculate \(f(x,y+h):\)

    \[\begin{align*} f(x+h,y) &=x^2−3x(y+h)+2(y+h)^2−4x+5(y+h)−12 \\ &=x^2−3xy−3xh+2y^2+4yh+2h^2−4x+5y+5h−12. \end{align*}\]

    Next, substitute this into Equation \ref{pd2} and simplify:

    \[ \begin{align*} \dfrac{∂f}{∂y} &=\lim_{h→0}\dfrac{f(x,y+h)−f(x,y)}{h} \\
    &=\lim_{h→0}\dfrac{(x^2−3xy−3xh+2y^2+4yh+2h^2−4x+5y+5h−12)−(x^2−3xy+2y^2−4x+5y−12)}{h} \\ &=\lim_{h→0}\dfrac{x^2−3xy−3xh+2y^2+4yh+2h^2−4x+5y+5h−12−x^2+3xy−2y^2+4x−5y+12}{h} \\
    &=\lim_{h→0}\dfrac{−3xh+4yh+2h^2+5h}{h} \\
    &=\lim_{h→0}\dfrac{h(−3x+4y+2h+5)}{h} \\
    &=\lim_{h→0}(−3x+4y+2h+5) \\
    &=−3x+4y+5 \end{align*}\]

    Exercise \(\PageIndex{1}\)

    Use the definition of the partial derivative as a limit to calculate \(∂f/∂x\) and \(∂f/∂y\) for the function

    \[f(x,y)=4x^2+2xy−y^2+3x−2y+5.\nonumber\]

    Hint

    Use Equations \ref{pd1} and \ref{pd2} from the definition of partial derivatives.

    Answer

    \(\dfrac{∂f}{∂x}=8x+2y+3\)

    \(\dfrac{∂f}{∂y}=2x−2y−2\)

    Note: All differentiation rules you learned in Math 400 (product rule, quotient rule, chain rule, etc.) still apply.

    Example \(\PageIndex{2}\): Calculating Partial Derivatives

    Calculate \(∂f/∂x\) and \(∂f/∂y\) for the following functions by holding the opposite variable constant then differentiating:

    1. \(f(x,y)=x^2−3xy+2y^2−4x+5y−12\)
    2. \(g(x,y)=\sin(x^2y−2x+4)\)

    Solution:

    a. To calculate \(∂f/∂x\), treat the variable \(y\) as a constant. Then differentiate \(f(x,y)\) with respect to \(x\) using the sum, difference, and power rules:

    \[\begin{align*}\dfrac{∂f}{∂x} &=\dfrac{∂}{∂x}\left[x^2−3xy+2y^2−4x+5y−12\right] \\[6pt] &=\dfrac{∂}{∂x}[x^2]−\dfrac{∂}{∂x}[3xy]+\dfrac{∂}{∂x}[2y^2]−\dfrac{∂}{∂x}[4x]+\dfrac{∂}{∂x}[5y]−\dfrac{∂}{∂x}[12] \\[6pt] &=2x−3y+0−4+0−0 \\ &=2x−3y−4. \end{align*}\]

    The derivatives of the third, fifth, and sixth terms are all zero because they do not contain the variable \(x\), so they are treated as constant terms. The derivative of the second term is equal to the coefficient of \(x\), which is \(−3y\). Calculating \(∂f/∂y\):

    \[\begin{align*} \dfrac{∂f}{∂y} &=\dfrac{∂}{∂y}\left[x^2−3xy+2y^2−4x+5y−12\right] \\[6pt] &=\dfrac{∂}{∂y}[x^2]−\dfrac{∂}{∂y}[3xy]+\dfrac{∂}{∂y}[2y^2]−\dfrac{∂}{∂y}[4x]+\dfrac{∂}{∂y}[5y]−\dfrac{∂}{∂y}[12] \\[6pt] &=−3x+4y−0+5−0 \\ &=−3x+4y+5. \end{align*} \]

    These are the same answers obtained in Example \(\PageIndex{1}\).

    b. To calculate \(∂g/∂x,\) treat the variable y as a constant. Then differentiate \(g(x,y)\) with respect to \(x\) using the chain rule and power rule:

    \[\begin{align*}\dfrac{∂g}{∂x} &=\dfrac{∂}{∂x}\left[\sin(x^2y−2x+4)\right] \\[6pt] &=\cos(x^2y−2x+4)\dfrac{∂}{∂x}[x^2y−2x+4] \\[6pt] &=(2xy−2)\cos(x^2y−2x+4). \end{align*}\]

    To calculate \(∂g/∂y,\) treat the variable \(x\) as a constant. Then differentiate \(g(x,y)\) with respect to \(y\) using the chain rule and power rule:

    \[ \begin{align*} \dfrac{∂g}{∂y} &=\dfrac{∂}{∂y}\left[\sin(x^2y−2x+4)\right] \\[6pt] &=\cos(x^2y−2x+4)\dfrac{∂}{∂y}[x^2y−2x+4] \\[6pt] &=x^2\cos(x^2y−2x+4). \end{align*} \]

    Exercise \(\PageIndex{2}\)

    Calculate \(∂f/∂x\) and \(∂f/∂y\) for the function

    \[f(x,y)=\tan(x^3−3x^2y^2+2y^4) \nonumber\]

    by holding the opposite variable constant, then differentiating.

    Hint

    Use Equations \ref{pd1} and \ref{pd1} from the definition of partial derivatives.

    Answer

    \(\dfrac{∂f}{∂x}=(3x^2−6xy^2)\sec^2(x^3−3x^2y^2+2y^4)\)

    \(\dfrac{∂f}{∂y}=(−6x^2y+8y^3)\sec^2(x^3−3x^2y^2+2y^4)\)

    Note: The remainder of this section is not necessary for Math 420. I am leaving it for those who may wish to have a better understanding of the concepts discussed here.

    How can we interpret these partial derivatives? Recall that the graph of a function of two variables is a surface in \(R^3\). If we remove the limit from the definition of the partial derivative with respect to \(x\), the difference quotient remains:

    \[\dfrac{f(x+h,y)−f(x,y)}{h}.\]

    This resembles the difference quotient for the derivative of a function of one variable, except for the presence of the \(y\) variable. Figure \(\PageIndex{1}\) illustrates a surface described by an arbitrary function \(z=f(x,y).\)

    A complicated curve in xyz space with a secant line through the points (x, y, f(x, y)) and (x + h, y, f(x + h, y)).
    Figure \(\PageIndex{1}\): Secant line passing through the points \((x,y,f(x,y))\) and \((x+h,y,f(x+h,y)).\)

    In Figure \(\PageIndex{1}\), the value of \(h\) is positive. If we graph \(f(x,y)\) and \(f(x+h,y)\) for an arbitrary point \((x,y),\) then the slope of the secant line passing through these two points is given by

    \[\dfrac{f(x+h,y)−f(x,y)}{h}.\]

    This line is parallel to the \(x\)-axis. Therefore, the slope of the secant line represents an average rate of change of the function \(f\) as we travel parallel to the \(x\)-axis. As \(h\) approaches zero, the slope of the secant line approaches the slope of the tangent line.

    If we choose to change \(y\) instead of \(x\) by the same incremental value \(h\), then the secant line is parallel to the \(y\)-axis and so is the tangent line. Therefore, \(∂f/∂x\) represents the slope of the tangent line passing through the point \((x,y,f(x,y))\) parallel to the \(x\)-axis and \(∂f/∂y\) represents the slope of the tangent line passing through the point \((x,y,f(x,y))\) parallel to the \(y\)-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 called directional derivatives, which is another topic from Math 402 (multivariable calculus).


    This page titled 11.2: Partial Derivatives is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform.