Solveeit Logo

Question

Question: How do you find the derivative of \(f(x) = \ln \left( {\left| x \right|} \right)\)?...

How do you find the derivative of f(x)=ln(x)f(x) = \ln \left( {\left| x \right|} \right)?

Explanation

Solution

This problem deals with differentiation and logarithms. Given a logarithmic function, where the logarithmic function is a variable with the presence of modulus. Hence this problem should be solved in a different way, rather than just differentiating the function directly.
Here basic differentiation formulas and chain rule in differentiation are used such as:
ddx(logx)=1x\Rightarrow \dfrac{d}{{dx}}\left( {\log x} \right) = \dfrac{1}{x}

Complete step-by-step answer:
In mathematics, differential calculus is a subfield of calculus that studies the rates at which quantities change. It is one of the two traditional divisions of calculus, the other being integral calculus- the study of the area beneath a curve.
Given an equation which is a function of xx, which is given by:
f(x)=ln(x)\Rightarrow f(x) = \ln \left( {\left| x \right|} \right)
First the function is split into two different intervals, because of the presence of the modulus.
So the function is split into a piecewise function, as shown below:
\Rightarrow f(x) = \left\\{ {\begin{array}{*{20}{c}} {\begin{array}{*{20}{c}} {\ln \left( x \right)}&{\begin{array}{*{20}{c}} ;&{x > 0} \end{array}} \end{array}} \\\ {\begin{array}{*{20}{c}} {\ln \left( { - x} \right)}&{\begin{array}{*{20}{c}} ;&{x < 0} \end{array}} \end{array}} \end{array}} \right.
Now finding the derivative for each subdivided interval as shown:
For x>0x > 0, the derivative of f(x)f(x) is given by:
Here for x>0x > 0, f(x)=ln(x)f(x) = \ln \left( x \right), so the differentiation is given by:
ddx(ln(x))=1x\Rightarrow \dfrac{d}{{dx}}\left( {\ln \left( x \right)} \right) = \dfrac{1}{x}
For x<0x < 0, the derivative of f(x)f(x) is given by:
Here for x<0x < 0, f(x)=ln(x)f(x) = \ln \left( { - x} \right), so the differentiation is given by:
ddx(ln(x))=1xddx(x)\Rightarrow \dfrac{d}{{dx}}\left( {\ln \left( { - x} \right)} \right) = \dfrac{1}{{ - x}} \cdot \dfrac{d}{{dx}}\left( { - x} \right)
Here chain rule is implemented as the function of xx is included with a negative sign.
ddx(ln(x))=1x(1)\Rightarrow \dfrac{d}{{dx}}\left( {\ln \left( { - x} \right)} \right) = \dfrac{1}{{ - x}}\left( { - 1} \right)
Here the negative sign gets cancelled in the numerator as well as the denominator.
ddx(ln(x))=1x\therefore \dfrac{d}{{dx}}\left( {\ln \left( { - x} \right)} \right) = \dfrac{1}{x}
So for both the intervals x>0x > 0 and x<0x < 0, the derivative of the function is the same which is 1x\dfrac{1}{x}.

The derivative of ddx(lnx)=1x\dfrac{d}{{dx}}\left( {\ln \left| x \right|} \right) = \dfrac{1}{x}

Note:
Please note that here while solving the problem here we used the chain rule of differentiation which is given by:
ddx(f1(x).f2(x))=f1(x).ddx(f2(x))+f2(x).ddx(f1(x))\Rightarrow \dfrac{d}{{dx}}\left( {{f_1}(x).{f_2}(x)} \right) = {f_1}(x).\dfrac{d}{{dx}}\left( {{f_2}(x)} \right) + {f_2}(x).\dfrac{d}{{dx}}\left( {{f_1}(x)} \right)
Differential calculus is a method which deals with the rate of change of one quantity with respect to another.