Find the gradient of
$$z=x^y$$
I understand how to get it with respect to $x$ since $y$ is treated as a constant. But when trying to solve it with respect to $y$, why is it incorrect to implicitly differentiate and use the product rule:
$$\ln(z)=y\cdot ln(x)$$
$$\frac{(z_y)}{z}=\Bigr(y\cdot \frac{1}{x}\Bigr)+(1\cdot \ln(x))$$
$$z_y=z\Bigr(\frac{y}{x}+\ln(x)\Bigr)$$
$$z_y=x^y\Bigr(\frac{y}{x}+\ln(x)\Bigr)$$
In single-variable calculus, a first application of implicit differentiation is typically to find the derivative of $x \mapsto a^x$, where $a > 0$. The typical argument is \begin{align*} y = a^x &\implies \log(y) = x\log(a) \\ &\implies \frac{1}{y} y' = \log(a) \\ &\implies y' = y\log(a) = a^x \log(a). \end{align*} In your problem, when you differentiate with respect to $y$, you need to regard $x$ as a constant (you should also probably assume that $x > 0$). You can then apply the single-variable result to get $$ z_y = \frac{\mathrm{d}}{\mathrm{d}y} x^y = x^y\log(x). $$