# Finding $\frac{d}{dx} y^x$

$$\frac{d}{dx} y^x$$

How would you find the derivative with respect to $x$ of $y^x$ assuming that $y$ is a function of $x$? I know you will have to use the chain rule somehow, and I know that the derivative of $a^x = a^x \cdot\log (a)$.

Taking the derivative of the outer function, $y^x$, gives $y^x\log(x)\frac{\text{dy}}{\text{dx}}$, and the derivative of the inner function, $y$ gives $\frac{dy}{dx}$.

Putting this together gives

$$\frac{\text{d}}{\text{dx}} y^x=\frac{\text{dy}}{\text{dx}}x^y \log(x) \cdot \frac{dy}{dx}$$

Is this even right? How should I proceed further?

• Did you mean $\dfrac{d}{dx}y^x$ or derivative of $\dfrac{dy}{dx}y^x$? – Tunk-Fey May 22 '14 at 3:42
• @Tunk-Fey The former – 1110101001 May 22 '14 at 3:42
• @DonAntonio Even if y is a function of x? Must not the chain rule be used in that case? – 1110101001 May 22 '14 at 3:43
• You can't use that formula, because it's meant for when a is a constant, not a variable. See my answer. – Deepak May 22 '14 at 3:45
• Then the answer is $y^x\left(\ln y+\dfrac{x}{y}\dfrac{dy}{dx}\right)$ by chain rule. – Tunk-Fey May 22 '14 at 3:51

$$\frac{d}{dx} y^x\\ = \frac{d}{dx}e^{x\ln y} = e^{x\ln y}.(\ln y + \frac{x}{y}.\frac{dy}{dx})\\ = y^x.(\ln y + \frac{x}{y}.\frac{dy}{dx})$$
• Not directly, no. You can recast it as an equation, viz. $y^x = z$ take logs of both sides, and differentiate both sides wrt x implicitly. But it comes to the same thing, really, just more unwieldy. BTW, what I did is the "standard trick" for functions raised to other functions. – Deepak May 22 '14 at 3:48
We want to find $\frac{dz}{dx}$, where $z=y^x$.
Taking the natural logarithm of both sides, we get $$\ln z=x\ln y.$$ Now differentiate. We get $$\frac{1}{z}\frac{dz}{dx}=\frac{x}{y}\frac{dy}{dx}+\ln y.$$ Since $z=y^x$, we get $$\frac{dz}{dx}=y^x\left( \frac{x}{y}\frac{dy}{dx}+\ln y \right).$$
Remark: The procedure we used is called logarithmic differentiation. It is a technique that is really not needed here, but is useful, for example, if we want the derivative of an ugly product like $(\cos x)(1+3x)^{12}(1+x^2)^{17}$.