In calculus, logarithmic differentiation or differentiation by taking logarithms is a method used to differentiate functions by employing the logarithmic derivative of a function f,[1]

${\displaystyle (\ln f)'={\frac {f'}{f))\quad \implies \quad f'=f\cdot (\ln f)'.}$

The technique is often performed in cases where it is easier to differentiate the logarithm of a function rather than the function itself. This usually occurs in cases where the function of interest is composed of a product of a number of parts, so that a logarithmic transformation will turn it into a sum of separate parts (which is much easier to differentiate). It can also be useful when applied to functions raised to the power of variables or functions. Logarithmic differentiation relies on the chain rule as well as properties of logarithms (in particular, the natural logarithm, or the logarithm to the base e) to transform products into sums and divisions into subtractions.[2][3] The principle can be implemented, at least in part, in the differentiation of almost all differentiable functions, providing that these functions are non-zero.

## Overview

The method is used because the properties of logarithms provide avenues to quickly simplify complicated functions to be differentiated.[4] These properties can be manipulated after the taking of natural logarithms on both sides and before the preliminary differentiation. The most commonly used logarithm laws are[3]

${\displaystyle \ln(ab)=\ln(a)+\ln(b),\qquad \ln \left({\frac {a}{b))\right)=\ln(a)-\ln(b),\qquad \ln(a^{n})=n\ln(a).}$

### Higher order derivatives

Using Faà di Bruno's formula, the n-th order logarithmic derivative is,

${\displaystyle {\frac {d^{n)){dx^{n))}\ln f(x)=\sum _{m_{1}+2m_{2}+\cdots +nm_{n}=n}{\frac {n!}{m_{1}!\,m_{2}!\,\cdots \,m_{n}!))\cdot {\frac {(-1)^{m_{1}+\cdots +m_{n}-1}(m_{1}+\cdots +m_{n}-1)!}{f(x)^{m_{1}+\cdots +m_{n))))\cdot \prod _{j=1}^{n}\left({\frac {f^{(j)}(x)}{j!))\right)^{m_{j)).}$
Using this, the first four derivatives are,
{\displaystyle {\begin{aligned}{\frac {d^{2)){dx^{2))}\ln f(x)&={\frac {f''(x)}{f(x)))-\left({\frac {f'(x)}{f(x)))\right)^{2}\\[1ex]{\frac {d^{3)){dx^{3))}\ln f(x)&={\frac {f^{(3)}(x)}{f(x)))-3{\frac {f'(x)f''(x)}{f(x)^{2))}+2\left({\frac {f'(x)}{f(x)))\right)^{3}\\[1ex]{\frac {d^{4)){dx^{4))}\ln f(x)&={\frac {f^{(4)}(x)}{f(x)))-4{\frac {f'(x)f^{(3)}(x)}{f(x)^{2))}-3\left({\frac {f''(x)}{f(x)))\right)^{2}+12{\frac {f'(x)^{2}f''(x)}{f(x)^{3))}-6\left({\frac {f'(x)}{f(x)))\right)^{4}\end{aligned))}

## Applications

### Products

 Main article: Product rule

A natural logarithm is applied to a product of two functions

${\displaystyle f(x)=g(x)h(x)}$
to transform the product into a sum
${\displaystyle \ln(f(x))=\ln(g(x)h(x))=\ln(g(x))+\ln(h(x)).}$
Differentiating by applying the chain and the sum rules yields
${\displaystyle {\frac {f'(x)}{f(x)))={\frac {g'(x)}{g(x)))+{\frac {h'(x)}{h(x))),}$
and, after rearranging, yields[5]