# What is the derivative of $(u^v)$?

The derivative of a sum is the sum of the derivatives, ie,
$$d(u+v)=du+dv$$
The derivative of a product is a little more complicated:
$$d(u\cdot v)= u\ dv + v\ du$$
But what about the derivative of a power? I'm not talking $x^n$ or $a^x$ or even $x^x$, but $u^v$ - an arbitrary function of $x$ raised to the power of another arbitrary function of $x$.

• @krirkrirk No, I know it's correct, that's why I put my answer in an answer. I'm putting it up so it's findable. Mar 17 '18 at 9:49
• Ok, after re-reading the rules, it appears you can indeed post a question just so that it appears in future researchs. I did not know this ! Sorry. Mar 17 '18 at 10:07
• It's okay, no harm done. Mar 17 '18 at 10:08

A not so well known differentiation trick is to consider all variables in turn and assume the other to be constants, differentiate and sum.

Hence $u^v$ is first a power of $u$, then an exponential with exponent $v$ and

$$\left(u^v\right)'=vu^{v-1}u'+\log u\,u^vv'.$$

This is in fact an application of

$$\left(u^v\right)'=\frac{\partial u^v}{\partial u}u'+\frac{\partial u^v}{\partial v}v'.$$

• +1. The OP should look for "chain rule for partial derivatives" in a calculus textbook. True, in this case it can be done with logarithms and exponentials. But that chain rule is a useful formula to know anyway. Mar 17 '18 at 13:51
• @GEdgar Truth be told, I hadn't thought to make that particular connection. But then, my classes to date haven't gone that far in my textbooks, I just read ahead. Mar 19 '18 at 12:18

We start with $$y=u^v$$ where $y$, $u$ and $v$ are all functions of $x$.
We take the natural logarithm $(\ln)$ of both sides: $$\ln(y)=\ln(u^v)$$ And drop $v$ out from $\ln$, using the relevant property of logarithms: $$\ln(y)=v\ \ln(u)$$ This allows us to use the previously established product rule when we differentiate: $$d\ln(y)=v\ d\ln(u) + \ln(u)\ dv$$ Which, by the calculus definition of the natural logarithm, simplifies to: $$\frac{dy}{y}=v\ \frac{du}{u} + \ln(u)\ dv$$ We then multiply both sides by $y$ to isolate $dy$, and replace $y$ with its definition $u^v$ to get: $$dy=u^v\ \left(\frac{v\ du}{u} + \ln(u)\ dv\right)$$ Which is the answer we were looking for. But! Let's distribute that $u^v$ and do some cancelling: $$dy=v\ u^{v-1}\ du + \ln(u)\ u^v\ dv$$ To the student of calculus, those look familiar. The first addend $(v\ u^{v-1}\ du)$ is the power rule $(d(u^n)=n\cdot u^{n-1}\ du)$, while the second $(\ln(u)\ u^v\ dv)$ is the general exponential rule $(dv=\ln(a)\ a^v\ dv)$.
This makes sense; the derivation of this rule used the product rule, which defines the derivative of a product as the sum of two distinct products, one each that differentiates one function and leaves the other alone.
Here, that's gone up a level, so to speak, with each addend of our result treating either the base or the power as constant. In fact, setting $u$ constant renders $du \; \; 0$, rendering the first addend $0$ in turn, and likewise for $v$ and the second addend, rendering both the power rule and the generalized exponent rule special cases of this "generalized power/exponent rule".

• Now the question becomes "Why hasn't anyone asked this before?" Plugging this question's title into the helpful little box search thing at the top of the question format got me a few specific examples (z^z, sin^cos), but not the general form (also, it seems to be assumed that x^x = x^x(1+ln(x))), and searching directly was useless. In any case, now it's findable, answered and explained. Mar 17 '18 at 9:47
• I guess that because on the odd occasion that it is needed, we just do what TheSimpliFire did. Mar 17 '18 at 9:59
• Well, that's nice, but it's still a cool math fact that deserves to be shared. (This comment has replaced my previous one). Mar 17 '18 at 10:30
• I am not saying that your original question is invalid or unreasonable. I was just trying to answer your subsidiary question of why it had not been asked before. My answer to that is that is less commonly required and can be easily deduced when it is. To me, at least, if is easier to remember and apply the more basic rules than to memorise an extra one. Mar 17 '18 at 12:09

Let $u=f(x)$, $v=g(x)$ and $y=f(x)^{g(x)}$. Then using the Chain and Product Rules, \begin{align}\ln y=g(x)\ln f(x)&\implies\frac1y\cdot\frac{dy}{dx}=g'(x)\ln f(x)+\frac{g(x)}{f(x)}\cdot f'(x)\\&\implies\frac{dy}{dx}=f(x)^{g(x)}\left(g'(x)\ln f(x)+\frac{g(x)}{f(x)}\cdot f'(x)\right)\end{align} Hence $$d(u^v)=u^v\left(v'\ln u'+\frac{vu'}u\right)$$

• Wait a tick: Plugging in u=v=x gives $d(x^x) = x^x$ (as $x' = 1$, $ln(1) = 0$, and $x/x = 1$, for all the cases that matter anyway); I think you added a prime where one was unwarranted. You also seem to have forgotten the $f'(x)$ in your second addend, (but that doesn't change $d(x^x)$). Mar 17 '18 at 10:22
• Thanks! Fixed.. Mar 17 '18 at 10:24

We obtain \begin{align*} \color{blue}{d(u^v)}&=d\left(e^{v\cdot \ln u}\right)\\ &=e^{v\cdot \ln u}\cdot d(v\cdot \ln u)\\ &=u^v\left(\ln u\ dv + v\ d\left(\ln u\right)\right)\\ &\,\,\color{blue}{=u^v\left(\ln u\ dv+\frac{v}{u}\ du\right)} \end{align*}