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)=1xlnaThis 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=lnaxThen exponentiate both sides:
elny=elnaxAs alnx = xlne, and lne=1, we can simplify the left side of the equation to remove the exponent and natural log.
y=elnaxProceed to find the derivative by using the chain rule:
dxdy=elnax,y=eu,u=lnaxdydu=eu,dudx=lnalnaeu=lnaelnaJust as lne=1, elnx=x, thus:
dydxlna axReturning to the derivative of y=logax, rewrite the equation:
ay=xNow that we know dydxlna ax, we can derive the equation implicitly with respect to x:
ddxay=ddxxaylnadydx=1Then, dividing by aylna:
ddxlogax=1xlnaProving ddx(lnx)=1x¶
Start with y=lnx. Exponentate both sides of the equation:
ey=elnxRecalling that elnx=x:
ey=xApplying implicit differentiation:
dydxey=ddxxeydydx=1Using the fact that ey=x, we can substitute x for ey:
xdydx=1Divide by x:
dydx=1xExamples¶
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=lnxAs we proved above, dudx=1x, therefore:
dydx=1xcoslnxdiff(sin(ln(x)))
Example 2: Find the derivative of the function f(x)=log2(1−3x)¶
Using the fact that ddx(logax)=1xlna, apply the Chain Rule:
y=log2u,u=1−3xdydu=1uln2,dudx=3dydx=3(1−3x)ln2diff(log((1 - 3 * x), 2))
Example 3: Find the derivative to the function 5√lnx¶
First, rewrite the equation as 5√lnx=(lnx)15. Then, apply the Chain Rule:
y=u15,u=lnxdydu=15(lnx)−45,dudx=1xdydx=1x 15(lnx)−45=(lnx)−455x=15xln45xdiff((log(x)) ** (1/5))
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+ln5xcosxdiff(sin(x) * log(5 * x))
Example 5: Find the derivative of the function F(x)=ln(2x+1)3(3x−1)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(3x−1)4With 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(3x−1)Then, proceed to differentiate the function:
dydx=3ddxln(2x+1)−4ddxln(3x−1)dydx=322x+1−433x−1=62x+1−123x−1simplify(diff(log((2 * x + 1) ** 3 / (3 * x - 1) ** 4)))