Multivariable Calculus – Partial Derivative of Two Variables Function

derivativesmultivariable-calculuspartial derivative

I found this exercise on the book of multivariable calculus from which I'm studying:

"Find the partial derivative $\frac{\partial{z}}{\partial{x}}$ and the total derivative $\frac{\text{d}z}{\text{d}x}$ of $z(x,y)=e^{xy}$ where $y=\phi(x)$."

Now, this to me looks like a function of a single variable $f:\mathbb{R}\to\mathbb{R}$ and so in this case the partial derivative of $f$ with respect to $x$ and total derivative would be equivalent; in particular, I end up with something like:

$$\frac{\text{d}z}{\text{d}x}=e^{xy}(\phi(x)+x\phi'(x))$$

In the solution, while the result for the total derivative is the same as mine, the partial derivative of $f$ with respect to $x$ is written as follows:

$$\frac{\partial{z}}{\partial{x}}=ye^{xy}$$

Why is this the case?
Since the partial derivative of $f$ with respect to $x$ shows the incremental behaviour of the function as $x$ changes, shouldn't I account for the presence of $x$ in the functional representation of $y$ while computing the derivative with respect to $x$?

Sorry in advance for the super basic question 🙂

Best Answer

The quantity $\frac{\partial f(x,y)}{\partial x}$ is defined as the derivative of $f$ with respect to its first argument. Even though you will eventually assign $y = \phi(x)$, the quantity $\frac{\partial f(x,y)}{\partial x}$ still refers to the (perhaps hypothetical) assessment of "how much does $f$ vary when $x$ is varied and $y$ (its second argument) is held constant." Meanwhile, the total derivative $\frac{df(x,y)}{dx}$ assesses all ways that $f$ varies with $x$, including any "indirect" contribution through how $y$ may depend on $x$ (i.e. $\phi$). Generally speaking, $$ \frac{df(x,y)}{dt} = \frac{\partial f}{\partial x} \frac{\partial x}{\partial t} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial t} $$

Letting $x=t$ we have, \begin{align} \frac{df(x,y)}{dx} &= \frac{\partial f}{\partial x} \frac{\partial x}{\partial x} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial x}\\ &= \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial x} \end{align}

Letting $y = \phi(x)$ we have, $$ \frac{df(x,y)}{dx} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y} \phi'(x) $$

Notice that, $$ \phi'(x)=0\ \implies\ \frac{df}{dx}=\frac{\partial f}{\partial x} $$

The partial derivative under question is "how $f$ varies while we vary $x$ and hold its other arguments constant", $\frac{\partial f}{\partial x}$, which still makes sense even if $y=\phi(x)$.

In the case of $f(x,y) = e^{xy}$ we have, $$ \frac{\partial f(x,y)}{\partial x} = ye^{xy} $$ and \begin{align} \frac{df(x,y)}{dx} &= ye^{xy} + xe^{xy}\phi'(x)\\ &= e^{xy}\big{(}y + x\phi'(x)\big{)} \end{align}

which is, as you have found and we would hope, equivalent to thinking of $f$ as a function of one variable $x$ to find by "product rule", $$ \frac{df(x)}{dx} = e^{x\phi(x)}\big{(}\phi(x) + x\phi'(x)\big{)} $$