# Derivatives of Logarithmic Functions

Sub Topics
A logarithm with the natural number 'e' as the base is called the natural logarithm and is written as "ln".
The general rules of a logarithm apply for natural logarithms as well:

Ln(xy) = ln(x) + ln(y) Product rule for logarithms

Ln$(\frac{x}{y})$=ln(x)-ln(y) Quotient rule for logarithms

Ln(xn) = n.ln(x) Power rule for logarithms
When considered as functions natural logarithmic function ln(x) is the inverse of the exponential function $e^{x}$.  The graph given below demonstrates this. We can see the two graphs, y = ln(x) and y = $e^{x}$ are mirror images of each other over the line y = x. Thus the composition of ln and the exponential function's output 'x'.
$Ln(e^{x})=x$  $e^{in}x=x$

The derivative of the ln function is generally understood as the derivative of the logarithmic function.
Derivative of natural log (ln) function
for x> 0, $\frac{d}{dx}$ log(x)= $\frac{1}{x}$

There are many approaches to Prove$\frac{d}{dx}$ log(x)= $\frac{1}{x}$. One would be to use Taylor's expansion for ln function:
ln(1+x) =$x-\frac{x^{2}}{2}+\frac{x^{3}}{3}-...........$

Proof:
Using the limit definition of a derivative,

$\frac{d}{dx}$ log(x) =$\lim_{h\rightarrow 0}$ $\frac{Iog(x+h)-Iog(x)}{h}$

=$\lim_{h\rightarrow 0}$ $\frac{Iog(\frac{x+h}{x})}{h}$ Using the quotient rule for logarithms,

=$\lim_{h\rightarrow 0}$ Iog (1+$\frac{h}{x}$)

= udv + vdu

= $\lim_{h \rightarrow o}$ $\frac{\left ( \frac{h}{x}-\frac{(\frac{h}{x})^{2}}{2}+\frac{(\frac{h}{x})^{3}}{3} -\right )}{h}$ Using Taylor's Series for natural logarithm,

= $\lim_{h \rightarrow o}$ $\left ( \frac{1}{x}-\frac{h}{2x^{2}}+\frac{h^{2}}{3x^{3}}-......... \right )$ Dividing each term by h

= $\frac{1}{x}$   as the rest of the terms containing h approach zero.

x can assume only positive values as ln(x) is defined only for x > 0. Graphically, only the portion in the first quadrant of the reciprocal function represents the derivative of a natural logarithm function.

In differentiation problems, the derivative of the ln function is used along with general rules of differentiation like the product rule, the quotient rule and the chain rule. The following examples show differentiation of functions involving a logarithmic function.

## Derivative of Log Function

1. Find the derivative of x.ln(x)
The function can be differentiated using the product rule for derivatives.

u(x) = x and v(x) = log(x) .Hence u’(x) = 1  and v’(x) =$\frac{1}{x}$

$\frac{d}{dx}$
(x.log(x)) = udv + vdu =x($\frac{1}{x}$) + log(x)(1)   = 1 + log(x)

2.  Find the derivative of log(sin x)
This function is differentiated using the chain rule,
f(x) = ln(sin x)

f(x) = $\frac{1}{\sin x}.\frac{d}{dx}$ (sin x)

=  $\frac{1}{\sin x}$ .cos x = cot x

3. Find the derivative of $\frac{In(x)}{x+1}$

The quotient rule is to be used:

f(x) =$\frac{\log(x)}{x+1}$ where u(x) = ln(x)  and v(x) = x+1.   Hence  u’(x) =$\frac{1}{x}$   and v’(x) = 1

f(x) = $\frac{vdu-udv}{v^{2}}$ = $\frac{(x+1).\frac{1}{x}-In(x).1}{(x+1)^{2}}$ = $\frac{x+1-xIn(x)}{x(x+1)^{2}}$

Finding the derivatives of logarithmic functions is relatively difficult when compared with computing the derivatives of exponential functions.  The steps and simplifications are to be done with care, since for complicated functions the differentiation would be involved.

4. Differentiate:$\sqrt[Iog]{\frac{1+\sin x}{1-\sin x}}$

This function looks scary at first sight.  We can identify four functions here, namely logarithmic, radical, quotient and sine functions. If the chain rule is to be used in succession, the formidable derivatives of logarithmic and root functions will render it highly difficult to manage the simplification.  We apply one algebraic technique coupled with trigonometric identities to simplify the function first.

y = $\sqrt[Iog]{\frac{1+\sin x}{1-\sin x}}$

y = $\sqrt[Iog]{\frac{(1+\sin (x))(1+\sin (x))}{(1-\sin x)(1+\sin (x))}}$ Multiply and divide the quotient by 1+sinx

y = $\frac{Iog\sqrt(1+\sin x)^2}{(1-sin^2x)}$

y = Iog $\left ( \frac{1+\sin x}{\cos x} \right )$   1- sin2x = cos2x

y=Iog $(\sec x+\tan x)$ This is helpful in avoiding the use of the quotient rule
differentiating using the derivative of ln function and the chain rule
y' =$\frac{1}{\sec x+\tan x}$ $(\sec x\tan x+\sec ^{2}x)$ $\frac{\sec x(\sec x+\tan (x))}{\sec x+\tan x}$ = $\sec x$
The derivative of the complicated function is unexpectedly a simple one.

## Logarithmic Differentiation

Even though differentiation using the derivative of a logarithmic function can be complicated, logarithms provide an easy method to differentiate complicated products and quotient functions.  This method makes use of the properties of logarithms to write products and quotients as sums and products.

Example:

Find the derivative of $\frac{\sqrt{x}(x+4)^{\frac{3}{2}}}{(4x-3)^{\frac{4}{3}}}$

Solution:
Given: y = $\frac{\sqrt{x}(x+4)^{\frac{3}{2}}}{(4x-3)^{\frac{4}{3}}}$

y = $\frac{x^{\frac{1}{2}}(x+4)^{\frac{3}{2}}}{(4x-3)^{\frac{4}{3}}}$  The radical sign is replaced with a rational index.

Taking a natural logarithm on either side of the equation,

ln y =$\frac{1}{2}$ Iog x + $\frac{3}{2}$ Iog(x+4) - $\frac{4}{3}$ Iog(4x-3) Using the product and quotient rules for logarithms

Differentiating using the derivative of ln

$\frac{1}{y}\frac{dy}{dx}$ = $\frac{1}{2}\frac{1}{x}$ + $\frac{3}{2}\frac{1}{(x+4)}$-$\frac{4}{3}\frac{4}{(4x-3)}$ = $\frac{1}{2x}$+$\frac{3}{2(x+4)}$-$\frac{16}{3(4x-3)}$

$\frac{dy}{dx}$ =y $\frac{1}{2x}$ + $\frac{3}{2(x+4)}$-$\frac{16}{3(4x-3)}$

$\frac{dy}{dx}$ = $\frac{x^{\frac{1}{2}}(x+4)^{\frac{3}{2}}}{(4x-3)^{\frac{4}{3}}\left [ \frac{1}{2x}+\frac{3}{2(x+4)}-\frac{16}{3(4x-3)} \right ]}$

Derivative of an infinite Series
If y=$(\sin [(x)]^{\sin [(x)]^{\sin [(x)]^{\sin [(x)]^{\sin [(x)........]}}}}$ prove that

$\frac{dy}{dx}$
= $\frac{y^{2}\cot x}{(1-y\log \sin (x)}$

Can we take a chain of logarithms to solve this problem?  That is not feasible here. The infinite series not affected if we remove one chain here.  So this function can be rewritten as
y=$(\sin (x))^{y}$. Now the method of logarithmic differentiation can be applied.

$log y$ = y = $Iog(\sin (x))$ $\frac{1}{y}\frac{dy}{dx}$ = y. $\frac{\cos x}{\sin x}$

+$Iog(\sin (x))$ $\frac{dy}{dx}$    Used the product rule to differentiate

$\frac{dy}{dx}$
= $y^{2}\cot x+ y Iog(\sin (x))$ $\frac{dy}{dx}$    Multiplied the equation by y

$\frac{dy}{dx}$ (1-y Iog (sin x)) = $y^{2}\cot x$
$\frac{dy}{dx}$ = $\frac{y^{2}\cot x}{(1-yIn(\sin (x))}$
Thus the derivative of the infinite series is found in a few steps.

## Derivative of Log Base a of x

The derivative of a logarithmic function with any base can be found from the derivative of the ln function using the change of base rule.
The change of base rule for a logarithmic when the base is changed to ‘b’ from ‘a’ is explained below:
New base = a   and old base = b = $\log_{b}x$ = $\frac{\log_{a}x}{\log_{a}b}$
If f(x) = $\log_{a} x$ then the base could be changed to ‘e’  as the log base e is the natural logarithm function ln.

f(x)=$\frac{\log_{e}x}{\log_{e}a}$

$\log_{e}a$ is a constant, which can be evaluated using a calculator.
Differentiating with respect to x,

f(x) =  $\frac{1}{\log_{e}ax}\frac{1}{x}$ = $\frac{1}{x\log_{e}a}$ = $\frac{1}{x Iog a}$

Derivative of log base a $\frac{d}{dx}$ $\log_{a}x$ = $\frac{1}{x Iog a}$

## Derivative of Log Base 10

The derivative of a log base 10 can be found by substituting a=10 in the above formula.

$\frac{d}{dx}$
$\log_{10}x$ = $\frac{1}{x Iog10}$ and $\log 10 \approx 2.303$

$\frac{d}{dx}$ $\log_{10}x \approx$ $\frac{1}{2.303x}$

The derivative of a log base 10 $\frac{d}{dx}$ $\log_{10}x$ = $\frac{1}{x \log 10}$

Example using a log with another base

Find the derivative of 4x  + $\log_{4}x-Inx$

Differentiating using the relevant formulas:

f(x) = $In(4)4^{x}$ + $\frac{1}{xIn4}\frac{1}{-x}$ simplifying by taking the common denominator,

f(x) = $\frac{x(In (4)^{2})4^{x} - In 4+1}{X In 4}$