Solveeit Logo

Question

Question: How do you find the derivative of \(\ln (\tan x)?\)...

How do you find the derivative of ln(tanx)?\ln (\tan x)?

Explanation

Solution

The given function is a composite function that is a function that consists of another function or the argument of a function is another function. Composite functions can be differentiated with the help of chain rule, let us take an example of a composite function f(x)=h(g(x))f(x) = h(g(x)), its derivative will be given as follows:
d(f(x))dx=d(h(g(x))d(g(x))×d(g(x))dx\dfrac{{d\left( {f(x)} \right)}}{{dx}} = \dfrac{{d\left( {h(g(x)} \right)}}{{d\left( {g(x)} \right)}} \times \dfrac{{d\left( {g(x)} \right)}}{{dx}}

Formula used:
Chain rule: If a function f(x)f(x) is composition of various function as followsf(x)=g1(g2(g3(....g1(x))))f(x) = {g_1}({g_2}({g_3}(....{g_1}(x)))) then d(f(x))dx=d(g1(g2(g3(....gn(x)))))d(g2(g3(....gn(x))))×d(g2(g3(....gn(x))))d(g3(....gn(x)))×d(g3(....gn(x)))d((....gn(x))×......×d(gn(x))dx\dfrac{{d\left( {f(x)} \right)}}{{dx}} = \dfrac{{d\left( {{g_1}({g_2}({g_3}(....{g_n}(x))))} \right)}}{{d\left( {{g_2}({g_3}(....{g_n}(x)))} \right)}} \times \dfrac{{d\left( {{g_2}({g_3}(....{g_n}(x)))} \right)}}{{d\left( {{g_3}(....{g_n}(x))} \right)}} \times \dfrac{{d\left( {{g_3}(....{g_n}(x))} \right)}}{{d\left( {(....{g_n}(x)} \right)}} \times ...... \times \dfrac{{d\left( {{g_n}(x)} \right)}}{{dx}}
Derivative of logarithm function: dlnxdx=1x\dfrac{{d\ln x}}{{dx}} = \dfrac{1}{x}
And derivative of tangent function: dtanxdx=sec2x\dfrac{{d\tan x}}{{dx}} = {\sec ^2}x

Complete step by step answer:
In order to find the derivative of the function f(x)=ln(tanx)f(x) = \ln (\tan x), we have to use chain rule because this is a composite function, tangent function is the argument of the logarithmic function in this given composite function. Let us understand chain rule in order to solve this problem.If a function f(x)f(x) is composition of various function as follows
f(x)=g1(g2(g3(....g1(x))))f(x) = {g_1}({g_2}({g_3}(....{g_1}(x)))) then its derivative will be given as
d(f(x))dx=d(g1(g2(g3(....gn(x)))))d(g2(g3(....gn(x))))×d(g2(g3(....gn(x))))d(g3(....gn(x)))×d(g3(....gn(x)))d((....gn(x))×......×d(gn(x))dx\dfrac{{d\left( {f(x)} \right)}}{{dx}} = \dfrac{{d\left( {{g_1}({g_2}({g_3}(....{g_n}(x))))} \right)}}{{d\left( {{g_2}({g_3}(....{g_n}(x)))} \right)}} \times \dfrac{{d\left( {{g_2}({g_3}(....{g_n}(x)))} \right)}}{{d\left( {{g_3}(....{g_n}(x))} \right)}} \times \dfrac{{d\left( {{g_3}(....{g_n}(x))} \right)}}{{d\left( {(....{g_n}(x)} \right)}} \times ...... \times \dfrac{{d\left( {{g_n}(x)} \right)}}{{dx}}
In the given function
f(x)=ln(tanx)f(x) = \ln (\tan x)
Taking derivative both sides with respect to xx
d(f(x))dx=d(ln(tanx))dx\dfrac{{d\left( {f(x)} \right)}}{{dx}} = \dfrac{{d\left( {\ln (\tan x)} \right)}}{{dx}}
Now applying chain rule to the given function f(x)=ln(tanx)f(x) = \ln (\tan x), we will get
d(f(x))dx=d(ln(tanx))d(tanx)×d(tanx)dx\dfrac{{d\left( {f(x)} \right)}}{{dx}} = \dfrac{{d\left( {\ln (\tan x)} \right)}}{{d(\tan x)}} \times \dfrac{{d\left( {\tan x} \right)}}{{dx}}
We know that,
dlnxdx=1x  and  dtanxdx=sec2x\dfrac{{d\ln x}}{{dx}} = \dfrac{1}{x}\;{\text{and}}\;\dfrac{{d\tan x}}{{dx}} = {\sec ^2}x
So simplifying the derivatives further with help of this,
d(f(x))dx=1tanx×sec2x d(f(x))dx=sec2xtanx \dfrac{{d\left( {f(x)} \right)}}{{dx}} = \dfrac{1}{{\tan x}} \times {\sec ^2}x \\\ \Rightarrow\dfrac{{d\left( {f(x)} \right)}}{{dx}} = \dfrac{{{{\sec }^2}x}}{{\tan x}} \\\
You can left it like this or should simplify it further in sine and cosine as follows

\Rightarrow\dfrac{{d\left( {f(x)} \right)}}{{dx}} = \dfrac{1}{{\dfrac{{\sin x}}{{\cos x}} \times {{\cos }^2}x}} \\\ \therefore\dfrac{{d\left( {f(x)} \right)}}{{dx}} = \dfrac{1}{{\sin x\cos x}} = \csc x\sec x \\\ $$ **Therefore the desired derivative of $f(x) = \ln (\tan x)$ is equal to $\csc x\sec x$.** **Note:** When applying the chain rule in a more complex composite function then do the calculations or simplification stepwise, because chain rule also becomes complex for complex composite functions and your one mistake will change the whole answer.