Skip to main content

Partial differentiation

Partial derivatives help us analyse the influence of each individual variable on a system. This is crucial for understanding surfaces and optimisation problems in fields like engineering, physics and economics. Use this resource to learn how to find partial derivatives.

Partial derivatives reveal how a function with many variables changes when you adjust just one of the variables in the input. Consider the following equation:
\[z=x^{2}+4y^{2}\]

Here, we have two independent variables, so the function is \(f(x,y)\). The graph exists in a three-dimensional space.

When we differentiate such a function, we need to be able to differentiate \(z\) with respect to either \(x\) or \(z\). This involves treating the other variable as a constant. We calculate the partial derivatives:

  • \(\dfrac{\partial z}{\partial x}\), the partial derivative of \(z\) with respect to \(x\) where we treat \(y\) as a constant
  • \(\dfrac{\partial z}{\partial y}\), the partial derivative of \(z\) with respect to \(y\) where we treat \(x\) as a constant.

The symbol we use to denote a partial differential is the curve d, \(\partial\), often called "del".

An alternative notation for partial derivatives is \(f_{x}\) for \(\dfrac{\partial f}{\partial x}\)and \(f_{y}\) for \(\dfrac{\partial f}{\partial y}\).

Example 1 – evaluating partial derivatives

If \(z=x^{2}+4y^{2}\), find \(\dfrac{\partial z}{\partial x}\) and \(\dfrac{\partial z}{\partial y}\).

\(\dfrac{\partial z}{\partial x}\) is the partial derivative of \(z\) with respect to \(x\), treating \(y\) as a constant.
\[\begin{align*} \frac{\partial z}{\partial x} & = 2x+0\\
& = 2x
\end{align*}\]

\(\dfrac{\partial z}{\partial y}\) is the partial derivative of \(z\) with respect to \(y\), treating \(x\) as a constant.
\[\begin{align*} \frac{\partial z}{\partial y} & = 0+8y\\
& = 8y
\end{align*}\]

If \(f(x,y)=xy+2y^{2}\), find \(\dfrac{\partial f}{\partial x}\) and \(\dfrac{\partial f}{\partial y}\).

\(\dfrac{\partial f}{\partial x}\) is the partial derivative of \(f\) with respect to \(x\), treating \(y\) as a constant. The derivative of \(xy\) with \(y\) as a constant is \(y\).
\[\begin{align*} \frac{\partial f}{\partial x} & = y+0\\
& = y
\end{align*}\]

\(\dfrac{\partial f}{\partial y}\) is the partial derivative of \(f\) with respect to \(y\), treating \(x\) as a constant.
\[\frac{\partial f}{\partial y} = x+4y \]

If \(f(x,y)=x^{2}y+y^{2}\sin(x)\), find \(\dfrac{\partial f}{\partial x}\) and \(\dfrac{\partial f}{\partial y}\).

\(\dfrac{\partial f}{\partial x}\) is the partial derivative of \(f\) with respect to \(x\), treating \(y\) as a constant.
\[\frac{\partial f}{\partial x}=2xy+y^{2}\cos(x)\]

\(\dfrac{\partial f}{\partial y}\) is the partial derivative of \(f\) with respect to \(y\), treating \(x\) as a constant.
\[\frac{\partial f}{\partial y}=x^{2}+2y\sin(x)\]

If \(f(x,y)=xy^{2}\sin(xy)\), find \(\dfrac{\partial f}{\partial x}\) and \(\dfrac{\partial f}{\partial y}\).

\(\dfrac{\partial f}{\partial x}\) is the partial derivative of \(f\) with respect to \(x\), treating \(y\) as a constant. Here, we have to apply the product rule.
\[\begin{align*} \frac{\partial f}{\partial x} & =y^{2}\sin(xy)+xy^{2}\times y\cos(xy)\\
& = y^{2}\sin(xy)+xy^{3}\cos(xy)
\end{align*}\]

\(\dfrac{\partial f}{\partial y}\) is the partial derivative of \(f\) with respect to \(y\), treating \(x\) as a constant.
\[\begin{align*} \frac{\partial f}{\partial y} & = 2xy\sin(xy)+xy^{2}\times x\cos(xy)\\
& = 2xy\sin(xy)+x^{2}y^{2}\cos(xy)
\end{align*}\]

Evaluating partial derivatives at a point

We can find partial derivatives at particular points. For example, \(f_{x}(2,1)\) refers to the value of the partial derivative of \(f\) with respect to \(x\) at the point where \(x=2\) and \(y=1\).

Example – evaluating partial derivatives at a point

If \(f(x,y)=2x^{3}y+3y^{2}\), find \(f_{y}(1,3)\).

\(f_{y}\) indicates that we are looking for the derivative of \(f\) with respect to \(y\), treating \(x\) as a constant.
\[f_{y} = 2x^{3}+6y\]

We can then substitute \(x=1\) and \(y=3\) into \(f_{y}\) to find the partial derivative at that point.
\[\begin{align*} f_{y}(1,3) & = 2(1)^{3}+6(3)\\
& = 2+18\\
& = 20
\end{align*}\]

Higher order partial derivatives

A function \(z=f(x,y)\) has two partial derivatives: \(\dfrac{\partial f}{\partial x}\) and \(\dfrac{\partial f}{\partial y}\). This kind of function will have four second order partial derivatives.

  1. Differentiating with respect to \(x\), then with respect to \(x\) gives us:
    \[\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial x}\right)=\frac{\partial^{2}f}{\partial x^{2}}=f_{xx}\]
  2. Differentiating with respect to \(y\), then with respect to \(y\) gives us:
    \[\frac{\partial}{\partial y}\left(\frac{\partial f}{\partial y}\right)=\frac{\partial^{2}f}{\partial y^{2}}=f_{yy}\]
  3. Differentiating with respect to \(x\), then with respect to \(y\) gives us:
    \[\frac{\partial}{\partial y}\left(\frac{\partial f}{\partial x}\right)=\frac{\partial^{2}f}{\partial x\partial y}=f_{xy}\]
  4. Differentiating with respect to \(y\), then with respect to \(x\) gives us:
    \[\frac{\partial}{\partial x}\left(\frac{\partial f}{\partial y}\right)=\frac{\partial^{2}f}{\partial y\partial x}=f_{yx}\]

\(f_{xy}\) is always equal to \(f_{yx}\).

Example – evaluating higher order partial derivatives

Find all second order partial derivatives of \(f(x,y)=x^{2}y^{3}+2x\cos(y)\).

First, we need to find the first order partial derivative with respect to \(x\) and \(y\).
\[f_{x}=2xy^{3}+2\cos(y)\]\[f_{y}=3x^{2}y-2x\cos(y)\]

The second order partial derivatives of \(f(x,y)\) are \(f_{xx}\), \(f_{yy}\) and \(f_{xy}=f_{yx}\).
\[f_{xx}=2y^{3}\] \[f_{yy}=6x^{2}y-2x\sin(y)\] \[f_{xy}=f_{yx}=6xy^{2}-2\sin(y)\]

Exercise – finding partial derivatives

  1. Find the partial derivatives \(\dfrac{\partial z }{\partial x}\) and \(\dfrac{\partial z }{\partial y}\) for each of the following.
    1. \(z=3x^{4}+2y^{3}\)
    2. \(z=x^{2}y\)
    3. \(z=3xe^{2y}\)
    4. \(z=\ln(x^{3}y^{5}-2)\)
  2. Find the value of the indicated partial derivative at the given point.
    1. \(f_{x}(2,3)\) where \(f(x,y)=x^{4}-4y^{2}\)
    2. \(f_{y}(-1,1)\) where \(f(x,y)=\ln(x^{2}+y^{3})\)
  3. Find the first and second order partial derivatives of the following.
    1. \(f(x,y)=x\ln(y)\)
    2. \(f(x,y)=x^{3}+x^{2}y-3xy^{2}+y^{3}\)
    3. \(f(x,y)=\sin(xy)\)
    4. \(f(x,y)=x\cos(y)+ye^{x}\)

    1. \(\dfrac{\partial z}{\partial x}=12x^{3}\) and \(\dfrac{\partial z}{\partial y}=6y^{2}\)
    2. \(\dfrac{\partial z}{\partial x}=2xy\) and \(\dfrac{\partial z}{\partial y}=x^{2}\)
    3. \(\dfrac{\partial z}{\partial x}=3e^{2y}\) and \(\dfrac{\partial z}{\partial y}=6xe^{2y}\)
    4. \(\dfrac{\partial z}{\partial x}\)=\(\dfrac{3x^{2}y^{5}}{x^{3}y^{5}-2}\) and \(\dfrac{\partial z}{\partial y}=\dfrac{5x^{3}y^{4}}{x^{3}y^{5}-2}\)
    1. \(32\)
    2. \(1.5\)
    1. \(f_{x}=\ln y\)

      \(f_{y}=\frac{x}{y}\)

      \(f_{xx}=0\)

      \(f_{yy}=-\dfrac{x}{y^{2}}\)

      \(f_{yx}=f_{xy}=\dfrac{1}{y}\)

    2. \(f_{x}=3x^{2}+2xy-3y^{2}\)

      \(f_{y}=x^{2}-6xy+3y^{2}\)

      \(f_{xx}=6x+6y\)

      \(f_{yy}=-6x+6y\)

      \(f_{xy}=f_{yx}=2x-6y\)

    3. \(f_{x}=y\cos(xy)\)

      \(f_{y}=x\cos(xy)\)

      \(f_{xx}=-y^{2}\sin(xy)\)

      \(f_{yy}=-x^{2}\sin(xy)\)

      \(f_{xy}=f_{yx}=-xy\sin(xy)+\cos(xy)\)

    4. \(f_{x}=\cos(y)+ye^{x}\)

      \(f_{y}=x\sin(y)+e^{x}\)

      \(f_{xx}=ye^{x}\)

      \(f_{yy}=-x\cos(y)\)

      \(f_{xy}=f_{yx}=e^{x}-\sin(y)\)

Images on this page by RMIT, licensed under CC BY-NC 4.0