Skip to main content

Section 6.4 Derivatives of Logarithmic Functions

Subsection 6.4.1 Before Class

https://mymedia.ou.edu/media/6.4-1/1_sqpsrqp2
Figure 53. Pre-Class Video 1
https://mymedia.ou.edu/media/6.4-2/1_vlsr87a6
Figure 54. Pre-Class Video 2

Subsubsection 6.4.1.1 The Natural Logarithm

The Natural Logarithm.
\(\dfrac{d}{dx}[\ln x] = \dfrac{1}{x}\)
Let \(y=\ln x\text{.}\) From inverse relationships, we know that \(x=e^y\text{.}\) Implicitly differentiating, we have
\begin{equation*} 1 = e^y\cdot \dfrac{dy}{dx} \end{equation*}
So that \(\dfrac{dy}{dx} = \dfrac{1}{e^y}\text{.}\) Since \(y=\ln x\text{,}\) we have
\begin{equation*} \dfrac{dy}{dx} = \dfrac{1}{e^{\ln x}} = \dfrac{1}{x} \end{equation*}
Example 6.4.1.
Find the derivative of \(f(x) = \ln (x^2-5)\)
Solution.
\(f'(x) = \dfrac{1}{x^2-5}\cdot (2x-5)\)
Example 6.4.2.
Find the derivative of \(f(x) = \ln (\cos x)\)
Solution.
\(f'(x) = -\tan x\)
Example 6.4.3.
Find the derivative of \(\ln \lrpar{\dfrac{x-2}{\sqrt{x+1}}}\)
Solution.
The (simplified) derivative is \(\dfrac{\sqrt{x+1}}{x-2}\cdot \lrpar{\dfrac{\sqrt{x+1}-(x-2)\lrpar{\dfrac{1}{2}(x+1)^{-1/2})}}{x+1}}\)
Example 6.4.4.
Argue why \(\dfrac{d}{dx} (\ln |x|) = \dfrac{1}{x}\)
Solution.
Note first that
\begin{equation*} |x| = \begin{cases}-x & x \lt 0 \\ x & x\geq 0\end{cases} \end{equation*}
Then, we have two cases:
\begin{equation*} \ln |x| = \begin{cases} \ln (-x) & x \lt 0 \\ \ln (x) & x\geq 0 \end{cases} \end{equation*}
When we take the derivative, we have
\begin{equation*} \dfrac{d}{dx}[\ln |x|] = \begin{cases} \dfrac{d}{dx} [\ln (-x)] & x \lt 0 \\ \dfrac{d}{dx}[\ln (x)] & x\geq 0 \end{cases} \end{equation*}
In the first branch, since \(x\lt 0\text{,}\) \(\ln(-x) = \ln (x)\text{.}\) So,
\begin{equation*} \dfrac{d}{dx} [\ln (-x)] = \dfrac{d}{dx} [\ln (x)] = \dfrac{1}{x} \end{equation*}
The second branch agrees, namely that
\begin{equation*} \dfrac{d}{dx} [\ln (x)] = \dfrac{1}{x} \end{equation*}
So for any value of \(x\text{,}\) the statement holds:
\begin{equation*} \dfrac{d}{dx} [\ln |x|] = \dfrac{1}{x} \end{equation*}
Antiderivative of \(\dfrac{1}{x}\).
\begin{equation*} \ds \int \dfrac{1}{x}\, dx = \ln |x| + C \end{equation*}
Example 6.4.5.
Evaluate \(\ds \int_1^5 \dfrac{1}{2x}\, dx\)
Solution.
\(\ds \int_1^5 \dfrac{1}{2x}\, dx = \dfrac{1}{2}\ln 5\)
Example 6.4.6.
Compute \(\ds \int_1^e \dfrac{\ln x}{x}\, dx\)
Solution.
\(\ds \int_1^e \dfrac{\ln x}{x}\, dx = \dfrac{1}{2}\)
Example 6.4.7.
Find \(\ds \int \dfrac{x}{x^2 + 1}\, dx\)
Solution.
\(\ds \int \dfrac{x}{x^2 + 1}\, dx = \dfrac{1}{2}\ln (x^2+1) +C\)

Subsection 6.4.2 Pre-Class Activities

Example 6.4.8.

Find the derivative:
  1. \(\displaystyle f(x) = x\ln x - x\)
  2. \(\displaystyle g(x) = \ln (\sin^2x)\)
  3. \(\displaystyle y = \dfrac{1}{\ln x}\)
  4. \(\displaystyle h(t) = \ln(t + \sqrt{t^2-1})\)
Solution.
  1. \(\displaystyle f'(x) = \ln x\)
  2. \(\displaystyle g'(x) = 2\cot x\)
  3. \(\displaystyle y' = -(\ln x)^{-2}\cdot \dfrac{1}{x}\)
  4. \(\displaystyle h'(t) = \dfrac{1}{t+\sqrt{t^2-1}}\cdot \lrpar{1 + \dfrac{1}{2}(t^2-1)^{-1/2}\cdot (2t)}\)

Example 6.4.9.

Find the integral:
  1. \(\displaystyle \ds \int_2^4 \dfrac{3}{x}\, dx\)
  2. \(\displaystyle \ds \int_4^9 \lrpar{\sqrt{x} + \dfrac{1}{\sqrt{x}}}^2\, dx\)
  3. \(\displaystyle \ds \int \dfrac{\sin 2x}{1+\cos^2 x}\, dx\)
Solution.
  1. \(\ds \int_2^4 \dfrac{3}{x}\, dx = 3\ln 4 - 3\ln 2\) or \(\ln 8\)
  2. \(\displaystyle \ds \int_4^9 \lrpar{\sqrt{x} + \dfrac{1}{\sqrt{x}}}^2\, dx = \dfrac{73}{2}+\ln 9 - \ln 4\)
  3. \(\displaystyle \ds \int \dfrac{\sin 2x}{1+\cos^2 x}\, dx = -\dfrac{1}{2}(1+\cos^2x)^2 + C\)

Example 6.4.10.

Use this space to write any questions/concerns you have from the pre-class videos.
Solution.
Answers vary

Subsection 6.4.3 In Class

Subsubsection 6.4.3.1 General Logs and Exponentials

Example 6.4.11.
Show that \(\ds \int \tan x\, dx = \ln |\sec x| + C\)
Solution.
Note that \(\tan x = \dfrac{\sin x}{\cos x}\text{.}\) Then, we may rewrite the integral as
\begin{equation*} \ds \int \tan x\, dx = \int \dfrac{\sin x}{\cos x}\, dx \end{equation*}
Set \(u = \cos x\text{,}\) so that \(du = -\sin x\, dx\text{.}\) Making the substitutions, we have
\begin{equation*} \ds \int \dfrac{\sin x}{\cos x}\, dx = \int - \dfrac{1}{u}\, du \end{equation*}
so
\begin{equation*} \ds \int - \dfrac{1}{u}\, du = -\ln |u| + C = -\ln |\cos x| + C \end{equation*}
Using log rules, we can rewrite:
\begin{equation*} -\ln |\cos x| + C = \ln |(\cos x)^{-1}|+C = \ln \left|\dfrac{1}{\cos x}\right| + C = \ln |\sec x| + C \end{equation*}
Example 6.4.12.
Find the absolute minimum of the function \(f(x) = x^2\ln x\)
Solution.
The absolute minimum occurs at \(\lrpar{e^{-1/2},-\dfrac{1}{2}e^{-1}}\)
Derivative of General Logarithms.
\begin{equation*} \dfrac{d}{dx}\lrpar{\log_b x} = \dfrac{1}{x\ln b} \end{equation*}
Using the Change of Base formula (see Section 6.3), we have
\begin{equation*} \log_b x = \dfrac{\ln x}{\ln b} = \dfrac{1}{\ln b}\cdot \ln x \end{equation*}
\(\ln b\) is a constant, so we have
\begin{align*} \dfrac{d}{dx}\left[\log_b x\right] \amp = \dfrac{d}{dx}\left[\dfrac{1}{\ln b}\cdot \ln x\right]\\ \amp = \dfrac{1}{\ln b}\cdot \dfrac{1}{x} \end{align*}
Example 6.4.13.
Find \(\dfrac{d}{dx} [\log_7(2-\cos x)]\)
Solution.
\(\dfrac{1}{\ln 7}\cdot \dfrac{1}{2-\cos x}\cdot \sin x\)
Example 6.4.14.
Find the derivative of \(g(x) = \sqrt{1+\log x}\)
Solution.
\(g'(x) = \dfrac{1}{2}(1+\log x)^{-1/2}\cdot \dfrac{1}{\ln 10} \cdot \dfrac{1}{x}\)
Example 6.4.15.
Find the derivative of \(f(x) = \log_3(x\log_4x)\)
Solution.
\(f'(x) = \dfrac{1}{\ln 3}\cdot \dfrac{1}{x\log_4 x}\lrpar{\log_4 x + \dfrac{1}{\ln 4}}\)
Derivative of Exponential Functions.
\begin{equation*} \dfrac{d}{dx}\lrpar{b^x} = \ln b\cdot b^x \end{equation*}
Let \(y=b^x\text{.}\) Then, \(x=\log_b y\) using inverse properties. Implicitly differentiating, we have
\begin{align*} \dfrac{d}{dx} (x) \amp = \dfrac{d}{dx} \lrpar{\log_b y}\\ 1 \amp = \dfrac{1}{\ln b}\cdot \dfrac{1}{y}\cdot \dfrac{dy}{dx} \end{align*}
Rearranging, we have
\begin{equation*} \dfrac{dy}{dx} = \ln b\cdot y \end{equation*}
but since \(y = b^x\text{,}\) we can write as
\begin{equation*} \dfrac{dy}{d} = \ln b\cdot b^x \end{equation*}
Example 6.4.16.
Find \(\dfrac{d}{dx}\lrpar{5^{x^3}}\)
Solution.
\(\ln 5\cdot 5^{x^3}\cdot 3x^2\)
Example 6.4.17.
Find the absolute maximum and absolute minimum values of the function \(f(x) = 3^{\cos 2x}\) on the interval \([0,2\pi)\)
Solution.
The absolute max occurs in two places, at \(\lrpar{0,3}\) and \((\pi,3)\text{;}\) the absolute minimum occurs in two places as well, at \(\lrpar{\dfrac{\pi}{2},1}\) and \(\lrpar{\dfrac{3\pi}{2},1}\)

Subsubsection 6.4.3.2 Logarithmic Differentiation

Antiderivative of Exponential Functions.
\begin{equation*} \ds \int b^x\, dx = \dfrac{1}{\ln b}\cdot b^x + C \end{equation*}
Example 6.4.18.
Compute \(\ds \int x2^{x^2}\, dx\)
Solution.
\(\ds \int x2^{x^2}\, dx = \dfrac{1}{2\ln 2}\cdot 2^{x^2} + C\)
Example 6.4.19.
Find the derivative of the function \(f(x) = \dfrac{x^{2/3}\sqrt{x^2+1}}{(2x-1)^6}\)
Solution.
\(f'(x) = \lrpar{\dfrac{x^{2/3}\sqrt{x^2+1}}{(2x-1)^6}}\lrpar{\dfrac{2}{3x}+\dfrac{x}{x^2+1}-\dfrac{12}{2x-1}}\)
Logarithmic Differentiation.
  1. Set \(y=f(x)\) and take the natural log of both sides
  2. Use log rules to simplify the right hand side
  3. Take the implict derivative, solve for \(\dfrac{dy}{dx}\text{,}\) and replace \(y\) with \(f(x)\)
Example 6.4.20.
Briefly explain why logarithmic differentiation is ideal for differentiating \(y = \dfrac{e^{-x}\cos^2x}{x^2+x+1}\text{,}\) then compute the derivative.
Solution.
The answers will vary for why it’s ideal, but should center around the complexity of the expression.
\(y' = \lrpar{\dfrac{e^{-x}\cos^2x}{x^2+x+1}}\lrpar{-1-2\tan x -\dfrac{2x+1}{x^2+x+1}}\)
Example 6.4.21.
Use logarithmic differentiation to find the derivative of \(y = x^{\sqrt{x}}\)
Solution.
\(y' = \lrpar{x^{\sqrt{x}}}\lrpar{\dfrac{\ln x}{2\sqrt{x}}+\dfrac{1}{\sqrt{x}}}\)
Alternate Definition of \(e\).
The number \(e\) is defined as the limit
\begin{equation*} \lim_{x\to 0} \lrpar{1+x}^{1/x}\qquad \text{ or }\qquad \lim_{x\to\infty} \lrpar{1 + \dfrac{1}{x}}^x\] \end{equation*}
First note that if \(f(x) = \ln x\text{,}\) then \(f'(1) = 1\text{.}\) Writing this using the definition of the derivative (at a point), we have
\begin{align*} f'(1) \amp = \ds \lim_{x\to 0} \dfrac{f(1+x)-f(1)}{x}\\ \amp = \ds \lim_{x\to 0} \dfrac{\ln (1+x) = \ln 1}{x}\\ \amp = \ds \lim_{x\to 0} \dfrac{1}{x}\cdot \ln(1+x)\\ \amp = \ds \lim_{x\to 0} \ln \lrpar{(1+x)^{1/x}} \end{align*}
Since \(f'(1) = 1\text{,}\) the limit above is exactly 1. Using properties of continuous functions, we can raise both sides of the expression above as powers of \(e\text{:}\)
\begin{align*} \ds \lim_{x\to 0} \ln \lrpar{(1+x)^{1/x}} \amp = 1\\ \ds \lim_{x\to 0} (1+x)^{1/x} \amp = e \end{align*}
If we set \(n=\dfrac{1}{x}\text{,}\) the limit becomes
\begin{equation*} \ds \lim_{n\to \infty} \lrpar{1 + \dfrac{1}{n}}^n = e \end{equation*}

Subsection 6.4.4 After Class Activities

Example 6.4.22.

Compute the derivative for the function:
  1. \(\displaystyle f(x) =x^4 + 4^x\)
  2. \(\displaystyle k(z) = 6^z\log_6z\)
  3. \(\displaystyle y = \ln (\csc x - \cot x)\)
Solution.
  1. \(\displaystyle f'(x) = 4x^3 + \ln 4\cdot 4^x\)
  2. \(\displaystyle k'(z) = \ln 6\cdot 6^z\log_6z + (6^z)\lrpar{\dfrac{1}{\ln 6}\cdot \dfrac{1}{x}}\)
  3. \(\displaystyle y' = \dfrac{1}{\csc x- \cot x}\cdot \lrpar{-\csc x\cot x -\csc^2x}\)

Example 6.4.23.

Find the equation of the tangent line to the curve \(y = x^2\ln x\) at the point \((1,0)\)
Solution.
\(y=x-1\)

Example 6.4.24.

Let \(>f(x) = \log_b(3x^2-2)\text{.}\) For what value of \(b\) is \(f'(1) = 3\text{?}\)
Solution.
\(b=e^2\)

Example 6.4.25.

Compute \(\dfrac{d}{dx}[x^{\sin x}]\)
Solution.
\(\dfrac{d}{dx}[x^{\sin x}] = \lrpar{x^{\sin x}}\lrpar{\cos x\ln x + \dfrac{\sin x}{x}}\)

Example 6.4.26.

Show that \(\ds \int \cot x\, dx = \ln |\sin x| + C\)
Solution.
Rewrite \(\cot x\) as \(\dfrac{\cos x}{\sin x}\text{.}\) Set \(u = \sin x\text{,}\) so that \(du = \cos x\, dx\text{.}\) Then, we have
\begin{equation*} \ds \int \cot x\, dx = \int \dfrac{1}{u}\, du = \ln |u| + C = \ln |\sin x| + C \end{equation*}

Example 6.4.27.

Find \(\ds \int \dfrac{\sin (\ln t)}{t}\, dt\)
Solution.
\(\ds \int \dfrac{\sin (\ln t)}{t}\, dt = -\cos (\ln t) + C\)

Example 6.4.28.

Evaluate \(\ds \int \dfrac{2^x}{2^x + 1}\, dx\)
Solution.
\(\ds \int \dfrac{2^x}{2^x + 1}\, dx = \dfrac{1}{\ln 2}\ln(2^x + 1) + C\)