Processing math: 100%

Derivatives of Logarithmic Functions

Implicit differentiation, which we explored in the last section, can also be employed to find the derivatives of logarithmic functions, which are of the form y=logax. This also includes the natural logarithmic function y=lnx.

Proving ddx(logax)=1xlna

Taking advantage of the fact that y=logax can be rewritten as an exponential equation, ay=x, we can state the derivative of logax as:

ddx(logax)=1xlna

This can be proved by applying implicit differentiation. First we find the deriative of y=ax. Start by taking the ln of both sides of the equation:

lny=lnax

Then exponentiate both sides:

elny=elnax

As alnx = xlne, and lne=1, we can simplify the left side of the equation to remove the exponent and natural log.

y=elnax

Proceed to find the derivative by using the chain rule:

dxdy=elnax,y=eu,u=lnaxdydu=eu,dudx=lnalnaeu=lnaelna

Just as lne=1, elnx=x, thus:

dydxlna ax

Returning to the derivative of y=logax, rewrite the equation:

ay=x

Now that we know dydxlna ax, we can derive the equation implicitly with respect to x:

ddxay=ddxxaylnadydx=1

Then, dividing by aylna:

ddxlogax=1xlna

Proving ddx(lnx)=1x

Start with y=lnx. Exponentate both sides of the equation:

ey=elnx

Recalling that elnx=x:

ey=x

Applying implicit differentiation:

dydxey=ddxxeydydx=1

Using the fact that ey=x, we can substitute x for ey:

xdydx=1

Divide by x:

dydx=1x

Examples

In [26]:
from sympy import symbols, diff, simplify, sin, cos, log, tan, sqrt, init_printing
from mpmath import ln, e

init_printing()
x = symbols('x')
y = symbols('y')

Example 1: Calculate the derivative of f(x)=sinlnx

Apply the Chain Rule:

y=sinu,u=lnx

As we proved above, dudx=1x, therefore:

dydx=1xcoslnx
In [ ]:
diff(sin(ln(x)))

Example 2: Find the derivative of the function f(x)=log2(13x)

Using the fact that ddx(logax)=1xlna, apply the Chain Rule:

y=log2u,u=13xdydu=1uln2,dudx=3dydx=3(13x)ln2
In [9]:
diff(log((1 - 3 * x), 2))
Out[9]:
3(3x+1)log(2)

Example 3: Find the derivative to the function 5lnx

First, rewrite the equation as 5lnx=(lnx)15. Then, apply the Chain Rule:

y=u15,u=lnxdydu=15(lnx)45,dudx=1xdydx=1x 15(lnx)45=(lnx)455x=15xln45x
In [13]:
diff((log(x)) ** (1/5))
Out[13]:
0.2xlog0.8(x)

Example 4: Find the derivative of f(x)=sinxln5x

Start by using the Product rule, udvdx+vdudx:

u=sinx,v=ln5xdydx=(sinx)dvdxln5x+(ln5x)dudxsinxdydx=sinxx+ln5xcosx
In [28]:
diff(sin(x) * log(5 * x))
Out[28]:
log(5x)cos(x)+1xsin(x)

Example 5: Find the derivative of the function F(x)=ln(2x+1)3(3x1)4

Here, rather than applying the Chain Rule and then the Quotient Rule to the inner equation, which would result in a very lengthy and tedious derivation, we can take advantage of one of the logarithmic identities, lnab=lna+lnb. Thus, we can rewrite the function as:

F(x)=ln(2x+1)3+ln1(3x1)4

With the rewritten function, we can leverage another logarithmic identity, lnab=blna to simplify the derivation. We can therefore rewrite the function again as:

F(x)=3ln(2x+1)4ln(3x1)

Then, proceed to differentiate the function:

dydx=3ddxln(2x+1)4ddxln(3x1)dydx=322x+1433x1=62x+1123x1
In [35]:
simplify(diff(log((2 * x + 1) ** 3 / (3 * x - 1) ** 4)))
Out[35]:
6x+186x2+x1

References

Related Posts