Partial Derivatives

Definition, Formulas, Detailed Examples, and Practice Exercises

Definition of Partial Derivatives

Let \( f(x, y) \) be a function of two variables. If we keep \( y \) constant and differentiate \( f \) (assuming \( f \) is differentiable) with respect to the variable \( x \), using the standard rules and formulas of differentiation, we obtain the partial derivative of \( f \) with respect to \( x \), denoted by:

\[ \dfrac{\partial f}{\partial x} \quad \text{or} \quad f_x \]

Similarly, if we keep \( x \) constant and differentiate \( f \) with respect to the variable \( y \), we obtain the partial derivative of \( f \) with respect to \( y \), denoted by:

\[ \dfrac{\partial f}{\partial y} \quad \text{or} \quad f_y \]

We may also define partial derivatives using limits as follows:

\[ \dfrac{\partial f}{\partial x} = \lim_{h\to 0} \frac{f(x+h, y) - f(x, y)}{h} \]

and

\[ \dfrac{\partial f}{\partial y} = \lim_{k\to 0} \frac{f(x, y+k) - f(x, y)}{k} \]

Examples with Detailed Solutions

Click on each example to view its detailed step-by-step solution.

Example 1

Find the partial derivatives \( f_x \) and \( f_y \) if \( f(x, y) \) is given by:

\[ f(x, y) = x^2 y + 2x + y \]
Show Solution to Example 1

Assume \( y \) is constant and differentiate with respect to \( x \):

\[ \begin{aligned} f_x &= \frac{\partial f}{\partial x} = \frac{\partial}{\partial x}(x^2 y + 2x + y) \\ &= \frac{\partial}{\partial x}(x^2 y) + \frac{\partial}{\partial x}(2x) + \frac{\partial}{\partial x}(y) = 2xy + 2 + 0 = 2xy + 2 \end{aligned} \]

Assume \( x \) is constant and differentiate with respect to \( y \):

\[ \begin{aligned} f_y &= \frac{\partial f}{\partial y} = \frac{\partial}{\partial y}(x^2 y + 2x + y) \\ &= \frac{\partial}{\partial y}(x^2 y) + \frac{\partial}{\partial y}(2x) + \frac{\partial}{\partial y}(y) = x^2 + 0 + 1 = x^2 + 1 \end{aligned} \]

Example 2

Find the partial derivatives \( f_x \) and \( f_y \) if \( f(x, y) \) is given by:

\[ f(x, y) = \sin(xy) + \cos(x) \]
Show Solution to Example 2

Differentiate with respect to \( x \) assuming \( y \) is constant (using the chain rule for \(\sin(xy)\)):

\[ \begin{aligned} f_x &= \frac{\partial f}{\partial x} = \frac{\partial}{\partial x}(\sin(xy) + \cos(x)) \\ &= \frac{\partial}{\partial x}(\sin(xy)) + \frac{\partial}{\partial x}(\cos(x)) = y \cos(xy) - \sin(x) \end{aligned} \]

Differentiate with respect to \( y \) assuming \( x \) is constant:

\[ \begin{aligned} f_y &= \frac{\partial f}{\partial y} = \frac{\partial}{\partial y}(\sin(xy) + \cos(x)) \\ &= \frac{\partial}{\partial y}(\sin(xy)) + \frac{\partial}{\partial y}(\cos(x)) = x \cos(xy) - 0 = x \cos(xy) \end{aligned} \]

Example 3

Find \( f_x \) and \( f_y \) if \( f(x, y) \) is given by:

\[ f(x, y) = x e^{xy} \]
Show Solution to Example 3

Differentiate with respect to \( x \) assuming \( y \) is constant using the product rule:

\[ \begin{aligned} f_x &= \frac{\partial f}{\partial x} = \frac{\partial}{\partial x}(x e^{xy}) \\ &= \frac{\partial}{\partial x}(x) \cdot e^{xy} + x \cdot \frac{\partial}{\partial x}(e^{xy}) = 1 \cdot e^{xy} + x \cdot y e^{xy} = (1 + xy) e^{xy} \end{aligned} \]

Differentiate with respect to \( y \) assuming \( x \) is constant:

\[ \begin{aligned} f_y &= \frac{\partial f}{\partial y} = \frac{\partial}{\partial y}(x e^{xy}) \\ &= x \cdot \frac{\partial}{\partial y}(e^{xy}) = x \cdot x e^{xy} = x^2 e^{xy} \end{aligned} \]

Example 4

Find \( f_x \) and \( f_y \) if \( f(x, y) \) is given by:

\[ f(x, y) = \ln(x^2 + 2y) \]
Show Solution to Example 4

Differentiate with respect to \( x \):

\[ \begin{aligned} f_x &= \frac{\partial f}{\partial x} = \frac{\partial}{\partial x}(\ln(x^2 + 2y)) \\ &= \frac{\partial}{\partial x}(x^2 + 2y) \cdot \frac{1}{x^2 + 2y} = \frac{2x}{x^2 + 2y} \end{aligned} \]

Differentiate with respect to \( y \):

\[ \begin{aligned} f_y &= \frac{\partial f}{\partial y} = \frac{\partial}{\partial y}(\ln(x^2 + 2y)) \\ &= \frac{\partial}{\partial y}(x^2 + 2y) \cdot \frac{1}{x^2 + 2y} = \frac{2}{x^2 + 2y} \end{aligned} \]

Example 5

Find \( f_x(2, 3) \) and \( f_y(2, 3) \) if \( f(x, y) \) is given by:

\[ f(x, y) = y x^2 + 2y \]
Show Solution to Example 5

We first find the partial derivatives \( f_x \) and \( f_y \):

\[ f_x(x, y) = 2xy \] \[ f_y(x, y) = x^2 + 2 \]

Substitute \( x = 2 \) and \( y = 3 \):

\[ f_x(2, 3) = 2(2)(3) = 12 \] \[ f_y(2, 3) = 2^2 + 2 = 6 \]

Exercises

Find the partial derivatives \( f_x \) and \( f_y \) for the following functions. Click each exercise to check your answers.

Exercise 1

\( f(x, y) = x e^{x + y} \)

Show Answer
\[ f_x = (x + 1)e^{x + y}, \quad f_y = x e^{x + y} \]

Exercise 2

\( f(x, y) = \ln(2x + yx) \)

Show Answer
\[ f_x = \frac{1}{x}, \quad f_y = \frac{1}{y + 2} \]

Exercise 2 Note

Note: By logarithmic properties, \( \ln(2x + yx) = \ln(x(2 + y)) = \ln(x) + \ln(2 + y) \), which makes taking partial derivatives straightforward.

Exercise 3

\( f(x, y) = x \sin(x - y) \)

Show Answer
\[ f_x = x \cos(x - y) + \sin(x - y), \quad f_y = -x \cos(x - y) \]

More References and Links to Partial Derivatives and Multivariable Functions