Sunday, 17 February 2013

Logarithmic Differentiation: Proving the Product Rule

If you have standard maths to a pre-undergraduate level then it is pretty likely that you have met the product rule for differentiating two functions of $x$:$\ u,\ v$

$\begin{align*}\frac{d}{dx}(uv) = u'v+v'u\end{align*}$

But, I hear you scream, why?! Well there is a very neat proof for the product rule, but it can be extended to the quotient rule, or the product of three functions, or eighteen.

Consider $y = uv$ for some functions of $x$: $u,\ v$, this then means that:

$\ln y = \ln uv$
$\ln y = \ln u + \ln v$

We can then differentiate both sides implicitly to get:

$\begin{align*}\frac{1}{y} \frac{dy}{dx} = \frac{u'}{u} + \frac{v'}{v}\end{align*}$

$\begin{align*}\frac{1}{y} \frac{dy}{dx} = \frac{u'v + v'u}{uv}\end{align*}$

$y = uv$ so we can then multiply through by $uv$ to get:

$\begin{align*}\frac{dy}{dx} = u'v + v'u\end{align*}$

Which is the product rule! This is a very concise little proof of the product rule, but it does assume that you can differentiate implicitly and also that $\begin{align*}\frac{d}{dx}(\ln f(x)) = \frac{f'(x)}{f(x)}\end{align*}$.

Logarithmic differentiation also has useful applications to more complicated derivatives, by reducing more complex functions to ones that are much simpler to differentiate.

$\begin{align*}\ e.g\ Given\ y = xe^x\cos (1+x^2)\ find \frac{dy}{dx}\end{align*}$

Taking logs of both sides and rearranging gives:

$\begin{align*}\ \ln y = \ln x + x\ln e + \ln cos (1+x^2)\end{align*}$

We can differentiate both sides implicitly as we did earlier and we get:

$\begin{align*}\ \frac{1}{y}\frac{dy}{dx} = \frac{1}{x} + 1 - \frac{2x\sin(1+x^2)}{\cos(1+x^2)}\end{align*}$

$\begin{align*}\ \frac{1}{y}\frac{dy}{dx} = \frac{\cos(1+x^2) + x\cos(1+x^2) - 2x^2\sin(1+x^2)}{x\cos(1+x^2)} \end{align*}$

Multiplying through by $y$ we get:

$\begin{align*}\ \frac{dy}{dx} = e^x\left((x+1)\cos(1+x^2) - 2x^2\sin(1+x^2)\right) \end{align*}$

It only took a few lines to evaluate a pretty complex derivative rather than having to break it down and use the product rule on three products.

See if you can prove that $\begin{align*}\frac{d}{dx}\left(\frac{u}{v}\right) = \frac{u'v-v'u}{v^2}\end{align*}$also evaluate$\begin{align*}\frac{d}{dx}\left(\frac{3x^2sinx}{\sqrt{x^2+1}}\right)\end{align*}$


  1. Could you maybe do a proof / justify the chain rule (if you haven't done this already...)?


      Here you go.

  2. I'll put it on my list of future posts. I will leave a comment here when I have done it.

  3. This is neat but it does not work when either u or v equal 0

    1. Yes, but if either u or v are 0 then the product uv is 0 and hence their derivative is 0.