Calculus

Differentiation of Functions

Logarithmic Differentiation

Page 1
Problems 1-4
Page 2
Problems 5-19

The method of differentiating functions by first taking logarithms and then differentiating is called logarithmic differentiation. This approach allows calculating derivatives of power, rational and some irrational functions in an efficient manner.

Consider this approach in more detail. Let \(y = f\left( x \right)\). Take natural logarithms of both sides:
\[\ln y = \ln f\left( x \right).\] Next, we differentiate this expression using the chain rule and keeping in mind that \(y\) is a function of \(x.\)
\[
{{\left( {\ln y} \right)^\prime } = {\left( {\ln f\left( x \right)} \right)^\prime },\;\;}\Rightarrow
{\frac{1}{y}y’\left( x \right) = {\left( {\ln f\left( x \right)} \right)^\prime }.}
\] It’s seen that the derivative is
\[
{y’ = y{\left( {\ln f\left( x \right)} \right)^\prime } }
= {f\left( x \right){\left( {\ln f\left( x \right)} \right)^\prime }.}
\] The derivative of the logarithmic function is called the logarithmic derivative of the initial function \(y = f\left( x \right)\).

This method also allows to effectively compute derivatives of power-exponential functions, i.e. functions of the form
\[y = u{\left( x \right)^{v\left( x \right)}},\] where \(u\left( x \right)\) and \(v\left( x \right)\) are differentiable functions of \(x.\)

In the examples below, find the derivative of the function \(y\left( x \right)\) using logarithmic differentiation.

Solved Problems

Click on problem description to see solution.

 Example 1

\[y = {x^x},\;x \gt 0.\]

 Example 2

\[y = {x^{\ln x}},\;x \gt 0.\]

 Example 3

\[y = {x^{\cos x}},\;x \gt 0.\]

 Example 4

\[{y = {x^{2x}}\;\;}\kern0pt{\left( {x \gt 0,\;x \ne 1} \right)}\]

 Example 5

\[y = {\left( {x – 1} \right)^2}{\left( {x – 3} \right)^5}\]

 Example 6

\[{y\left( x \right) }={ \frac{{{{\left( {x + 1} \right)}^2}}}{{{{\left( {x + 2} \right)}^3}{{\left( {x + 3} \right)}^4}}},\;\;}\kern-0.3pt{x \gt – 1.}\]

 Example 7

\[y = \sqrt[\large x\normalsize]{x},\;x \gt 0.\]

 Example 8

\[y = {\left( {\ln x} \right)^x},\;x \gt 1.\]

 Example 9

\[{y = {x^{{x^2}}}\;\;}\kern-0.3pt{\left( {x \gt 0,\;x \ne 1} \right)}\]

 Example 10

\[{y = {x^{{x^n}}}\;\;}\kern-0.3pt{\left( {x > 0,\;x \ne 1} \right)}\]

 Example 11

\[{y = {x^{{2^x}}}\;\;}\kern-0.3pt{\left( {x > 0,\;x \ne 1} \right)}\]

 Example 12

\[{y = {2^{{x^x}}}\;\;}\kern-0.3pt{\left( {x > 0,\;x \ne 1} \right)}\]

 Example 13

\[{y = {x^{\sqrt x }}\;\;}\kern-0.3pt{\left( {x \gt 0,\;x \ne 1} \right)}\]

 Example 14

\[{y = {x^{{x^x}}}\;\;}\kern-0.3pt{\left( {x \gt 0,\;x \ne 1} \right)}\]

 Example 15

\[{y = {\sqrt x ^{\sqrt x }}\;\;}\kern-0.3pt{\left( {x \gt 0,\;x \ne 1} \right)}\]

 Example 16

\[y = {\left( {\sin x} \right)^{\cos x}}\]

 Example 17

\[{y = \sqrt[\large 3\normalsize]{{\frac{{{x^2} – 3}}{{1 + {x^5}}}}},\;\;}\kern-0.3pt{x \gt \sqrt 3 .}\]

 Example 18

\[y = {\left( {\cos x} \right)^{\arcsin x}}\]

 Example 19

\[y = {\left( {\sin x} \right)^{\arctan x}}\]

Example 1.

\[y = {x^x},\;x \gt 0.\]

Solution.

First we take logarithms of the left and right side of the equation:
\[
{\ln y = \ln {x^x},\;\;}\Rightarrow
{\ln y = x\ln x.}
\] Now we differentiate both sides meaning that \(y\) is a function of \(x:\)
\[
{{\left( {\ln y} \right)^\prime } = {\left( {x\ln x} \right)^\prime },\;\;}\Rightarrow
{\frac{1}{y} \cdot y’ = x’\ln x + x{\left( {\ln x} \right)^\prime },\;\;}\Rightarrow
{\frac{{y’}}{y} = 1 \cdot \ln x + x \cdot \frac{1}{x},\;\;}\Rightarrow
{\frac{{y’}}{y} = \ln x + 1,\;\;}\Rightarrow
{y’ = y\left( {\ln x + 1} \right),\;\;}\Rightarrow
{y’ = {x^x}\left( {\ln x + 1} \right),\;\;}\kern0pt{\text{where}\;\;x \gt 0.}
\]

Example 2.

\[y = {x^{\ln x}},\;x \gt 0.\]

Solution.

Apply logarithmic differentiation:
\[
{\ln y = \ln \left( {{x^{\ln x}}} \right),\;\;}\Rightarrow
{\ln y = \ln x\ln x = {\ln ^2}x,\;\;}\Rightarrow
{{\left( {\ln y} \right)^\prime } = {\left( {{{\ln }^2}x} \right)^\prime },\;\;}\Rightarrow
{\frac{{y’}}{y} = 2\ln x{\left( {\ln x} \right)^\prime },\;\;}\Rightarrow
{\frac{{y’}}{y} = \frac{{2\ln x}}{x},\;\;}\Rightarrow
{y’ = \frac{{2y\ln x}}{x},\;\;}\Rightarrow
{y’ = \frac{{2{x^{\ln x}}\ln x}}{x} }={ 2{x^{\ln x – 1}}\ln x.}
\]

Example 3.

\[y = {x^{\cos x}},\;x \gt 0.\]

Solution.

Take the logarithm of the given function:
\[
{\ln y = \ln \left( {{x^{\cos x}}} \right),\;\;}\Rightarrow
{\ln y = \cos x\ln x.}
\] Differentiating the last equation with respect to \(x,\) we obtain:
\[
{{\left( {\ln y} \right)^\prime } = {\left( {\cos x\ln x} \right)^\prime },\;\;}\Rightarrow
{\frac{1}{y} \cdot y’ }={ {\left( {\cos x} \right)^\prime }\ln x + \cos x{\left( {\ln x} \right)^\prime },\;\;}\Rightarrow
{{\frac{{y’}}{y} }={ \left( { – \sin x} \right) \cdot \ln x + \cos x \cdot \frac{1}{x},\;\;}}\Rightarrow
{{\frac{{y’}}{y} }={ – \sin x\ln x + \frac{{\cos x}}{x},\;\;}}\Rightarrow
{{y’ }={ y\left( {\frac{{\cos x}}{x} – \sin x\ln x} \right).}}
\] Substitute the original function instead of \(y\) in the right-hand side:
\[{y’ = {x^{\cos x}}\cdot}\kern0pt{\left( {\frac{{\cos x}}{x} – \sin x\ln x} \right),}\] where \(x \gt 0\).

Example 4.

\[{y = {x^{2x}}\;\;}\kern0pt{\left( {x \gt 0,\;x \ne 1} \right)}\]

Solution.

Taking logarithms of both sides, we can write the following equation:
\[{\ln y = \ln {x^{2x}},\;\;} \Rightarrow {\ln y = 2x\ln x.}\] Further we differentiate the left and right sides:
\[
{{\left( {\ln y} \right)^\prime } = {\left( {2x\ln x} \right)^\prime },\;\;}\Rightarrow
{\frac{1}{y} \cdot y’ }={ {\left( {2x} \right)^\prime } \cdot \ln x + 2x \cdot {\left( {\ln x} \right)^\prime },\;\;}\Rightarrow
{\frac{{y’}}{y} = 2 \cdot \ln x + 2x \cdot \frac{1}{x},\;\;}\Rightarrow
{\frac{{y’}}{y} = 2\ln x + 2,\;\;}\Rightarrow
{y’ = 2y\left( {\ln x + 1} \right)\;\;}\kern0pt{\text{or}\;\;y’ = 2{x^{2x}}\left( {\ln x + 1} \right).}
\]

Page 1
Problems 1-4
Page 2
Problems 5-19