Derivatives of Logarithmic Functions
Solved Problems
Example 7.
\[y = {\log _2}\cos x\]
Solution.
Differentiating as a composite function, we can write:
\[y'\left( x \right) = \left( {{{\log }_2}\cos x} \right)^\prime = \frac{1}{{\cos x \cdot \ln 2}} \cdot {\left( {\cos x} \right)^\prime } = \frac{1}{{\cos x \cdot \ln 2}} \cdot \left( { - \sin x} \right) = - \frac{{\sin x}}{{\cos x \cdot \ln 2}} = - \frac{{\tan x}}{{\ln 2}}.\]
This function is defined only when
\[\cos x \gt 0,\;\; \Rightarrow - \frac{\pi }{2} + 2\pi n \lt x \;\lt \frac{\pi }{2} + 2\pi n,\;\;n \in \mathbb{Z}. \]
Example 8.
\[y = {\log _3}\frac{3}{x} + \frac{3}{x}\]
Solution.
Using the linear properties of the derivative and the chain rule, we obtain:
\[y'\left( x \right) = \left( {{{\log }_3}\frac{3}{x} + \frac{3}{x}} \right)^\prime = \left( {{{\log }_3}\frac{3}{x}} \right)^\prime + \left( {\frac{3}{x}} \right)^\prime = \frac{1}{{\frac{3}{x}\ln 3}} \cdot {\left( {\frac{3}{x}} \right)^\prime } + 3 \cdot {\left( {\frac{1}{x}} \right)^\prime } = \frac{x}{{3\ln 3}} \cdot 3 \cdot \left( { - \frac{1}{{{x^2}}}} \right) + 3 \cdot \left( { - \frac{1}{{{x^2}}}} \right) = - \frac{3}{{{x^2}}}\left( {\frac{x}{{3\ln 3}} + 1} \right) = - \frac{3}{{{x^2}}} \cdot \frac{{x + 3\ln 3}}{{3\ln 3}} = - \frac{{x + 3\ln 3}}{{{x^2}\ln 3}}.\]
In this example, the function is defined for \(x \gt 0.\)
Example 9.
\[y = {\log _3}\left( {4{x^2}} \right)\]
Solution.
\[y'\left( x \right) = \left[ {{{\log }_3}\left( {4{x^2}} \right)} \right]^\prime = \frac{1}{{4{x^2}\ln 3}} \cdot {\left( {4{x^2}} \right)^\prime } = \frac{{8x}}{{4{x^2}\ln 3}} = \frac{2}{{x\ln 3}}\;\left( {x \ne 0} \right).\]
Example 10.
\[y = {x^p}\ln x.\]
Solution.
We use the product rule and the power rule.
\[y^\prime = \left( {{x^p}\ln x} \right)^\prime = \left( {{x^p}} \right)^\prime\ln x + {x^p}\left( {\ln x} \right)^\prime = p{x^{p - 1}} \cdot \ln x + {x^p} \cdot \frac{1}{x} = p{x^{p - 1}}\ln x + {x^{p - 1}} = {x^{p - 1}}\left( {p\ln x + 1} \right).\]
Example 11.
\[y = \ln \tan \frac{x}{2}\]
Solution.
By the chain rule, we find:
\[y'\left( x \right) = \left( {\ln \tan \frac{x}{2}} \right)^\prime = \frac{1}{{\tan \frac{x}{2}}} \cdot {\left( {\tan \frac{x}{2}} \right)^\prime }.\]
Simplify the expression for the derivative:
\[y'\left( x \right) = \cot \frac{x}{2} \cdot \frac{1}{{{{\cos }^2}\frac{x}{2}}} \cdot {\left( {\frac{x}{2}} \right)^\prime } = \frac{{\cos \frac{x}{2}}}{{\sin\frac{x}{2}}} \cdot \frac{1}{{{{\cos }^2}\frac{x}{2}}} \cdot \frac{1}{2} = \frac{1}{{2\sin\frac{x}{2}\cos\frac{x}{2}}}.\]
Applying the double angle formula \(\sin x = 2\sin {\frac{x}{2}}\cos{\frac{x}{2}},\) we obtain the final answer:
\[y'\left( x \right) = \frac{1}{{\sin x}} = \csc x.\]
Example 12.
\[y = \ln \left( {x + \sqrt {{x^2} + {a^2}} } \right)\]
Solution.
Differentiating as a composite function and simplifying we obtain the following expression for the derivative:
\[y'\left( x \right) = \left[ {\ln \left( {x + \sqrt {{x^2} + {a^2}} } \right)} \right]^\prime = \frac{1}{{x + \sqrt {{x^2} + {a^2}} }} \cdot {\left( {x + \sqrt {{x^2} + {a^2}} } \right)^\prime } = \frac{1}{{x + \sqrt {{x^2} + {a^2}} }} \cdot \left( {1 + \frac{{\cancel{2}x}}{{\cancel{2}\sqrt {{x^2} + {a^2}} }}} \right) = \frac{\cancel{{\sqrt {{x^2} + {a^2}} + x}}}{{\cancel{\left( {x + \sqrt {{x^2} + {a^2}} } \right)}\sqrt {{x^2} + {a^2}} }} = \frac{1}{{\sqrt {{x^2} + {a^2}} }}.\]
Note that this function exists only for \(x \ne 0.\)
Example 13.
\[y = \ln {\frac{1}{{\sqrt {1 - {x^4}} }}}\]
Solution.
Using the chain rule and the power rule, we have
\[y^\prime = \left( {\ln \frac{1}{{\sqrt {1 - {x^4}} }}} \right)^\prime = \frac{1}{{\frac{1}{{\sqrt {1 - {x^4}} }}}} \cdot \left( {\frac{1}{{\sqrt {1 - {x^4}} }}} \right)^\prime = \sqrt {1 - {x^4}} \cdot \left( {{{\left( {1 - {x^4}} \right)}^{ - \frac{1}{2}}}} \right)^\prime = {\left( {1 - {x^4}} \right)^{\frac{1}{2}}} \cdot \left( { - \frac{1}{2}{{\left( {1 - {x^4}} \right)}^{ - \frac{3}{2}}}} \right) \cdot \left( { - 4{x^3}} \right) = \frac{{{{\left( {1 - {x^4}} \right)}^{\frac{1}{2}}} \cdot 4{x^3}}}{{2{{\left( {1 - {x^4}} \right)}^{\frac{3}{2}}}}} = \frac{{2{x^3}}}{{1 - {x^4}}}.\]
Example 14.
Compute the derivative of the function \(y = \frac{{{x^2}}}{{\ln x}}\) at \(x = e.\)
Solution.
By the quotient rule,
\[y^\prime = \left( {\frac{{{x^2}}}{{\ln x}}} \right)^\prime = \frac{{\left( {{x^2}} \right)^\prime \cdot \ln x - {x^2} \cdot \left( {\ln x} \right)^\prime}}{{{{\left( {\ln x} \right)}^2}}} = \frac{{2x \cdot \ln x - {x^2} \cdot \frac{1}{x}}}{{{{\ln }^2}x}} = \frac{{2x\ln x - x}}{{{{\ln }^2}x}} = \frac{{x\left( {2\ln x - 1} \right)}}{{{{\ln }^2}x}}.\]
Substitute \(x = e:\)
\[y^\prime\left( e \right) = \frac{{e\left( {2\ln e - 1} \right)}}{{{{\ln }^2}e}} = \frac{{e\left( {2 \cdot 1 - 1} \right)}}{{{1^2}}} = e.\]
Example 15.
\[y = \ln \sqrt {\frac{{1 - x}}{{1 + x}}}\]
Solution.
Using the chain and quotient rules, we have
\[y^\prime = \left( {\ln \sqrt {\frac{{1 - x}}{{1 + x}}} } \right)^\prime = \frac{1}{{\sqrt {\frac{{1 - x}}{{1 + x}}} }} \cdot \left( {\sqrt {\frac{{1 - x}}{{1 + x}}} } \right)^\prime = \sqrt {\frac{{1 + x}}{{1 - x}}} \cdot \frac{1}{{2\sqrt {\frac{{1 - x}}{{1 + x}}} }} \cdot \left( {\frac{{1 - x}}{{1 + x}}} \right)^\prime = \sqrt {\frac{{1 + x}}{{1 - x}}} \cdot \frac{1}{2}\sqrt {\frac{{1 + x}}{{1 - x}}} \cdot \frac{{\left( { - 1} \right) \cdot \left( {1 + x} \right) - \left( {1 - x} \right) \cdot 1}}{{{{\left( {1 + x} \right)}^2}}} = \frac{1}{2} \cdot \frac{{1 + x}}{{1 - x}} \cdot \frac{{ - \color{blue}{1} - \cancel{\color{red}{x}} - \color{blue}{1} + \cancel{\color{red}{x}}}}{{{{\left( {1 + x} \right)}^2}}} = \frac{{\left( {1 + x} \right) \cdot \left( { - \color{blue}{2}} \right)}}{{2\left( {1 - x} \right){{\left( {1 + x} \right)}^2}}} = \frac{{ - 1}}{{\left( {1 - x} \right)\left( {1 + x} \right)}} = \frac{1}{{\left( {x - 1} \right)\left( {x + 1} \right)}} = \frac{1}{{{x^2} - 1}}.\]
Example 16.
\[y = \ln \left( {\arccos \frac{1}{x}} \right)\]
Solution.
We apply the chain rule twice:
\[y'\left( x \right) = \left[ {\ln \left( {\arccos \frac{1}{x}} \right)} \right]^\prime = \frac{1}{{\arccos \frac{1}{x}}} \cdot {\left( {\arccos \frac{1}{x}} \right)^\prime } = \frac{1}{{\arccos \frac{1}{x}}} \cdot \left( { - \frac{1}{{\sqrt {1 - {{\left( {\frac{1}{x}} \right)}^2}} }}} \right) \cdot {\left( {\frac{1}{x}} \right)^\prime } = \frac{1}{{\arccos \frac{1}{x}}} \cdot \left( { - \frac{1}{{\sqrt {1 - {{\left( {\frac{1}{x}} \right)}^2}} }}} \right) \cdot \left( { - \frac{1}{{{x^2}}}} \right) = \frac{1}{{\arccos \frac{1}{x}}} \cdot \frac{1}{{{x^2}\sqrt {\frac{{{x^2} - 1}}{{{x^2}}}} }} = \frac{{\left| x \right|}}{{{x^2}\sqrt {{x^2} - 1} \arccos \frac{1}{x}}} = \frac{1}{{\left| x \right|\sqrt {{x^2} - 1} \arccos \frac{1}{x}}}.\]
The domain of this function and the derivative has the following form:
\[\left\{ \begin{array}{l} \arccos \frac{1}{x} \gt 0\\ \left| {\frac{1}{x}} \right| \le 1\\ x \ne 0\\ {x^2} – 1 \gt 0 \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} \frac{1}{x} \ne 1\\ \left| x \right| \ge 1\\ x \ne 0\\ \left| x \right| \gt 1 \end{array} \right.,\;\; \Rightarrow \;\left| x \right| \gt 1.\]
Example 17.
\[y = \ln \left( {\ln \cot x} \right)\]
Solution.
Using the chain rule twice, we obtain:
\[y'\left( x \right) = \left[ {\ln \left( {\ln \cot x} \right)} \right]^\prime = \frac{1}{{\ln \cot x}} \cdot {\left( {\ln \cot x} \right)^\prime } = \frac{1}{{\ln \cot x}} \cdot \frac{1}{{\cot x}} \cdot {\left( {\cot x} \right)^\prime } = \frac{1}{{\ln \cot x}} \cdot \frac{1}{{\cot x}} \cdot \left( { - \cot x \cdot \csc x} \right) = - \frac{{\csc x}}{{\ln \cot x}}.\]
Find the domain of the given function and its derivative. The corresponding system of inequalities can be written as
\[\left\{ \begin{array}{l} \ln \cot x \gt 0\\ \cot x \gt 0\\ x \ne \pi n,\;n \in \mathbb{Z} \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} \cot x \gt 1\\ \cot x \gt 0\\ x \ne \pi n,\;n \in \mathbb{Z} \end{array} \right.,\;\; \Rightarrow \pi n \lt x \lt \frac{\pi }{4} + \pi n,\;\;n \in \mathbb{Z}. \]
Example 18.
\[y = \frac{{{{\log }_2}\left( {{x^2}} \right)}}{{{x^2}}}\]
Solution.
By the quotient rule, we find:
\[y'\left( x \right) = \left( {\frac{{{{\log }_2}\left( {{x^2}} \right)}}{{{x^2}}}} \right)^\prime = \frac{{\frac{{2{x^3}}}{{{x^2}\ln 2}} - 2x{{\log }_2}\left( {{x^2}} \right)}}{{{x^4}}} = \frac{{2\left[ {1 - {{\log }_2}\left( {{x^2}} \right)\ln 2} \right]}}{{{x^3}\ln 2}},\]
where \(x \ne 0.\)
Example 19.
\[y = {\log_2}x \cdot {\log _3}x\]
Solution.
By the product rule,
\[y^\prime = \left( {{{\log }_2}x \cdot {{\log }_3}x} \right)^\prime = \left( {{{\log }_2}x} \right)^\prime \cdot {\log _3}x + {\log _2}x \cdot \left( {{{\log }_3}x} \right)^\prime = \frac{1}{{x\ln 2}} \cdot {\log _3}x + {\log _2}x \cdot \frac{1}{{x\ln 3}} = \frac{1}{x}\left( {\frac{{{{\log }_3}x}}{{\ln 2}} + \frac{{{{\log }_2}x}}{{\ln 3}}} \right).\]
Using the change-of-base formula, we can write
\[{\log _3}x = \frac{{\ln x}}{{\ln 3}},\;{\log _2}x = \frac{{\ln x}}{{\ln 2}}.\]
Hence
\[y^\prime = \frac{1}{x}\left( {\frac{{{{\log }_3}x}}{{\ln 2}} + \frac{{{{\log }_2}x}}{{\ln 3}}} \right) = \frac{1}{x}\left( {\frac{{\ln x}}{{\ln 2\ln 3}} + \frac{{\ln x}}{{\ln 3\ln 2}}} \right) = \frac{{2\ln x}}{{x\ln 2\ln 3}}.\]
Example 20.
\[y = \ln \left( {\tan x + \sec x} \right)\]
Solution.
\[y'\left( x \right) = \left[ {\ln \left( {\tan x + \sec x} \right)} \right]^\prime = \frac{1}{{\tan x + \sec x}} \cdot {\left( {\tan x + \sec x} \right)^\prime } = \frac{1}{{\tan x + \sec x}} \cdot \left( {{{\sec }^2}x + \tan x \cdot \sec x} \right) = \frac{{\sec x \cancel{\left( {\tan x + \sec x} \right)}}}{{\cancel{\tan x + \sec x}}} = \sec x.\]
Consider the domain of the given function:
\[\left\{ \begin{array}{l} \tan x + \sec x \gt 0\\ x \ne \frac{\pi }{2} + \pi n \end{array} \right.,\;\; \Rightarrow \left\{ \begin{array}{l} \frac{{\sin x}}{{\cos x}} + \frac{1}{{\cos x}} \gt 0\\ x \ne \frac{\pi }{2} + \pi n \end{array} \right.,\;\;\Rightarrow \left\{ \begin{array}{l} \frac{{\sin x + \cos x}}{{\cos x}} \gt 0\\ x \ne \frac{\pi }{2} + \pi n \end{array} \right.,\;\; \Rightarrow \left[ {\begin{array}{*{20}{l}} {\left\{ {\begin{array}{*{20}{l}} {\sin x + \cos x \gt 0}\\ {\cos x \gt 0} \end{array}} \right.}\\ {\left\{ {\begin{array}{*{20}{l}} {\sin x + \cos x \lt 0}\\ {\cos x \lt 0} \end{array}} \right.} \end{array}} \right.,\;\; \Rightarrow \left[ {\begin{array}{*{20}{l}} {\left\{ {\begin{array}{*{20}{l}} {\tan x + 1 \gt 0}\\ {\cos x \gt 0} \end{array}} \right.}\\ {\left\{ {\begin{array}{*{20}{l}} {\tan x + 1 \lt 0}\\ {\cos x \lt 0} \end{array}} \right.} \end{array}} \right.,\;\; \Rightarrow \left[ {\begin{array}{*{20}{l}} {\left\{ {\begin{array}{*{20}{l}} {\tan x \gt - 1}\\ {\cos x \gt 0} \end{array}} \right.}\\ {\left\{ {\begin{array}{*{20}{l}} {\tan x \lt - 1}\\ {\cos x \lt 0} \end{array}} \right.} \end{array}} \right.. \]
The case described by the first system of inequalities has a solution in the form
\[- \frac{\pi }{4} + \pi n \lt x \lt \frac{\pi }{2} + \pi n,\;\;n \in \mathbb{Z}.\]
In the second case, the system of inequalities is incompatible. Thus, the domain is represented as
\[- \frac{\pi }{4} + \pi n \lt x \lt \frac{\pi }{2} + \pi n,\;\;n \in \mathbb{Z}.\]
Example 21.
\[y = {\log_x}2.\]
Solution.
Using the change-of-base identity, we can rewrite the function in the form
\[y = {\log _x}2 = \frac{{{{\log }_2}2}}{{{{\log }_2}x}} = \frac{1}{{{{\log }_2}x}}.\]
Then by the chain rule,
\[y^\prime = \left( {\frac{1}{{{{\log }_2}x}}} \right)^\prime = \left[ {{{\left( {{{\log }_2}x} \right)}^{ - 1}}} \right]^\prime = \left( { - 1} \right) \cdot {\left( {{{\log }_2}x} \right)^{ - 2}} \cdot \left( {{{\log }_2}x} \right)^\prime = - \frac{1}{{{{\left( {{{\log }_2}x} \right)}^2}}} \cdot \frac{1}{{x\ln 2}}.\]
Given that \({\log _2}x = \frac{{\ln x}}{{\ln 2}},\) we get
\[y^\prime = - \frac{1}{{{{\left( {{{\log }_2}x} \right)}^2}}} \cdot \frac{1}{{x\ln 2}} = - \frac{1}{{{{\left( {\frac{{\ln x}}{{\ln 2}}} \right)}^2} \cdot x\ln 2}} = - \frac{1}{{\frac{{\ln x}}{{\ln 2}} \cdot \frac{{\ln x \cdot x\cancel{\ln 2}}}{\cancel{\ln 2}}}} = - \frac{1}{{x\ln x{{\log }_2}x}}.\]
Example 22.
Calculate the derivative of the function \(y = {\log_2}x\ln \left( {2x} \right)\) at \(x = 1.\)
Solution.
By the product rule,
\[y^\prime = \left[ {{{\log }_2}x\ln \left( {2x} \right)} \right]^\prime = \left( {{{\log }_2}x} \right)^\prime \cdot \ln \left( {2x} \right) + {\log _2}x \cdot \left( {\ln \left( {2x} \right)} \right)^\prime = \frac{1}{{x\ln 2}} \cdot \ln \left( {2x} \right) + {\log _2}x \cdot \frac{1}{{2x}} \cdot 2 = \frac{{\ln \left( {2x} \right)}}{{x\ln 2}} + \frac{{{{\log }_2}x}}{x} = \frac{1}{x}\left( {\frac{{\ln 2 + \ln x}}{{\ln 2}} + {{\log }_2}x} \right) = \frac{1}{x}\left( {1 + \frac{{\ln x}}{{\ln 2}} + {{\log }_2}x} \right) = \frac{1}{x}\left( {1 + 2\,{{\log }_2}x} \right).\]
Substitute \(x = 1:\)
\[y^\prime\left( 1 \right) = \frac{1}{1}\left( {1 + 2\,{{\log }_2}1} \right) = 1 + 2 \cdot 0 = 1.\]