3. Partial Derivatives

Partial Derivatives

Explores partial derivatives, their geometric interpretation, and how to compute them.

Partial Derivatives

Welcome, students! Today’s lesson dives into the world of partial derivatives. By the end of this session, you’ll understand what partial derivatives are, how to compute them, and why they’re so important in multivariable calculus. Imagine you’re a scientist analyzing how temperature changes across a surface or an engineer optimizing a design – partial derivatives are the tools that help you break down these complex problems. Let’s get started! 🌟

Understanding Functions of Several Variables

Before we jump into partial derivatives, let’s review functions of several variables. Unlike single-variable functions, which map from one dimension to another (like $f(x)$), multivariable functions depend on two or more inputs. For example:

$$f(x, y) = x^2 + 3xy + y^2$$

This function takes two inputs, $x$ and $y$, and outputs a single value. You can think of it as a surface in three-dimensional space. Each point $(x, y)$ on the plane corresponds to a height $f(x, y)$ on the surface.

Real-world example: Imagine a temperature map of a city. The temperature at any point depends on both the latitude ($x$) and the longitude ($y$). A function $T(x, y)$ could represent the temperature at different coordinates.

Visualizing Multivariable Functions

A great way to visualize these functions is by thinking in terms of surfaces. For the function $f(x, y) = x^2 + 3xy + y^2$, the graph is a curved surface. Each point on the surface corresponds to a particular combination of $x$ and $y$.

To understand how the function changes, we need to look at how it behaves when we vary one variable at a time while keeping the others constant. This is where partial derivatives come in.

What Are Partial Derivatives?

A partial derivative measures how a function changes as one variable changes, while the other variables are held constant. It’s like asking, “If I walk only in the $x$ direction, how does the height of the surface change?”

In single-variable calculus, the derivative of a function $f(x)$ with respect to $x$ is written as $f'(x)$ or $\frac{df}{dx}$. In multivariable calculus, we use a similar notation for partial derivatives. The partial derivative of $f(x, y)$ with respect to $x$ is written as:

$$\frac{\partial f}{\partial x}$$

This symbol $\partial$ (called “partial”) tells us that we’re taking the derivative with respect to one variable while treating the others as constants.

Geometric Interpretation

Think of a hill. If you walk straight east (changing $x$ while keeping $y$ constant), the slope of the hill in that direction is the partial derivative with respect to $x$. If you walk straight north (changing $y$ while keeping $x$ constant), the slope in that direction is the partial derivative with respect to $y$.

Notation Recap

We can write partial derivatives in different ways. Here are the most common ones:

  • $\frac{\partial f}{\partial x}$ (partial derivative of $f$ with respect to $x$)
  • $f_x(x, y)$ (another way to write the partial derivative with respect to $x$)
  • $\partial_x f(x, y)$ (an alternative notation)

Similarly, for the partial derivative with respect to $y$, we write:

  • $\frac{\partial f}{\partial y}$
  • $f_y(x, y)$
  • $\partial_y f(x, y)$

How to Compute Partial Derivatives

Let’s break down the process of computing partial derivatives step by step. It’s simpler than it sounds! The key is to treat all other variables as constants while differentiating with respect to the chosen variable.

Example 1: A Simple Function

Consider the function:

$$f(x, y) = x^2 + 3xy + y^2$$

We’ll find the partial derivatives with respect to $x$ and $y$.

Partial Derivative with Respect to $x$

We treat $y$ as a constant and differentiate with respect to $x$:

  • The derivative of $x^2$ with respect to $x$ is $2x$.
  • The derivative of $3xy$ with respect to $x$ is $3y$ (since $y$ is treated as a constant, it’s like differentiating $3y \cdot x$).
  • The derivative of $y^2$ with respect to $x$ is $0$ (because $y^2$ is a constant with respect to $x$).

So, the partial derivative with respect to $x$ is:

$$\frac{\partial f}{\partial x} = 2x + 3y$$

Partial Derivative with Respect to $y$

Now we treat $x$ as a constant and differentiate with respect to $y$:

  • The derivative of $x^2$ with respect to $y$ is $0$ (because $x^2$ is constant with respect to $y$).
  • The derivative of $3xy$ with respect to $y$ is $3x$ (just like differentiating $3x \cdot y$).
  • The derivative of $y^2$ with respect to $y$ is $2y$.

So, the partial derivative with respect to $y$ is:

$$\frac{\partial f}{\partial y} = 3x + 2y$$

Example 2: Functions with More Variables

Let’s add another variable. Consider the function:

$$g(x, y, z) = x^2y + e^{yz} + z^3$$

We’ll find the partial derivatives with respect to $x$, $y$, and $z$.

Partial Derivative with Respect to $x$

We treat $y$ and $z$ as constants:

  • The derivative of $x^2y$ with respect to $x$ is $2xy$ (since $y$ is constant).
  • The derivative of $e^{yz}$ with respect to $x$ is $0$ (since $e^{yz}$ doesn’t contain $x$).
  • The derivative of $z^3$ with respect to $x$ is $0$ (since $z^3$ doesn’t contain $x$).

So, the partial derivative with respect to $x$ is:

$$\frac{\partial g}{\partial x} = 2xy$$

Partial Derivative with Respect to $y$

We treat $x$ and $z$ as constants:

  • The derivative of $x^2y$ with respect to $y$ is $x^2$.
  • The derivative of $e^{yz}$ with respect to $y$ is $z e^{yz}$ (using the chain rule: the derivative of $yz$ with respect to $y$ is $z$).
  • The derivative of $z^3$ with respect to $y$ is $0$ (since $z^3$ doesn’t contain $y$).

So, the partial derivative with respect to $y$ is:

$$\frac{\partial g}{\partial y} = x^2 + z e^{yz}$$

Partial Derivative with Respect to $z$

We treat $x$ and $y$ as constants:

  • The derivative of $x^2y$ with respect to $z$ is $0$ (since $x^2y$ doesn’t contain $z$).
  • The derivative of $e^{yz}$ with respect to $z$ is $y e^{yz}$ (the derivative of $yz$ with respect to $z$ is $y$).
  • The derivative of $z^3$ with respect to $z$ is $3z^2$.

So, the partial derivative with respect to $z$ is:

$$\frac{\partial g}{\partial z} = y e^{yz} + 3z^2$$

Higher-Order Partial Derivatives

Just as in single-variable calculus, we can take higher-order derivatives. For multivariable functions, this means we can take partial derivatives more than once.

Second-Order Partial Derivatives

For a function $f(x, y)$, we can take the partial derivative with respect to $x$ and then take the partial derivative of that result with respect to $x$ again. This gives us the second-order partial derivative with respect to $x$:

$$\frac{\partial^2 f}{\partial x^2}$$

We can also mix variables. For example, we can take the partial derivative with respect to $x$ and then with respect to $y$:

$$\frac{\partial^2 f}{\partial x \partial y}$$

Let’s go back to our first example:

$$f(x, y) = x^2 + 3xy + y^2$$

We already found the first-order partial derivatives:

$$\frac{\partial f}{\partial x} = 2x + 3y$$

$$\frac{\partial f}{\partial y} = 3x + 2y$$

Now let’s find some second-order partial derivatives.

Second-Order Partial Derivative with Respect to $x$

We take the derivative of $\frac{\partial f}{\partial x} = 2x + 3y$ with respect to $x$:

$$\frac{\partial^2 f}{\partial x^2} = 2$$

Mixed Partial Derivative $\frac{\partial^2 f}{\partial x \partial y}$

We take the derivative of $\frac{\partial f}{\partial x} = 2x + 3y$ with respect to $y$:

$$\frac{\partial^2 f}{\partial x \partial y} = 3$$

Mixed Partial Derivative $\frac{\partial^2 f}{\partial y \partial x}$

We take the derivative of $\frac{\partial f}{\partial y} = 3x + 2y$ with respect to $x$:

$$\frac{\partial^2 f}{\partial y \partial x} = 3$$

Notice that $\frac{\partial^2 f}{\partial x \partial y} = \frac{\partial^2 f}{\partial y \partial x}$. This is an example of Clairaut’s theorem, which states that if the function and its derivatives are continuous, the mixed partial derivatives are equal.

Second-Order Partial Derivative with Respect to $y$

We take the derivative of $\frac{\partial f}{\partial y} = 3x + 2y$ with respect to $y$:

$$\frac{\partial^2 f}{\partial y^2} = 2$$

So, the second-order partial derivatives are:

  • $\frac{\partial^2 f}{\partial x^2} = 2$
  • $\frac{\partial^2 f}{\partial y^2} = 2$
  • $\frac{\partial^2 f}{\partial x \partial y} = 3$
  • $\frac{\partial^2 f}{\partial y \partial x} = 3$

Hessian Matrix

The collection of all second-order partial derivatives is called the Hessian matrix. For a function $f(x, y)$, the Hessian is:

$$

$H(f) = \begin{pmatrix}$

\frac{\partial^2 f}{\partial x^2} & \frac{\partial^2 f}{\partial x \partial y} \\

\frac{\partial^2 f}{\partial y \partial x} & \frac{\partial^2 f}{\partial y^2}

$\end{pmatrix}$

$$

For our function $f(x, y) = x^2 + 3xy + y^2$, the Hessian is:

$$

$H(f) = \begin{pmatrix}$

2 & 3 \\

3 & 2

$\end{pmatrix}$

$$

The Hessian is useful in optimization problems, helping us analyze whether a point is a local minimum, maximum, or saddle point.

Real-World Applications of Partial Derivatives

Partial derivatives aren’t just theoretical – they’re incredibly useful in real life! Let’s look at a few examples.

Physics: Heat Flow

In physics, partial derivatives appear in the heat equation, which describes how heat spreads in a material. The temperature $T(x, y, t)$ depends on both position $(x, y)$ and time $t$. The rate of change of temperature with respect to time is linked to the second-order partial derivatives of temperature with respect to $x$ and $y$.

Economics: Production Functions

Economists use partial derivatives to analyze production functions. A production function $P(L, K)$ might depend on labor $L$ and capital $K$. The partial derivative $\frac{\partial P}{\partial L}$ tells us how much output increases if we add one more unit of labor, holding capital constant. This helps businesses make decisions about resource allocation.

Machine Learning: Gradient Descent

In machine learning, partial derivatives are used to train models. The gradient of a loss function is a vector of partial derivatives. By following the negative gradient (a process called gradient descent), we can find the minimum of the loss function and improve the model’s accuracy.

Engineering: Stress and Strain

In engineering, partial derivatives help analyze how materials deform under stress. The strain in a material depends on how the displacement changes with respect to spatial coordinates. Partial derivatives describe these changes and help engineers design safer structures.

Conclusion

We’ve covered a lot today, students! You now know what partial derivatives are, how to compute them, and why they’re important. We explored their geometric meaning, worked through examples, and saw how they’re applied in physics, economics, machine learning, and engineering. Partial derivatives are powerful tools that help us understand how multivariable functions change – and they’re essential for solving real-world problems. Keep practicing, and soon you’ll be a partial derivative pro! 🚀

Study Notes

  • A partial derivative measures how a function changes as one variable changes, while others are held constant.
  • Notation: $\frac{\partial f}{\partial x}$, $f_x$, or $\partial_x f$ (partial derivative with respect to $x$).
  • Geometric interpretation: The partial derivative is the slope of the surface in the direction of the chosen variable.
  • To compute a partial derivative:
  • Treat all other variables as constants.
  • Differentiate with respect to the chosen variable.
  • Example: For $f(x, y) = x^2 + 3xy + y^2$:
  • $\frac{\partial f}{\partial x} = 2x + 3y$
  • $\frac{\partial f}{\partial y} = 3x + 2y$
  • Second-order partial derivatives measure how the first-order partial derivatives change.
  • Example: $\frac{\partial^2 f}{\partial x^2}$, $\frac{\partial^2 f}{\partial x \partial y}$.
  • Clairaut’s theorem: If the function is continuous, mixed partial derivatives are equal ($\frac{\partial^2 f}{\partial x \partial y} = \frac{\partial^2 f}{\partial y \partial x}$).
  • Hessian matrix: A square matrix of second-order partial derivatives.
  • For $f(x, y)$:

$$

$ H(f) = \begin{pmatrix}$

\frac{\partial^2 f}{\partial x^2} & \frac{\partial^2 f}{\partial x \partial y} \\

\frac{\partial^2 f}{\partial y \partial x} & \frac{\partial^2 f}{\partial y^2}

$ \end{pmatrix}$

$$

  • Applications:
  • Physics: Heat equations involve second-order partial derivatives.
  • Economics: Production functions use partial derivatives to measure marginal changes.
  • Machine learning: Gradient descent uses partial derivatives to minimize loss functions.
  • Engineering: Stress and strain analysis rely on partial derivatives of displacement functions.

Practice Quiz

5 questions to test your understanding

Partial Derivatives — Calculus 3 | A-Warded