Logic will get you from A to B. Imagination will take you everywhere, Albert Einstein.
A function of two variables $f: \mathbb{R} \times \mathbb{R} \to \mathbb{R}$ assigns a unique real number to each ordered pair in its domain, e.g., $Area = \frac{1}{2}bh$, $z = 2x + 3y$, and $f(x, y) = x^2 + y^2$.
Partial derivatives are derivatives of a function of multiple variables, say $f(x_1, x_2, \cdots, x_n)$, with respect to one of those variables, with the other variables held constant. They measure how the function changes as one variable changes, while keeping the others constant. $\frac{\partial f}{\partial x}(x_0, y_0) = \lim_{\Delta x \to 0} \frac{f(x_0+\Delta x, y_0)-f(x_0, y_0)}{\Delta x}$
Geometrically, the partial derivative $\frac{\partial f}{\partial x}(x_0, y_0)$ at a point $(x_0, y_0)$ can be interpreted as the slope of the tangent line to the curve formed by the intersection of the surface $z = f(x,y)$ and the plane $y = y_0$. Similarly, $\frac{\partial f}{\partial y}(x_0, y_0)$ represents the slope of the tangent line to the curve formed by the intersection of the surface defined by $z = f(x,y)$ and the plane $x = x_0$.
The directional derivative $\frac{dw}{ds}\bigg\vert{}_{\vec{u}}$ is the rate of change of the function $w$ as we move in the direction of a unit vector $\vec{u}$:
$\frac{dw}{ds}\bigg\vert{}_{\vec{u}} = \nabla w \cdot \vec{u} = \vert{}\nabla w\vert{} \cdot \vert{}\vec{u}\vert{}\cos(\theta) = \vert{}\nabla w\vert{}\cos(\theta)$ where $\theta$ is the angle between the gradient and the given unit vector $\vec{u}$.
The gradient vector is defined as $\nabla w = \langle w_x, w_y, w_z \rangle = \langle \frac{\partial w}{\partial x}, \frac{\partial w}{\partial y}, \frac{\partial w}{\partial z} \rangle$. Because there is zero change in the function’s value along a level curve or level surface, the rate of change is zero, meaning the gradient is always perpendicular (orthogonal) to the level curves.
Let $w = f(x, y, z)$ where $x = x(t)$, $y = y(t)$, and $z = z(t)$ are parametrised functions of another variable $t$. The derivative of $w$ with respect to $t$ is calculated via the Chain Rule: $\frac{dw}{dt} = \frac{\partial w}{\partial x}\frac{dx}{dt} + \frac{\partial w}{\partial y}\frac{dy}{dt} + \frac{\partial w}{\partial z}\frac{dz}{dt}$
This can be neatly rewritten using the dot product of the gradient and the velocity vector: $\frac{dw}{dt} = \nabla w \cdot \frac{d\vec{r}}{dt}$ where $\frac{d\vec{r}}{dt} = \langle \frac{dx}{dt}, \frac{dy}{dt}, \frac{dz}{dt} \rangle$.
In multivariable calculus, we frequently analyze functions that depend on multiple variables. While standard definitions assume these variables are independent, practical applications often involve variables that are not independent of each other, but linked by specific equations or constraints.
When a multivariable function $f(x, y, z)$ is subject to a constraint $g(x, y, z) = c$, the variables lose a degree of freedom. This constraint allows us to express one variable in terms of the others, fundamentally altering how we calculate rates of change and critical points, and ultimately, how to understand their relationships.
Let’s look at a specific example to understand this concept better. Consider the function $f(x, y, z) = x^2 + y^2 + z^2$ subject to the constraint $g(x, y, z) = x + y + z = 1$.
We can solve the constraint equation for one of the variables, namely z, to express it in terms of the others: $z = z(x, y) = 1 -x -y$.
By substituting this expression for z into the function f, we can reduce f to a function of two variables, x and y: $f(x, y) = x^2 + y^2 + (1 - x - y)^2$
Let’s expand the squared term and simplify this function: $f(x, y) = x^2 + y^2 + (1 + x^2 + y^2 - 2x - 2y + 2xy) = 2x^2 + 2y^2 + 2xy - 2x - 2y + 1$
Understanding the relationship between the variables involves computing partial derivatives. The partial derivatives of z with respect to x and y are: $\frac{\partial z}{\partial x} = 4x + 2y -2, \frac{\partial z}{\partial y} = 4y +2x -2$.
To find the critical points, we set the partial derivatives to zero and solve the resulting equations: $\begin{cases} 4x + 2y -2 = 0 ~(i) \\ 4y +2x -2 = 0 ~(ii) \end{cases}$
Simplify both equations by dividing by $2$: (1) $2x + y = 1 \implies y = 1 - 2x$; (2) $x + 2y = 1$.
Substitute (1) into (2): $x + 2(1 - 2x) = 1 \implies x + 2 - 4x = 1 \implies -3x = -1 \implies x = \frac{1}{3}$
Substitute $x$ back to find $y$ and $z$: $y = 1 - 2\left(\frac{1}{3}\right) = \frac{1}{3}$. Thus, $z = 1 -x -y = 1 - \frac{1}{3} - \frac{1}{3} = \frac{1}{3}$. Therefore, the only critical point is $\left(\frac{1}{3}, \frac{1}{3}, \frac{1}{3}\right)$.
When dealing with multivariable functions, it’s important to understand how small changes in each variable affect the overall function. This can be done by computing the total differential.
The total differential $dg$ of a multivariable function $g(x, y, z)$ is given by: $dg = \frac{\partial g}{\partial x}dx + \frac{\partial g}{\partial y}dy + \frac{\partial g}{\partial z}dz$. This is the linear approximation of how $g$ changes when you make tiny changes $dx, dy, dz$ in the variables.
If $dg \gt 0$, those small changes increase $g$. If $dg \lt 0$, they decrease $g$. If $dg = 0$, the small changes keep $g$ (locally) constant. So when we say “g is held constant,” we’re imposing the condition $dg = 0$. That’s the key idea: we’re only allowed to move in directions where the linear change in $g$ is zero.
Let’s evaluate how variables interact when a function is held constant. Consider the level surface $g(x, y, z) = x^2 + yz + z^3$ evaluated at the point $(2, 3, 1)$.
First, verify the constant: $g(2, 3, 1) = 2^2 + 3(1) + 1^3 = 8$.
To understand how small changes in x, y, z affect g, we compute the total differential dg.
We compute the partial derivatives of g: $\frac{\partial g}{\partial x} = 2x, \frac{\partial g}{\partial y} = z, \frac{\partial g}{\partial z} = y + 3z^2$
When differentiating with respect to a particular variable, we treat all other variables as constants.
Substituting the partial derivatives: $dg = 2xdx + zdy + (y+3z^2)dz$.
Next, we evaluate these partial derivatives at the point (2, 3, 1): $\frac{\partial g}{\partial x}\bigg|_{(2, 3, 1)} = 2 \cdot 2 = 4$, $\frac{\partial g}{\partial y}\bigg|_{(2, 3, 1)} = 1$, $\frac{\partial g}{\partial z}\bigg|_{(2, 3, 1)} = 3 + 3 \cdot 1^2 = 6$
So, the total differential at $(2, 3, 1)$ is: $dg = 4dx +dy +6dz$. Now, if we stay on the level surface $g(x, y, z) = 8$ (g constant), then $g$ doesn’t change, so the total differential $dg$ is zero: $dg = 0 \implies 4dx + dy + 6dz = 0$. This is a constraint relating the small changes $dx, dy, dz$ that keep you on the same level surface.
$4dx + dy + 6dz = 0 \implies[\text{Solving for dz}] dz = \frac{-1}{6}(4dx +dy) = \frac{-2}{3}dx +\frac{-1}{6}dy$. This says: if you nudge $x$ by $dx$ and $y$ by $dy$, then to stay on the same level surface $g = 8$, you must adjust $z$ by exactly that linear combination of $dx$ and $dy$.
If we interpret z as a function of x and y, $z = z(x, y)$, then: $dz = \frac{\partial z}{\partial x}dx + \frac{\partial z}{\partial y}dy$. Comparing or matching the coefficients reveal: $\frac{\partial z}{\partial x} = \frac{-2}{3}, \frac{\partial z}{\partial y} = \frac{-1}{6}$. This analysis shows how small changes in x and y affect z when the function $g(x, y, z) = x^2 + yz + z^3$ is held constant at 8.
$\frac{\partial z}{\partial x} = \frac{-2}{3}$. If you increase $x$ slightly (with $y$ fixed), $z$ must decrease at a rate of $\frac{-2}{3}$ to keep g constant. Similarly, $\frac{\partial z}{\partial y} = \frac{-1}{6}$. If you increase $y$ slightly (with $x$ fixed), $z$ must decrease at a slower rate of $\frac{-1}{6}$ to keep g constant. So these numbers are telling you how sensitive $z$ is to changes in $x$ and $y$ when you’re constrained to stay on the surface $g = 8$.
When dealing with multivariable functions, it’s important to understand how to take derivatives with respect to one variable while treating other variables as constants. This concept can sometimes be confusing and the notation can become ambiguous, so let’s break it down.
🎯 When you compute a partial derivative like $\frac{\partial z}{\partial x}$, you are choosing a direction in the tangent plane of the level surface and asking “If I move a tiny amount in the x-direction while keeping y fixed, how must $z$ change so that the constraint $g(x, y, z) = c$ remains true?”
To compute $\frac{\partial z}{\partial x}$, we declare that $y$ is constant, hence $dy = 0$, $dz = \frac{-2}{3}dx +\frac{-1}{6}dy = \frac{-2}{3}dx$. $\frac{\partial z}{\partial x} = \frac{-2}{3}$. To avoid confusion, we can use explicit notation that indicates which variables are held constant.
For a general constraint $g(x, y, z) = c$, the total differential is $dg = \frac{\partial g}{\partial x}dx + \frac{\partial g}{\partial y}dy + \frac{\partial g}{\partial z}dz =[\text{Using a different notation, we can write}] g_xdx + g_ydy + g_zdz$. This is the linear change of f. But on the level surface, $g$ does not change, so $dg = 0$, that is $g_xdx + g_ydy + g_zdz = 0$. This gives the tangent‑plane condition.
Solving for $dz$ expresses how $z$ must adjust to keep you on the surface: $dz = -\frac{g_x}{g_z}dx -\frac{g_y}{g_z}dy$.
As we have previously reasoned, $\frac{\partial z}{\partial x}$ = [Set y = constant which implies dy = 0, then $dz = -\frac{g_x}{g_z}dx -\frac{g_y}{g_z}dy = -\frac{g_x}{g_z}dx$] $-\frac{g_x}{g_z}$. Analogously, $\frac{\partial z}{\partial y} = -\frac{g_y}{g_z}$.
🧩 Final interpretation:
Consider the function $f(x, y) = x + y$. The partial derivative with respect to x is: $\frac{\partial f}{\partial x} =1$.
Now, if we introduce a change of variables such as $x = u, y = u + v$, the function becomes $f(x, y) = x + y = 2u +v$. We compute the partial derivatives: $\frac{\partial f}{\partial x} = 1, \frac{\partial f}{\partial u} = 2$.
Even though $x = u$, the partial derivatives differ ($1 \ne 2$) because the condition of holding variables constant differ. When we take the partial derivative of a function $f(x, y)$ with respect to x, $\frac{\partial f}{\partial x} = 1$, we are asking how f changes as we vary x while holding y constant. Similarly, when we take the partial derivative of a function $f(u, v)$ with respect to u, $\frac{\partial f}{\partial u} = 2$ we are taking the partial derivative with respect to u while holding v constant.
Therefore, this notation can become quite confusing —especially common in physics and thermodynamics— because they don’t make explicit “which variables are being hold constant”, we could clarify our previous notation, $(\frac{\partial f}{\partial x})_y$ that explicitly states that the partial derivative is taken with respect to x while holding y constant.
Assume $f = f(x, y, z)$ where $g(x, y, z) = c$, $(\frac{\partial f}{\partial x})_y$ is the rate of change of f with respect to x, y is strictly constant, x varies, and z = z(x, y). It provides clarity and eliminates ambiguity, but it is not especially pleasing to the eye 😄; and $(\frac{\partial f}{\partial u})_v$ states that the partial derivative is taken with respect to u while holding v constant.
Using this notation, it is clearly obvious that $(\frac{\partial f}{\partial x})_y = 1 \ne (\frac{\partial f}{\partial u})_v = 2$
The goal is to calculate $(\frac{\partial w}{\partial y})_z$, which represents the partial derivative of w with respect to y while keeping z constant.
By the chain rule, the partial derivative of w with respect to y while keeping z constant can be expressed as: $(\frac{\partial w}{\partial y})_z = \frac{\partial w}{\partial x}\frac{\partial x}{\partial y} + \frac{\partial w}{\partial y}\frac{\partial y}{\partial y} + \frac{\partial w}{\partial z}\frac{\partial z}{\partial y}$.
We use the chain rule under the constraint that z is constant. This is crucial because z depends on both x and y: $\frac{\partial z}{\partial y} = 0\text{. Besides, }~\frac{\partial y}{\partial y} = 1$.
Thus, the expression simplifies to: $(\frac{\partial w}{\partial y})_z = \frac{\partial w}{\partial x}\frac{\partial x}{\partial y} + \frac{\partial w}{\partial y}.$
Besides, from our original equation (i) $w = 2x^2 + 3y^2 + z^2$, let’s compute the partial derivatives of w: $\frac{\partial w}{\partial x} = 4x, \frac{\partial w}{\partial y} = 6y$.
We use the constraint given in Equation (ii): $\frac{\partial z}{\partial y} =[\text{By the Chain Rule}] 2x(\frac{\partial x}{\partial y})+4y(\frac{\partial y}{\partial y}) = 2x(\frac{\partial x}{\partial y})+4y$
We need to remember that z is constant, $\frac{\partial z}{\partial y} = 0$. Then, $2x(\frac{\partial x}{\partial y})+4y = 0 \implies\frac{\partial x}{\partial y} = \frac{-4y}{2x} = \frac{-2y}{x}$.
Finally, combining all these intermediate calculations, we get: $(\frac{\partial w}{\partial y})_z = \frac{\partial w}{\partial x}\frac{\partial x}{\partial y} + \frac{\partial w}{\partial y} = (4x)(\frac{-2y}{x})+6y = -8y + 6y = -2y.$ The partial derivative of w with respect to y, keeping z constant, is $-2y$.
The goal is to calculate $(\frac{\partial w}{\partial t})_{x, z}$, which represents the partial derivative of w with respect to t, while keeping x and z constant.
By the chain rule, the partial derivative of w with respect to t while keeping x and z constant can be expressed as: $(\frac{\partial w}{\partial t})_{x, z} = \frac{\partial w}{\partial x}\frac{\partial x}{\partial t} + \frac{\partial w}{\partial y}\frac{\partial y}{\partial t} + \frac{\partial w}{\partial z}\frac{\partial z}{\partial t} + \frac{\partial w}{\partial t}\frac{\partial t}{\partial t}$.
We use the chain rule under the constraint that x and z are constant, their partial derivatives with respect to t are zero: $\frac{\partial x}{\partial t} = 0,\frac{\partial z}{\partial t} = 0~\text{. Additionally, the partial derivative of t with respect to itself is 1}~\frac{\partial t}{\partial t} = 1$.
Thus, the expression simplifies significantly to: $(\frac{\partial w}{\partial t})_{x, z} = \frac{\partial w}{\partial y}\frac{\partial y}{\partial t} + \frac{\partial w}{\partial t}$.
Besides, from our original equation (i), let’s compute the partial derivatives of w: $\frac{\partial w}{\partial t} = -\sin(t), \frac{\partial w}{\partial y} = 1$.
We use the constraint given in equation $t = x - y$ (ii) and differentiate both sides with respect to t: $\frac{\partial x}{\partial t}-\frac{\partial y}{\partial t} = 1 \implies$[$x$ is constant, $\frac{\partial x}{\partial t} = 0$] $\frac{\partial y}{\partial t} = -1$.
Finally, combining all these intermediate calculations, we get: $(\frac{\partial w}{\partial t})_{x, z} = \frac{\partial w}{\partial y}\frac{\partial y}{\partial t} + \frac{\partial w}{\partial t} = 1 \cdot (-1) - \sin(t) = -1 -\sin(t).$
A partial derivative only makes sense after you specify which variables are allowed to vary. Different choices of independent variables correspond to different curves on the constraint surface.
$w = x^2 + y^2 + z^2$ measures the square of the distance from the point (x, y, z) to the origin. The constraint $z = x^2 + y^2$ says that the point (x, y, z) lies on the elliptic paraboloid opening upwards with the vertex at the origin. Any point on the surface is $(x, y, x^2+y^2)$.
The level curves of this surface, which are the intersections of the surface with planes parallel to the xy-plane, are circles centered at the origin. Specifically, the level curve at height z = c is given by the equation $x^2 + y^2 = c$ which describes a circle of radius $\sqrt{c}$.
🧱 Case 1 — Independent variables: $x$ and $y$
Here we treat $x$ and $y$ as independent variables, z as dependent (because of the constraint).
We eliminate $z$ from $w$ by substituting the constraint directly: $w(x, y) = x^2 + y^2 + (x^2 + y^2)^2 = x^2 + y^2 + x^4 + 2x^2y^2 + y^4$
Differentiating with respect to $x$ while holding $y$ constant yields: $\left(\frac{\partial w}{\partial x}\right)_y = 2x + 4x^3 + 4xy^2$
🔍Geometric meaning: Holding y fixed or constant, we slice the paraboloid with a vertical plane. This restricts our movement to a parabola $(x, y_0, x^2+y_0^2)$ in a plane parallel to the xz-plane. As we move a point $P$ along this parabola away from the origin, its squared distance from the origin $w$ changes. For instance, at point $P(1, 0, 1)$, the rate of change is $\frac{\partial w}{\partial x} = 2x +4x^3+4xy^2 =2(1) + 4(1)^3 + 0 = 6$. Thus, $\frac{\partial w}{\partial x} \ne 0$.
🧱 Case 2 — Independent variables: $x$ and $z$
Here we treat $x$ and $z$ as independent variables, y as dependent.
We eliminate $y$ by rearranging the constraint ($y^2 = z - x^2$) and substituting it into $w$: $w(x, z) = x^2 + (z - x^2) + z^2 = z + z^2$
Differentiating with respect to $x$ while holding $z$ constant yields: $\left(\frac{\partial w}{\partial x}\right)_z = 0$
🔍Geometric meaning: With z constant, we slice the paraboloid with a horizontal plane. This restricts our movement to a circular level curve. As point $P$ moves along this circle, its height $z$ is fixed, and its horizontal distance from the center ($x^2 + y^2$) remains fixed. Because every point on this specific path is equidistant from the origin, the distance function $w$ from the origin does not change at all. Therefore, the rate of change is identically $0$. Thus, $\frac{\partial w}{\partial x} = 0$.
A constrained partial derivative depends on which variables you treat as independent, because that choice determines the curve along the constraint surface, e.g., In Case 1, you move along a parabola (changing distance from origin); In Case 2, you move along a circle (constant distance from origin). Even though the function $w$ is the same, the path you take on the constraint surface is different — so the rate of change is different.
